Ремонт загрузчика для fedora 22 после установки windows

10102
Just User

У меня уже есть Fedora 22 и Windows 7 в моей машине, я хочу обновить до Windows 10, но на самом деле я боюсь потерять Fedora

Я прочитал документацию Fedora, но все еще боюсь начать этот шаг, так

Кто-нибудь делал этот процесс раньше и верит, что он работает хорошо?

1
Это должен быть тот же процесс всякий раз, когда установка Windows ломает загрузчик grub https://ask.fedoraproject.org/en/question/40578/how-to-reinstall-or-fix-grub-in-fedora-20/ MC10 8 лет назад 0
Вы установили загрузчик Linux в MBR? Или в раздел Linux? zaonline 8 лет назад 0

2 ответа на вопрос

1
KimPhilby

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.

0
digital illusion

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 

Похожие вопросы