windows entry for grub2

Cary cary at SDF.org
Wed Aug 5 16:27:35 UTC 2015


David Benfell wrote:
> Quoting Cary <cary at sdf.org>:
>>
>> 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.
>
> Thanks for this. It did, and it was different from the one I'd gotten from
> gpart. I was wondering why the example I'd found for directly loading Windows
> had such a short UUID relative to the one I'd gotten from gpart. I now have:
>
> home-desktop% cat /usr/local/etc/grub.d/42_custom
> menuentry "Windows 10 (loader) (on /dev/ada0p5)" --class windows --class os {
>      insmod part_msdos
>      insmod ntfs
>      insmod ntldr
>      set root='(hd0,msdos1)'
>      search --no-floppy --fs-uuid --set=root 3CE002FBE002BAE2 ntldr
> ($root)/bootmgr }
>
> I'm getting closer to where I can try a reboot. But still in the middle of one
> last thing.
>
>

Glad it worked, David!  The menuentry looks a lot like what I was
about to suggest.  Experience with EFI is too limited for me
to know what should be done here.  I noticed in the grub.cfg that
there were many chainload entries created.  Might be that one of
these will work with the files installed in the efi system partition.

A couple of the lines look to me like they could be removed.

"insmod part_msdos"  		-- shouldn't it be part_gpt  ??

"set root='(hd0,msdos1)' "  -- again, gpt instead of msdos.  And the next line
				sets root, thus I don't think it has to be
				done here.

"ntldr /bootmgr"		--  on last line by itself


That's all.  If you've got it, that will be nice to hear.
Cary

--		
cary at sdf.org
SDF Public Access UNIX System - http://sdf.org


------------------------------


More information about the freebsd-questions mailing list