Restoring GRUB
I managed to break GRUB a little by deleting the NTFS partition that came before it, since I no longer need Windows. As you might expect, this caused a problem:
error: unknown filesystem grub rescue >
Solution
Enter the ls command and you will see the following:
(hd0) (hd0,2) (hd0,3) (hd0,5) (hd0,6)
And now set:
prefix=(hd0,6)/boot/grub
root=(hd0,6)
Since we have shifted by one partition, set the partition number to one less:
set prefix=(hd0,5)/boot/grub
set root=(hd0,5)
Now let’s look at the available modules and load the ones we need:
ls /boot/grub
insmod /boot/grub/linux.mod
insmod /boot/grub/normal.mod
Modules can also be loaded like this:
insmod normal
Now enter the normal command to get to the GRUB boot menu:
normal
Once you have booted into the system, run:
sudo upgrade-from-grub-legacy
In fact, https://help.ubuntu.com/community/Grub2 helped me through all of this, especially the “Rescue Mode” section.
Comments are closed. Read the original discussion in Russian →
