I've finally decided to have a go at fixing the problem where the Windows 8 option disappeared from my GRUB menu when I upgraded from F19 to F20.
Working through various Google responses I've found that i had a load of stuff missing, including
* .mod files * /boot/etc/EFI/Microsoft
I installed grub2-efi-modules-2.00-27.fc20.x86_64 and then copied ntfs.mod and parted_msdos.mod to /boot/efi/EFI/fedora/x86_64-efi/ which got rid of some of the errors
I then mkdir /boot/etc/EFI/Microsoft/Boot and copied bootmgfw.efi from /windows/Windows/Boot/EFI/bootmgfw.efi to /boot/etc/EFI/Microsoft/Boot
However, although I've fixed most of the error messages, I've still got the error:
efi: file `/EFI/Microsoft/Boot/bootmgfw.efi` not found.
I'm now stuck. Has anyone got any suggestions what to do next?
parted shows (sda4 is the Win8 partition, sda5 is the recovery partition):
Model: ATA ST1000LM014-1EJ1 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags:
Number Start End Size File system Name Flags 1 1049kB 683MB 682MB ntfs Basic data partition hidden, diag 2 683MB 892MB 210MB fat16 EFI System Partition boot 4 1089MB 212GB 211GB ntfs Basic data partition 3 212GB 213GB 524MB ext4 6 213GB 978GB 765GB lvm 5 978GB 1000GB 21.8GB ntfs Basic data partition hidden
Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/fedora-home: 705GB Sector size (logical/physical): 512B/4096B Partition Table: loop Disk Flags:
Number Start End Size File system Flags 1 0.00B 705GB 705GB ext4
Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/fedora-root: 53.7GB Sector size (logical/physical): 512B/4096B Partition Table: loop Disk Flags:
Number Start End Size File system Flags 1 0.00B 53.7GB 53.7GB ext4
Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/fedora-swap: 6317MB Sector size (logical/physical): 512B/4096B Partition Table: loop Disk Flags:
Number Start End Size File system Flags 1 0.00B 6317MB 6317MB linux-swap(v1)
my 40_custome file is:
#!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above.
menuentry "Windows 8 (BCD-UEFI configuration on system drive /dev/sda2)" --class windows --class os { insmod part_msdos insmod ntfs insmod search_fs_uuid insmod chain
set root='hd0,msdos2' if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4 1098EFF798EFD96C else search --no-floppy --fs-uuid --set=root 1098EFF798EFD96C fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi }
The contents of the /boot are:
[root@gary grub.d]# cd /boot [root@gary boot]# find . -type f ./System.map-3.19.8-100.fc20.x86_64 ./System.map-3.19.5-100.fc20.x86_64 ./config-3.19.5-100.fc20.x86_64 ./vmlinuz-3.19.8-100.fc20.x86_64 ./config-3.19.8-100.fc20.x86_64 ./grub2/themes/system/fireworks.png ./grub2/themes/system/background.png ./grub2/grubenv ./grub2/grub.cfg ./.vmlinuz-3.19.8-100.fc20.x86_64.hmac ./.vmlinuz-3.19.4-100.fc20.x86_64.hmac ./.vmlinuz-3.19.5-100.fc20.x86_64.hmac ./vmlinuz-0-rescue-da98f419484443dab77787b4692f3f8f ./System.map-3.19.4-100.fc20.x86_64 ./initramfs-3.19.5-100.fc20.x86_64.img ./initramfs-3.19.8-100.fc20.x86_64.img ./config-3.19.4-100.fc20.x86_64 ./vmlinuz-3.19.4-100.fc20.x86_64 ./initrd-plymouth.img ./efi/EFI/BOOT/BOOTX64.EFI ./efi/EFI/BOOT/fallback.efi ./efi/EFI/fedora/fonts/unicode.pf2 ./efi/EFI/fedora/gcdx64.efi ./efi/EFI/fedora/grubx64.efi ./efi/EFI/fedora/BOOT.CSV ./efi/EFI/fedora/MokManager.efi ./efi/EFI/fedora/shim-fedora.efi ./efi/EFI/fedora/shim.efi ./efi/EFI/fedora/grub.cfg ./efi/EFI/fedora/x86_64-efi/part_msdos.mod ./efi/EFI/fedora/x86_64-efi/ntfs.mod ./efi/EFI/Microsoft/Boot/bootmgfw.efi ./vmlinuz-3.19.5-100.fc20.x86_64 ./initramfs-3.19.4-100.fc20.x86_64.img ./initramfs-0-rescue-da98f419484443dab77787b4692f3f8f.img
There's an awful lot going on here. And to vent, I'm going to start out by saying dual boot sucks. It's not you, users are sane, and dual boot support on Linux just sucks. OK...
On Fri, Jul 3, 2015 at 9:09 AM, Gary Stainburn gary.stainburn@ringways.co.uk wrote:
I've finally decided to have a go at fixing the problem where the Windows 8 option disappeared from my GRUB menu when I upgraded from F19 to F20.
This suggests the computer does not have Secure Boot enabled, because Fedora's GRUB has never support UEFI Secure Boot chainloading of the Windows bootloader. The fact the GRUB menu entry used to work, and now doesn't, suggests some other problem.
parted shows (sda4 is the Win8 partition, sda5 is the recovery partition):
Model: ATA ST1000LM014-1EJ1 (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags:
Number Start End Size File system Name Flags 1 1049kB 683MB 682MB ntfs Basic data partition hidden, diag 2 683MB 892MB 210MB fat16 EFI System Partition boot
The EFI System partition being fat16 is suspicious. It's supposed to be FAT32 per UEFI spec (removables can be FAT 12, FAT 16, or FAT 32 depending on their size). Anaconda however, doesn't force mkdosfs to create FAT 32, it leaves it up to mkdosfs defaults. And based on the size of the ESP Anaconda creates, mkdosfs formats it FAT 16. It's possible your OEM Windows installer likewise semi-improperly formats this FAT 16.
That it's FAT 16 isn't likely a problem, except that if it was reformatted, and not repaired by Windows startup repair yet, might explain why you're not able to boot Windows.
my 40_custome file is:
#!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above.
menuentry "Windows 8 (BCD-UEFI configuration on system drive /dev/sda2)" --class windows --class os { insmod part_msdos insmod ntfs insmod search_fs_uuid insmod chain
The insmod part_msdos is wrong. It should be part_gpt as this is a GPT disk.
I strongly advise not using 40_custom for this. You should let grub2-mkconfig find Windows, and create the proper boot entry from scratch.
set root='hd0,msdos2' if [ x$feature_platform_search_hint = xy ]; thensearch --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4
More msdos stuff which is wrong...
1098EFF798EFD96C else search --no-floppy --fs-uuid --set=root 1098EFF798EFD96C
Is this the correct UUID for the Windows volume? Check with blkid. grub2-mkconfig will get this right, which is why it should be used instead of a static configuration.
./efi/EFI/Microsoft/Boot/bootmgfw.efi
This being the only thing in /boot/efi/EFI/Microsoft is perplexing. I'm expecting a lot more stuff in here than this. So yet again I wonder if maybe this EFI System partition was inadvertently formatted when doing a Fedora installation? It's not difficult to accidentally delete it, I've found.
But the fact is that you're not seemingly getting an error from this OSLoader, you're getting it from GRUB not finding this path which suggests the menu entry is malformed somehow.
Suggestions:
- Move /etc/grub.d/40_custom out of that directory so it doesn't get used, but is still retained in case you want to revert. - run grub2-mkconfig -o ~/Downloads/grub.cfg
post that grub.cfg somewhere or maybe it'll all paste into the mailing list which is fine too, I want to see the whole thing *unless* it doesn't have a Windows menu entry listed in it. If it doesn't then I'm going to guess that /etc/default/grub has os-prober disabled. If so that needs to be commented out and you need to rerun the grub2-mkconfig command.
Hi Chris,
Thanks for this. Just had a fantastic honeymoon, but now back in the real world and onwards with trying to fix this.
On Friday 03 July 2015 18:35:47 Chris Murphy wrote:
There's an awful lot going on here. And to vent, I'm going to start out by saying dual boot sucks. It's not you, users are sane, and dual boot support on Linux just sucks. OK...
On Fri, Jul 3, 2015 at 9:09 AM, Gary Stainburn
gary.stainburn@ringways.co.uk wrote:
I've finally decided to have a go at fixing the problem where the Windows 8 option disappeared from my GRUB menu when I upgraded from F19 to F20.
This suggests the computer does not have Secure Boot enabled, because Fedora's GRUB has never support UEFI Secure Boot chainloading of the Windows bootloader. The fact the GRUB menu entry used to work, and now doesn't, suggests some other problem.
[snip]
1098EFF798EFD96C else search --no-floppy --fs-uuid --set=root 1098EFF798EFD96C
Is this the correct UUID for the Windows volume? Check with blkid. grub2-mkconfig will get this right, which is why it should be used instead of a static configuration.
./efi/EFI/Microsoft/Boot/bootmgfw.efi
This being the only thing in /boot/efi/EFI/Microsoft is perplexing. I'm expecting a lot more stuff in here than this. So yet again I wonder if maybe this EFI System partition was inadvertently formatted when doing a Fedora installation? It's not difficult to accidentally delete it, I've found.
The folder /efi/EFI/Microsoft did not exist, which tends to confirm your suspicion that the the partition was reformatted during the upgrade. I manually created the folder and copied bootmgfw.efi from \Windows\Boot\EFI\
But the fact is that you're not seemingly getting an error from this OSLoader, you're getting it from GRUB not finding this path which suggests the menu entry is malformed somehow.
Suggestions:
- Move /etc/grub.d/40_custom out of that directory so it doesn't get
used, but is still retained in case you want to revert.
- run
grub2-mkconfig -o ~/Downloads/grub.cfg
post that grub.cfg somewhere or maybe it'll all paste into the mailing list which is fine too, I want to see the whole thing *unless* it doesn't have a Windows menu entry listed in it. If it doesn't then I'm going to guess that /etc/default/grub has os-prober disabled. If so that needs to be commented out and you need to rerun the grub2-mkconfig command.
-- Chris Murphy
Here is the generated grub.conf as requested. I've had a look at the file and there is no mention of Windows anywhere. The windows partitions are mounted:
[root@gary ~]# mount|grep sda /dev/sda3 on /boot type ext4 (rw,relatime,stripe=4,data=ordered) /dev/sda2 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro) /dev/sda5 on /windows_recover type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096) /dev/sda4 on /windows type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096) [root@gary ~]# grub2-mkconfig -o ~/Downloads/grub.cfg Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.19.8-100.fc20.x86_64 Found initrd image: /boot/initramfs-3.19.8-100.fc20.x86_64.img Found linux image: /boot/vmlinuz-3.19.5-100.fc20.x86_64 Found initrd image: /boot/initramfs-3.19.5-100.fc20.x86_64.img Found linux image: /boot/vmlinuz-3.19.4-100.fc20.x86_64 Found initrd image: /boot/initramfs-3.19.4-100.fc20.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-da98f419484443dab77787b4692f3f8f Found initrd image: /boot/initramfs-0-rescue-da98f419484443dab77787b4692f3f8f.img done [root@gary ~]# cat ~/Downloads/grub.cfg # # DO NOT EDIT THIS FILE # # It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub #
### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then load_env fi if [ "${next_entry}" ] ; then set default="${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="${saved_entry}" fi
if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi
function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi }
function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi }
terminal_output console set timeout=5 ### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ### menuentry 'Fedora, with Linux 3.19.8-100.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.19.8-100.fc20.x86_64-advanced-7bd8b8aa-711f-4195-b6a9-27d1879e3079' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt3' if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 c0c76610-4d06-4aa7-a0a7-4345a1e74a7b else search --no-floppy --fs-uuid --set=root c0c76610-4d06-4aa7-a0a7-4345a1e74a7b fi linuxefi /vmlinuz-3.19.8-100.fc20.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet initrdefi /initramfs-3.19.8-100.fc20.x86_64.img } menuentry 'Fedora, with Linux 3.19.5-100.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.19.5-100.fc20.x86_64-advanced-7bd8b8aa-711f-4195-b6a9-27d1879e3079' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt3' if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 c0c76610-4d06-4aa7-a0a7-4345a1e74a7b else search --no-floppy --fs-uuid --set=root c0c76610-4d06-4aa7-a0a7-4345a1e74a7b fi linuxefi /vmlinuz-3.19.5-100.fc20.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet initrdefi /initramfs-3.19.5-100.fc20.x86_64.img } menuentry 'Fedora, with Linux 3.19.4-100.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.19.4-100.fc20.x86_64-advanced-7bd8b8aa-711f-4195-b6a9-27d1879e3079' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt3' if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 c0c76610-4d06-4aa7-a0a7-4345a1e74a7b else search --no-floppy --fs-uuid --set=root c0c76610-4d06-4aa7-a0a7-4345a1e74a7b fi linuxefi /vmlinuz-3.19.4-100.fc20.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet initrdefi /initramfs-3.19.4-100.fc20.x86_64.img } menuentry 'Fedora, with Linux 0-rescue-da98f419484443dab77787b4692f3f8f' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-da98f419484443dab77787b4692f3f8f-advanced-7bd8b8aa-711f-4195-b6a9-27d1879e3079' { load_video insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt3' if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 c0c76610-4d06-4aa7-a0a7-4345a1e74a7b else search --no-floppy --fs-uuid --set=root c0c76610-4d06-4aa7-a0a7-4345a1e74a7b fi linuxefi /vmlinuz-0-rescue-da98f419484443dab77787b4692f3f8f root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet initrdefi /initramfs-0-rescue-da98f419484443dab77787b4692f3f8f.img }
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_ppc_terminfo ### ### END /etc/grub.d/20_ppc_terminfo ###
### BEGIN /etc/grub.d/30_os-prober ### ### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/41_custom ### if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ###
After advice from Chris I've created the Windows recovery USB stick from
http://windows.microsoft.com/en-us/windows-8/create-reset-refresh-media
and run it choosing the system repair option. I now have a working Windows 8 system on my laptop.
Unfortunately, it now boots straight into Windows and doesn't show the GRUB menu.
If I press <F9> to get the boot menu I can select from
OS Boot Manager Fedora (STT000LM014-1EJ164-SSHD) Boot From EFI File
OS Boot Manager takes me into Windows Fedora then shows me the GRUB menu and lets me boot Fedora
If I go into the BIOS menu and look at the boot sequence, OS Boot Manager is at the top of the list, but there is no other option that would make the Fedora / GRUB option the default. The full list is:
OS boot Manager Internal CD/DVD ROM Drive USB Diskette on key/USB Hard Disk USB CD/DVD Drive
Having booted into Fedora I re-ran
grub2-mkconfig -o ~/Downloads/grub.cfg
hoping that it would now include WIndows, but it still does not. This means that even if I get GRUB to be the default boot loader, I'll lose Windows again.
Can anyone suggest where I can go next?
//boot/efi/EFI/Microsoft/Boot now also contains BCD and BCD.LOG files as well as bootmgfw.efi
On Tue, Jul 14, 2015 at 9:28 AM, Gary Stainburn gary.stainburn@ringways.co.uk wrote:
After advice from Chris I've created the Windows recovery USB stick from
http://windows.microsoft.com/en-us/windows-8/create-reset-refresh-media
and run it choosing the system repair option. I now have a working Windows 8 system on my laptop.
Unfortunately, it now boots straight into Windows and doesn't show the GRUB menu.
If I press <F9> to get the boot menu I can select from
OS Boot Manager Fedora (STT000LM014-1EJ164-SSHD) Boot From EFI File
On a new Dell XP 13 I had for a bit in January, it had two F keys to use. One was for setup which is where the boot order could be permanently changed. Another one was for just one-time boot and was not persistent. So you'd need to dig around to find an option to make it persistent. Or you can do this from within Fedora using efibootmgr. So you'd do:
efibootmgr -v And then you'll see a BootOrder, and you can man efibootmgr to find the proper flag for changing the boot order, and make Fedora first in the list. But before you do that...
Having booted into Fedora I re-ran
grub2-mkconfig -o ~/Downloads/grub.cfg
hoping that it would now include WIndows, but it still does not. This means that even if I get GRUB to be the default boot loader, I'll lose Windows again.
Clear+reset the terminal window. Then do: bash -x grub2-mkconfig
Copy-paste the entire window results into a (gedit) text doc and post a URL for us to take a look at it; it won't fit in the mail list. And also post the contents of /etc/default/grub - this will fit in the mail list.
Right, attempt 2.
As I started to say, thanks for the help Chris. The log file has been posted to:
http://www.stainburn.com/grub2-mkconfig.log
Now that the Windows side is working again, I'm wondering if it's worth biting thr bullet and doing a new clean Fedora install. At the moment I'm stuck with F20 as Fedup has decided that there are too many problems to allow me to upgrade to F21.
Do you think that doing a clean install to F22 would fix the problems, or make them worse?
++ GRUB_DISABLE_OS_PROBER=true
This is why it's not making the Windows entry. I mentioned it previously. So comment out that line in /etc/default/grub and then rerun grub2-mkconfig -o ... to make a new grub.cfg in the proper location.
Chris Murphy
On Wednesday 15 July 2015 13:36:53 Chris Murphy wrote:
++ GRUB_DISABLE_OS_PROBER=true
This is why it's not making the Windows entry. I mentioned it previously. So comment out that line in /etc/default/grub and then rerun grub2-mkconfig -o ... to make a new grub.cfg in the proper location.
Chris Murphy
Hi Chris,
Sorry I missed that. It's now included a chain loader entry for Windows, included below.
As you suggested, I tried looking at the man page for grub2-mkconfig. Unfortunately, I don't have that man page installed so I tried googling it. The search pointed me to
https://fedoraproject.org/wiki/GRUB_2
which has only succeeded in confusing me more. Based on the generated config file below, am I right in thinking that all I need to do to get GRUB to work and to allow me to boot windows is to:
grub2-mkconfig -o /boot/grub2/grub.cfg
Assuming this is correct, I still need to work out how to get the laptop to boot GRUB instead of the Windows OS Boot loader.
# # DO NOT EDIT THIS FILE # # It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub #
### BEGIN /etc/grub.d/00_header ### if [ -s $prefix/grubenv ]; then load_env fi if [ "${next_entry}" ] ; then set default="${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="${saved_entry}" fi
if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi
function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi }
function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi }
terminal_output console set timeout=5 ### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ### menuentry 'Fedora, with Linux 3.19.8-100.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.19.8-100.fc20.x86_64-advanced-7bd8b8aa-711f-4195-b6a9-27d1879e3079' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 c0c76610-4d06-4aa7-a0a7-4345a1e74a7b else search --no-floppy --fs-uuid --set=root c0c76610-4d06-4aa7-a0a7-4345a1e74a7b fi linuxefi /vmlinuz-3.19.8-100.fc20.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet initrdefi /initramfs-3.19.8-100.fc20.x86_64.img } menuentry 'Fedora, with Linux 3.19.5-100.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.19.5-100.fc20.x86_64-advanced-7bd8b8aa-711f-4195-b6a9-27d1879e3079' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 c0c76610-4d06-4aa7-a0a7-4345a1e74a7b else search --no-floppy --fs-uuid --set=root c0c76610-4d06-4aa7-a0a7-4345a1e74a7b fi linuxefi /vmlinuz-3.19.5-100.fc20.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet initrdefi /initramfs-3.19.5-100.fc20.x86_64.img } menuentry 'Fedora, with Linux 3.19.4-100.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.19.4-100.fc20.x86_64-advanced-7bd8b8aa-711f-4195-b6a9-27d1879e3079' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 c0c76610-4d06-4aa7-a0a7-4345a1e74a7b else search --no-floppy --fs-uuid --set=root c0c76610-4d06-4aa7-a0a7-4345a1e74a7b fi linuxefi /vmlinuz-3.19.4-100.fc20.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet initrdefi /initramfs-3.19.4-100.fc20.x86_64.img } menuentry 'Fedora, with Linux 0-rescue-da98f419484443dab77787b4692f3f8f' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-da98f419484443dab77787b4692f3f8f-advanced-7bd8b8aa-711f-4195-b6a9-27d1879e3079' { load_video insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3 c0c76610-4d06-4aa7-a0a7-4345a1e74a7b else search --no-floppy --fs-uuid --set=root c0c76610-4d06-4aa7-a0a7-4345a1e74a7b fi linuxefi /vmlinuz-0-rescue-da98f419484443dab77787b4692f3f8f root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet initrdefi /initramfs-0-rescue-da98f419484443dab77787b4692f3f8f.img }
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_ppc_terminfo ### ### END /etc/grub.d/20_ppc_terminfo ###
### BEGIN /etc/grub.d/30_os-prober ### menuentry 'Windows Boot Manager' { chainloader /EFI/Microsoft/Boot/bootmgfw.efi boot } ### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/41_custom ### if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi ### END /etc/grub.d/41_custom ###
On Wed, Jul 15, 2015 at 9:09 AM, Gary Stainburn gary.stainburn@ringways.co.uk wrote:
On Wednesday 15 July 2015 13:36:53 Chris Murphy wrote:
++ GRUB_DISABLE_OS_PROBER=true
This is why it's not making the Windows entry. I mentioned it previously. So comment out that line in /etc/default/grub and then rerun grub2-mkconfig -o ... to make a new grub.cfg in the proper location.
Chris Murphy
Hi Chris,
Sorry I missed that. It's now included a chain loader entry for Windows, included below.
As you suggested, I tried looking at the man page for grub2-mkconfig. Unfortunately, I don't have that man page installed so I tried googling it. The search pointed me to
https://fedoraproject.org/wiki/GRUB_2
which has only succeeded in confusing me more. Based on the generated config file below, am I right in thinking that all I need to do to get GRUB to work and to allow me to boot windows is to:
grub2-mkconfig -o /boot/grub2/grub.cfg
That's for BIOS systems. Fedora's GRUB does a screwy thing on UEFI putting it on the EFI System partition, so you have to do:
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Assuming this is correct, I still need to work out how to get the laptop to boot GRUB instead of the Windows OS Boot loader.
efibootmgr -v ## to list the boots efibootmgr -o 0000,0001,0002....etc ## to explicitly set the order, use the boot numbers separated by commas.
Or do it in the firmware configuration/setup UI.
### BEGIN /etc/grub.d/30_os-prober ### menuentry 'Windows Boot Manager' { chainloader /EFI/Microsoft/Boot/bootmgfw.efi boot } ### END /etc/grub.d/30_os-prober ###
Yeah that's very clean. There's no set-root or search root or search uuid or anything because the Windows bootloader is on the ESP, which is also the GRUB root, and therefore there's no need to change the root or search for a uuid to find the Windows bootloader. The path is relative to the GRUB root.
And just FYI the Fedora NVRAM entry (revealed with efibootmgr -v) doesn't point to GRUB, it points to shim.efi. That's normal.
Chris Murphy
On Wednesday 15 July 2015 16:23:54 Chris Murphy wrote:
grub2-mkconfig -o /boot/grub2/grub.cfg
efibootmgr -v ## to list the boots efibootmgr -o 0000,0001,0002....etc ## to explicitly set the order,
Chris, your advice has been priceless and spot on.
I now have a laptop that boots into the GRUB memu, and have working Fedora and Windows options.
All's right with the world - at least until I try to upgrade Fedora again.
Gary
On Wed, Jul 15, 2015 at 04:09:29PM +0100, Gary Stainburn wrote:
On Wednesday 15 July 2015 13:36:53 Chris Murphy wrote:
++ GRUB_DISABLE_OS_PROBER=true
This is why it's not making the Windows entry. I mentioned it previously. So comment out that line in /etc/default/grub and then rerun grub2-mkconfig -o ... to make a new grub.cfg in the proper location.
Chris Murphy
Hi Chris,
Sorry I missed that. It's now included a chain loader entry for Windows, included below.
As you suggested, I tried looking at the man page for grub2-mkconfig. Unfortunately, I don't have that man page installed so I tried googling it. The search pointed me to
https://fedoraproject.org/wiki/GRUB_2
which has only succeeded in confusing me more. Based on the generated config file below, am I right in thinking that all I need to do to get GRUB to work and to allow me to boot windows is to:
grub2-mkconfig -o /boot/grub2/grub.cfg
Assuming this is correct, I still need to work out how to get the laptop to boot GRUB instead of the Windows OS Boot loader.
Yews, I believe that is correct. But just to save yourself some grief, make sure that ntfs-3g and ntfsprogs are installed BEFORE you do that.
On Wed, Jul 15, 2015 at 10:09 AM, Fred Smith fredex@fcshome.stoneham.ma.us wrote:
Yews, I believe that is correct. But just to save yourself some grief, make sure that ntfs-3g and ntfsprogs are installed BEFORE you do that.
ntfs-3g is included by default in Fedora Workstation, but it's not needed on UEFI installs for os-prober to find the Windows bootloader because it's located on the FAT 32 EFI System partition. On BIOS systems, the Windows bootloader is on an NTFS volume, hence the dependency on ntfs-3g. And ntfsprogs is deprecated since Fedora 15.
On Wed, Jul 15, 2015 at 03:25:32PM -0600, Chris Murphy wrote:
On Wed, Jul 15, 2015 at 10:09 AM, Fred Smith fredex@fcshome.stoneham.ma.us wrote:
Yews, I believe that is correct. But just to save yourself some grief, make sure that ntfs-3g and ntfsprogs are installed BEFORE you do that.
ntfs-3g is included by default in Fedora Workstation, but it's not needed on UEFI installs for os-prober to find the Windows bootloader because it's located on the FAT 32 EFI System partition. On BIOS systems, the Windows bootloader is on an NTFS volume, hence the dependency on ntfs-3g. And ntfsprogs is deprecated since Fedora 15.
thanks for the clarification.
On 07/03/15 10:09, Gary Stainburn wrote: <>
I then mkdir /boot/etc/EFI/Microsoft/Boot and copied bootmgfw.efi from /windows/Windows/Boot/EFI/bootmgfw.efi to /boot/etc/EFI/Microsoft/Boot
However, although I've fixed most of the error messages, I've still got the error:
.
SWAG:
efi: file `/EFI/Microsoft/Boot/bootmgfw.efi` not found.
above is saying that you should have a file named "bootmgfw.efi" in path;
/EFI/Microsoft/Boot/
did you by chances in creating files and paths create a file with;
/EFI/Microsoft/Boot/bootmgfw.efi
when it should have been;
/boot/etc/EFI/Microsoft/Boot/bootmgfw.efi
thereby causing such an error?
also, did you run a web search of;
forums.fedoraforum.org
for your problem?
i ran such a search and within 3 of 'finds';
http://forums.fedoraforum.org/showthread.php?t=296060 http://forums.fedoraforum.org/showthread.php?p=1661415#post1661415 http://forums.fedoraforum.org/showthread.php?p=1700743#post1700743
are possible answers to your problem.
among responses, there is also mentioning that 'fat' partitions must be type 'fat32', not 'fat16'.
did you create the 'ESP' as 'fat16' instead of 'fat32'?
On Fri, Jul 3, 2015 at 12:42 PM, g geleem@bellsouth.net wrote:
did you by chances in creating files and paths create a file with;
/EFI/Microsoft/Boot/bootmgfw.efi
when it should have been;
/boot/etc/EFI/Microsoft/Boot/bootmgfw.efi
thereby causing such an error?
/boot/etc/EFI doesn't make any sense.
On 07/03/15 15:07, Chris Murphy wrote:
On Fri, Jul 3, 2015 at 12:42 PM, g geleem@bellsouth.net wrote:
did you by chances in creating files and paths create a file with;
/EFI/Microsoft/Boot/bootmgfw.efi
when it should have been;
/boot/etc/EFI/Microsoft/Boot/bootmgfw.efi
thereby causing such an error?
/boot/etc/EFI doesn't make any sense.
.
correct you are. my bad. :-(
should have read;
/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
On Fri, Jul 3, 2015 at 2:19 PM, g geleem@bellsouth.net wrote:
On 07/03/15 15:07, Chris Murphy wrote:
On Fri, Jul 3, 2015 at 12:42 PM, g geleem@bellsouth.net wrote:
did you by chances in creating files and paths create a file with;
/EFI/Microsoft/Boot/bootmgfw.efi
when it should have been;
/boot/etc/EFI/Microsoft/Boot/bootmgfw.efi
thereby causing such an error?
/boot/etc/EFI doesn't make any sense.
.
correct you are. my bad. :-(
should have read;
/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
Got it. So the problem there though is /boot/efi/ is a mount point that only exist once Linux has booted and everything is assembled.
From the perspective of GRUB it does not exist yet. The location is
actually a specific drive + partition + path. The drive, partition, and partition scheme is what makes the root to look for hd0,gpt2 in GRUB speak, and the path is just /EFI/Microsoft/Boot.
But the grub.cfg has this wrong it either looks for hd0,msdos2 or hd0,msdos4, but what ought to happen is fall back to looking for the FAT volume fs UUID. But we don't know if that's correct either, especially if the ESP was reformatted since the 40_custom entry was created.
So that's why I'm suggestion just remove 40_custom, and let grub2-mkconfig create the proper Windows menu entry from scratch. It should find out all of these things and just work.