Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Aug 2015 13:22:18 -0700
From:      David Benfell <benfell@parts-unknown.org>
To:        CeDeROM <cederom@tlen.pl>
Cc:        freebsd-questions <questions@freebsd.org>
Subject:   Re: windows entry for grub2
Message-ID:  <20150804132218.Horde.Gj6WjgZdXie82Uv8hJ6DwzP@mail.parts-unknown.org>
In-Reply-To: <CAFYkXjm9eJVdVFkbzR9esVf8D9qeF5aLZ3Hj8rGRN2HRAb3Etg@mail.gmail.com>
References:  <20150804034108.Horde._OTrFyjhdRQUM4x9GSp-yLG@mail.parts-unknown.org> <CAFYkXjm9eJVdVFkbzR9esVf8D9qeF5aLZ3Hj8rGRN2HRAb3Etg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format and has been PGP signed.

--=_7hL6_HmvwbJaIwi00gTXvYd
Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Quoting CeDeROM <cederom@tlen.pl>:

> Hello David :-)
>
> EFI is different than MBR/BIOS. I did not manage to boot Grub2/Linux on m=
y
> new EFI machine. Only FreeBSD and Windows starts.

It *is* a very weird and poorly documented process and I haven't=20=20
actually=20checked to see yet if I succeeded in getting grub to work.

Obviously, we want the grub-efi package. I think it *might* want the=20=20
EFI=20partition to be the first on the disk (normal, but not always the=20=
=20
case),=20but what is really weird here is having to switch the partition=20=
=20
type=20between efi and bios-boot. GRUB only writes on a partition marked=20=
=20
bios-boot=20and when it finds a directory there named EFI. And the=20=20
firmware=20will only boot from it when it is marked efi. So (from memory):

gpart modify -i 1 -t bios-boot /dev/ada0

And when done

gpart modify -i 1 -t efi /dev/ada0

I also have the efi partition mounted as /boot/efi

Also, when issuing grub-install it is very important to specify the=20=20
correct=20target. The default is *wrong* and, I'm guessing, how I=20=20
screwed=20up my EFI partition in the first place. The invocation here=20=20
seems=20to be:

grub-install --target=3Dx86_64-efi /dev/ada0

You should then find a subdirectory /boot/efi/EFI/Grub with an efi=20=20
file=20inside of it.

It looks like all this is extremely fragile. I had a crash (probably=20=20
related=20to the KVM switch I use--I think I need to report this to the=20=
=20
stable=20list) while the partition was mounted and I am currently unable=20=
=20
to=20mount or modify the EFI partition. I get:

home-desktop# mount /boot/efi
mount_msdosfs: /dev/ada0p1: Operation not permitted
home-desktop# newfs_msdos /dev/ada0p1
newfs_msdos: /dev/ada0p1: Operation not permitted

I can't even delete the partition:

home-desktop# gpart delete -i 1 /dev/ada0
gpart: Device busy

I have rebooted the system a couple times since this first cropped up,=20=
=20
so=20that didn't help. I may try going in with the gparted live disk.
>
> So I select OS to boot directly from BIOS menu (or Boot Menu F8). Have yo=
u
> tried that to repair Windoze boot? Maybe booy CD?

If the files I'm able to obtain from other systems don't work, I will=20=20
have=20to buy the CD. That menu (accessed via F1 and F12 on my system)=20=
=20
does=20not show a boot entry for Windows.

Also, apparently I was wrong about grub detecting Windows. It detects=20=20
the=20efi files--which are presently missing on my system.
>
> I can give you files fromWin7  EFI boot partition if that helps..
>
> Best regards,
> Tomek
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info


--=20
David=20Benfell <benfell@parts-unknown.org>

--=_7hL6_HmvwbJaIwi00gTXvYd
Content-Type: application/pgp-signature
Content-Description: PGP Digital Signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJVwR76AAoJEBV64x4SNmArDc0P/1SMXSNfMDSBBCCf41YFgdSj
Oi4ucA8LHCnjIOEsoCXZT0yM92FmbyRHxPzwMuVs08RK4ztoZ3xeIlssAllBgSGL
C4PbbUlQJtx+xpTyB5u04nG7aVv9FDAmLdwe0ojIPH3d8JA0ixWNauR2oOsQlXAP
CCh+SstpRj+UBrlB3Ry8wyq2ZIMANSAh7f4afL2VYfXVV+VtablVGUm0PcD381ik
gr/d6J3+4ZNEn5Nu7H8rO4cvPE+/8+J66fNYVqfe4uop9SbChgv8azAOMPzO/p0e
V3Po7024J+oo785P0DJg/vZWSmLwUBFCiK/4SrVTOzLBE/0b9CV+wfCB+qePJjY+
yky7upZqsF5nVB682UgntvMtZxy/ClpXRwy1wgf8A+fyjz6QFvhKS5ir5czG5Sop
da9LqpjuXqYNJuk9BF7JPkdZzr1YVSovEJDaD4O+EJWrcaPGZDyUMJ9+HTeOq+0h
vUyqlDrxxSKuY2gOMEzwwuO87k595B0+oqIv/QR+eaVQX9Vze02ZvkTK4bb8F9KU
ltT05igSlJ4tIgNyJL55iZrC5fXoayw4r+lyNenOU56xVAbrUzBLpyPO8WrmJs/Q
S9Baye7HQ7LMB/e/771flGbfbQZwHg4pTBTR+gALcd8rSDdqa6z81kGc/86KECmD
ia625bz0u7DNgsDgohj5
=kgpe
-----END PGP SIGNATURE-----

--=_7hL6_HmvwbJaIwi00gTXvYd--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150804132218.Horde.Gj6WjgZdXie82Uv8hJ6DwzP>