Ask Your Question
1

F26 installed and missing grub.cfg entry for Windows 10. Howto manually create that entry?

asked 2017-07-12 09:49:19 -0500

raxet01 gravatar image

I had a dual booting UEFI system with F25 and Windows 10 Tuesday morning by evening after installing F26 no entry on reboot for Windows 10.

I used Rufus with gpt and uefi options checked to write the F26 workstation install on this 64 bit desktop.

When setting up Fedora 26 both drives were visible in Anaconda.

Trying to create an entry in grub.cfg to dual boot Windows 10 and Fedora 26. Fedora 26 is installed /dev/sda1,2 and 3 Existing Windows 10 is on /dev/sdb1,2.

Using blkid the uuid for Windows 10 is 517f9bb-7611-48e2-9a94-ba3f4dd5a0ff.

Can't quite figure out how to create the proper entry in grub.cfg to dual boot?

Any help with the manual entry would be appreciated.

All the best, Frank

edit retag flag offensive close merge delete

Comments

What does sudo os-prober show?

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-07-12 13:02:29 -0500 )edit

Running sudo os-prober responded with a CR... nothing.

raxet01 gravatar imageraxet01 ( 2017-07-12 19:01:30 -0500 )edit

Can you use the BIOS boot menu, to get windows to load?

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-07-12 22:24:55 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2017-07-31 08:49:28 -0500

blorg gravatar image

The Win10 section of my /boot/grub2/grub.cfg looks like:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows' --class windows --class os $menuentry_id_option 'osprober-chain-32886C14886BD53F' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  32886C14886BD53F
        else
          search --no-floppy --fs-uuid --set=root 32886C14886BD53F
        fi
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

Even though that UUID looking identifier does not match what blkid returns, so, not sure what that number represents:

# blkid --probe /dev/sda2
/dev/sda2: LABEL="Windows" UUID="88906DD9906DCDEE" TYPE="ntfs" USAGE="filesystem" PART_ENTRY_SCHEME="dos" PART_ENTRY_UUID="0cec76c1-02" PART_ENTRY_TYPE="0x7" PART_ENTRY_NUMBER="2" PART_ENTRY_OFFSET="20291584" PART_ENTRY_SIZE="251658240" PART_ENTRY_DISK="8:0"

I was able to reproduce this output using the /etc/grub.d/30_os-prober stub:

[/etc/grub.d] scratch # export pkgdatadir=/usr/share/grub
[/etc/grub.d] scratch # ./30_os-prober 
Found Windows 10 on /dev/sda1
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-32886C14886BD53F' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  32886C14886BD53F
        else
          search --no-floppy --fs-uuid --set=root 32886C14886BD53F
        fi
        parttool ${root} hidden-
        drivemap -s (hd0) ${root}
        chainloader +1
}

Though it looks like it used os-prober to find that install. If your run of that didn't produce any output, then this probably won't work for you.

What do you get from sudo fdisk -l ?

Sample output from my ThinkPad:

$ sudo fdisk -l
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0cec76c1

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048  20291583  20289536   9.7G 12 Compaq diagnostics
/dev/sda2        20291584 271949823 251658240   120G  7 HPFS/NTFS/exFAT
/dev/sda3       271949824 272973823   1024000   500M 83 Linux
/dev/sda4       272973824 976773119 703799296 335.6G  5 Extended
/dev/sda5       272975872 976773119 703797248 335.6G 8e Linux LVM




Disk /dev/mapper/fedora_scratch-swap: 7.7 GiB, 8204058624 bytes, 16023552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora_scratch-root: 69 GiB, 74088185856 bytes, 144703488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora_scratch-home: 259 GiB, 278048800768 bytes, 543064064 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

In the above output, /dev/sda2 is the WIndows install, but /dev/sda1 is where the Windows boot-loader is located.

edit flag offensive delete link more
0

answered 2017-07-31 18:33:48 -0500

rookieoz gravatar image

updated 2017-07-31 18:42:43 -0500

This has always worked for me and is the method described in the official Fedora documentation, it detects Windows installs and re-writes the grub.cfg file.

https://docs.fedoraproject.org/en-US/...

"EFI Legacy mode" or BIOS:

grub2-mkconfig -o /boot/grub2/grub.cfg

EFI:

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
edit flag offensive delete link more
0

answered 2017-10-05 12:38:38 -0500

updated 2017-10-05 12:39:22 -0500

This worked for me after much troubleshooting for UEFI.

Check for following : * Disable Fast Windows 10 boot . This will work for UEFI and secure mode enabled >>

In BIOS Security -> Select "Select an UEFI FIle as trusted for executing" -> Enter

Go To HDD0 -> EFI -> fedora -> grubx64.efi -> Enter

Type Name such as "FEDORA 26" -> Enter -> Enter

F10 Save and Exit .

Again go to BIOS setting and change the BOOT Order .

Place " EFI File BOOT 0 : FEDORA 26 " above " Windows Boot Manager "

Reboot

Tada ... Fedora and Windows 10 can now be dual booted .

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-12 09:49:19 -0500

Seen: 6,383 times

Last updated: Oct 05 '17