Repair bootloader for fedora 22 after install windows

1

I already have fedora 22 and windows 7 in my machine , i wanna to upgrade to windows 10 but in fact i'm afraid to losing fedora

i have read the fedora documentation but still afraid to start this step so

Do there anyone did this process before and trusts that it`s working well ?

Just User

Posted 2015-08-07T13:33:30.763

Reputation: 133

It should be the same process any time a Windows installation breaks the grub bootloader https://ask.fedoraproject.org/en/question/40578/how-to-reinstall-or-fix-grub-in-fedora-20/

– MC10 – 2015-08-07T13:39:41.953

Have you installed linux boot loader to MBR? Or to the Linux partition? – zaonline – 2015-08-07T14:41:29.703

Answers

1

I upgraded a dual-booted laptop from Windows 7 to Windows 10 using an iso file. GRUB works just fine, except that in GRUB it shows Windows 7, instead of Windows 10. My guess is that when I do the next upgrade of Fedora (from 22 to 23) GRUB will then reflect Windows 10. BTW, VirtualBox does not yet work on Windows 10, but the other programs work and the files came through intact.

KimPhilby

Posted 2015-08-07T13:33:30.763

Reputation: 11

0

You will run into problems if fedora is on your primary partition, and windows on your secondary partition.

Upgrade to Windows 10 First, you have to uninstall grub from the MBR, otherwise Windows Update won't be able to write to it. You can use MBRFix to do so. Assuming you have 1 drive:

 MbrFix /drive 0 fixmbr /win7

At next reset, you will just see "Missing operating system." You have then to set the boot label on your secondary partition, it's easy to do so by using gparted from a Fedora Live USB. From now on, your primary partition will be completely invisible and you can upgrade

Restoring Grub When upgrade is completed, you can boot with the Live USB again. Put back the boot label on your boot partition (which you need to mount afterwards), and perform installation of grub using it as root directory:

grub2-install --root-directory=/run/media/22cd34deff355e32674 /dev/sda

Also, note down what are the name of your lvms and then reboot:

lvm
lvscan

At reboot grub will start in console mode. You have to boot at runlevel 3 specifying the LVM root:

set root=(hd0,0)
linux vmlinuz-4.1.7-etc ro root=/dev/mapper/lv_root 3
initrd initram-4.1.7-etc
boot

Finally, once you log in as root, rebuild config and install again:

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda

digital illusion

Posted 2015-08-07T13:33:30.763

Reputation: 111