From owner-freebsd-questions@freebsd.org Tue Aug 4 20:22:19 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7C449B305C for ; Tue, 4 Aug 2015 20:22:19 +0000 (UTC) (envelope-from benfell@parts-unknown.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id AC7271C15 for ; Tue, 4 Aug 2015 20:22:19 +0000 (UTC) (envelope-from benfell@parts-unknown.org) Received: by mailman.ysv.freebsd.org (Postfix) id AB8AD9B305B; Tue, 4 Aug 2015 20:22:19 +0000 (UTC) Delivered-To: questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 912E79B305A for ; Tue, 4 Aug 2015 20:22:19 +0000 (UTC) (envelope-from benfell@parts-unknown.org) Received: from mail.parts-unknown.org (mail.parts-unknown.org [IPv6:2001:470:67:119::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7936E1C14 for ; Tue, 4 Aug 2015 20:22:19 +0000 (UTC) (envelope-from benfell@parts-unknown.org) Received: by mail.parts-unknown.org (Postfix, from userid 80) id C34DD593E553; Tue, 4 Aug 2015 13:22:18 -0700 (PDT) Received: from 50-250-218-172-static.hfc.comcastbusiness.net (50-250-218-172-static.hfc.comcastbusiness.net [50.250.218.172]) by mail.parts-unknown.org (Horde Framework) with HTTP; Tue, 04 Aug 2015 13:22:18 -0700 Date: Tue, 04 Aug 2015 13:22:18 -0700 Message-ID: <20150804132218.Horde.Gj6WjgZdXie82Uv8hJ6DwzP@mail.parts-unknown.org> From: David Benfell To: CeDeROM Cc: freebsd-questions Subject: Re: windows entry for grub2 References: <20150804034108.Horde._OTrFyjhdRQUM4x9GSp-yLG@mail.parts-unknown.org> In-Reply-To: User-Agent: Horde Application Framework 5 Content-Type: multipart/signed; boundary="=_7hL6_HmvwbJaIwi00gTXvYd"; protocol="application/pgp-signature"; micalg=pgp-sha1 MIME-Version: 1.0 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2015 20:22:19 -0000 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 : > 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 --=_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--