Ask Your Question
0

How to Keep Succesful Dual-Boot Setup After Kernel Updates

asked 2014-10-22 23:38:07 -0600

cgonz31 gravatar image

updated 2014-10-24 11:28:30 -0600

I already had Windows 7 (64 bit) installed in UEFI booting. Since Windows 7 does not support it, Secure Boot is disabled. Today I installed Fedora 20 (64-bit) in UEFI booting and Secure Boot disabled. I managed to get the dual boot working using the following video guide to the letter:

https://www.youtube.com/watch?v=xzUKCApxfRw

Note: This guide is Windows 8 and Fedora 20 dual booting with Secure Boot disabled. It worked just the same for Windows 7 and Fedora 20. The part when he starts restoring the Windows Boot Loader is at about 6:20.

Summary: Copy contents of Fedora EFI Partition into Windows 7 EFI Partition. Edit /etc/fstab to point /boot/efi to correct UUID (that of the Windows 7 EFI Partition). Make new GRUB configuration on Fedora /boot partition. Edit GRUB configuration to point the Windows Boot Loader to Windows EFI partition. Copy GRUB configuration to the Fedora folder in Windows 7 EFI partition. Install GRUB on the drive.

Note: I did not delete the Fedora EFI partition afterwards.

Like I said, succesful dual boot. Then comes the problem. Updated Fedora. New kernel. Booted into new kernel. Tried booting into Windows 7. DID NOT work. I think the updates had something to with it. I do not know. I found out that the /boot/efi entry in /etc/fstab was reverted to the Fedora EFI partition.

I removed the Fedora folder in Windows 7 EFI partition (/dev/sdb1) and repeated the process. This time, the final step did not work. The GRUB installation did not start. I think the error was something like: could not find /usr/lib/grub/x86_64-efi/. So I tried the following:

efibootmgr -c -d /dev/sdb -p 1 -l '\EFI\fedora\grubx64.efi' -L F20

This was recommended in:

http://forums.fedoraforum.org/showthread.php?p=1661415#post1661415

This worked. I am back to dual booting. Now the questions are:

1) Will this fix work after updates (including kernel updates)?

IF NO:

2) what is the best way to, once and for all, keep GRUB as the default boot manager for both Fedora and Windows 7 without having to repeat the process after every update?

3) How can I delete the EFI Boot Manager entry I created (F20 Boot0002) and have Boot0001 Fedora be the default entry that will control the dual-booting?

4) How do I permanently make Fedora use the Windows 7 EFI partition as its own (while keeping the Windows 7 files in it intact?

5) Can the Fedora EFI partition (/dev/sdb4) be safely erased while maintaining the dual boot setup?

If you have read this far, thank you. Hopefully you can help me.

Attachments:

sudo fdisk -l

Disk /dev/sdb: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 6E8AA0BA-1735-43B7-B537-CA9C382A2048

Device           Start          End   Size Type
/dev/sdb1         2048 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-10-25 15:25:04 -0600

cgonz31 gravatar image

updated 2014-10-25 16:33:47 -0600

Found the answer:

https://ask.fedoraproject.org/en/question/52067/how-to-completely-remove-fedora-from-a-windows-81-pc-or-fix-it/

Summary: Add the following to /etc/grub.d/40_custom:

menuentry 'Microsoft Windows 7' {
set root='hd1,gpt1'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
}

Erase the Fedora folder in the Windows 7 EFI partition. Note that you end up with two EFI partitions: one for Windows and one for Fedora. This is better in case you upgrade OSs later. You can then use grub-customizer to remove the broken "Windows Boot Manager" entry in GRUB.

sudo yum install grub-customizer

Open the program and disable the "Windows Boot Manager" entry and save configuration. Finally run

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Dual booting now works as desired.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-10-22 23:38:07 -0600

Seen: 3,937 times

Last updated: Oct 25 '14