From owner-freebsd-questions@freebsd.org Wed Aug 5 06:37:01 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 4F5B19B4E9F for ; Wed, 5 Aug 2015 06:37:01 +0000 (UTC) (envelope-from cary@SDF.org) Received: from cdptpa-oedge-vip.email.rr.com (cdptpa-outbound-snat.email.rr.com [107.14.166.230]) by mx1.freebsd.org (Postfix) with ESMTP id 16774D31 for ; Wed, 5 Aug 2015 06:37:00 +0000 (UTC) (envelope-from cary@SDF.org) Received: from [67.49.10.59] ([67.49.10.59:23898] helo=bsdfull.Belkin) by cdptpa-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 88/A3-19792-D4DA1C55; Wed, 05 Aug 2015 06:29:40 +0000 Message-ID: <55C1AD48.4060004@SDF.org> Date: Tue, 04 Aug 2015 23:29:28 -0700 From: Cary User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: windows entry for grub2 References: <20150804034108.Horde._OTrFyjhdRQUM4x9GSp-yLG@mail.parts-unknown.org> <20150804132218.Horde.Gj6WjgZdXie82Uv8hJ6DwzP@mail.parts-unknown.org> <55C1418A.8020904@SDF.org> <20150804201540.Horde.tVjfGgqFaL11N353NCxJOb4@mail.parts-unknown.org> In-Reply-To: <20150804201540.Horde.tVjfGgqFaL11N353NCxJOb4@mail.parts-unknown.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.142:25 X-Cloudmark-Score: 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: Wed, 05 Aug 2015 06:37:01 -0000 David Benfell wrote: > Quoting Cary : > >> David Benfell wrote: >>> Quoting CeDeROM : >>> >>>> Hello David :-) >>>> >>>> EFI is different than MBR/BIOS. I did not manage to boot Grub2/Linux on my >>>> new EFI machine. Only FreeBSD and Windows starts. >>> >>> It *is* a very weird and poorly documented process and I haven't actually >>> checked to see yet if I succeeded in getting grub to work. >> >> Do you see any output after running grub-mkconfig(8) ? > > Yes, and this (but see below for the resulting grub.cfg) looks like more trouble: > > home-desktop# grub-mkconfig -o /boot/grub/grub.cfg > Generating grub configuration file ... > Found kernel of FreeBSD: /boot/kernel/kernel > Found kernel module directory: /boot/kernel > grub-probe: error: cannot find a GRUB drive for /dev/da0p1. Check your device.map. > grub-probe: error: cannot find a GRUB drive for /dev/da1p1. Check your device.map. > done > > I don't have even the first idea why it's looking for /dev/da0p1 or /dev/da1p1. > I've tried both creating /boot/grub/device.map with just an entry for /dev/ada0 > and deleting it. > > I managed to copy in the EFI directory from my other local system. I'm in the > middle of stuff right now, so I haven't yet tested this. grub-mkconfig does, > however, create /boot/grub/grub.cfg which, among other things, appears to > contain entries (see below) for Windows (and Dell) stuff. > > And grub-install appears to work: > > home-desktop# mount /boot/efi > home-desktop# grub-install --target x86_64-efi /dev/ada0 > Installing for x86_64-efi platform. > Installation finished. No error reported. > home-desktop# ls -al /boot/efi/EFI > total 192 > drwxr-xr-x 1 root wheel 16384 Jan 21 2015 . > drwxr-xr-x 1 root wheel 16384 Dec 31 1979 .. > drwxr-xr-x 1 root wheel 16384 Jan 21 2015 Boot > drwxr-xr-x 1 root wheel 16384 Jul 5 2014 Dell > drwxr-xr-x 1 root wheel 16384 Jan 21 2015 Microsoft > drwxr-xr-x 1 root wheel 16384 Aug 4 17:01 grub > > One thing that is surprising is that I am no longer having to switch the > partition type back and forth between bios-boot and efi. I don't know what > changed here--oops. > > grub.cfg contains: > > home-desktop# cat /boot/grub/grub.cfg > # > # DO NOT EDIT THIS FILE > # > # It is automatically generated by grub-mkconfig using templates > # from /usr/local/etc/grub.d and settings from /usr/local/etc/default/grub > # > > ### BEGIN /usr/local/etc/grub.d/00_header ### > insmod part_gpt > if [ -s $prefix/grubenv ]; then > load_env > fi > set default="0" > > ### END /usr/local/etc/grub.d/41_custom ### > ### BEGIN /usr/local/etc/grub.d/50_otherbe ### > ### END /usr/local/etc/grub.d/50_otherbe ### > > I'm hoping for the best. As soon as I get through with all this other stuff, > I'll attempt a reboot and see if I can actually get into 1) grub, and 2) > Windows. The latter, as previously mentioned, might fail because the files I > copied in are from Windows 8.1 rather than Windows 10. > > I do have another Windows 10 installation lying about but I haven't found how > reliably to get into the firmware to boot it under something else that will let > me actually copy the files from its EFI partition. This other system is a > super-cheap Asus laptop and Google is not being my friend. > It looks ok. Not much trouble. We'll know when you reboot. In meantime you might also run $ grub-probe --target=fs_uuid --device /dev/ada0p5 If the command returns a uuid you might be able to use it in the grub.cfg that you have. -- cary@sdf.org SDF Public Access UNIX System - http://sdf.org ------------------------------