|Sometimes, GRUB 2, the bootloader that comes by default with many distributions Linux, stop functionMost of the time it stops working because for some reason it tries to boot from a wrong or non-existent device, due to a bad program configuration.
Here we present a brief tutorial to solve this problem without need to use a livecd to perform the rescue.
In those cases, it leaves us at a GRUB rescue console prompt.
It may seem a bit complicated but it is simple and can save you more than once. First I accessed the list of available partitions:
This command will show the available partitions, like this:
(hd0) (hd0,1) (hd1) (hd1,1) (hd1,5) (hd2) (hd2,1) (hd3) (hd3,1)
Now you have to find out which partition contains the / boot / grub folder, with all the data needed to boot. To do this, all you have to do is do an "ls" for each of the partitions, like this:
ls (hd1,1) /
… The same goes for the rest of the partitions.
Once the partition containing the boot folder is found, we add the corresponding prefix so GRUB knows where it is:
set prefix = (hd1,1) / boot / grub
Finally, enter the following command:
insmod (hd1,1) /boot/grub/linux.mod
Configure the root partition:
set root = (hd1,1)
Load the Linux kernel image:
linux /boot/vmlinuz-2.6.32-23-generic root = / dev / sdb1
If you don't know what version of the kernel you have installed, you can run the command "ls" in the boot directory to find out.
The nomenclature of the mount point sdb1, is given by the name of the partition: (hd1,1) is sdb1, in the same way that (hd0,2) would be: sda2.
Now the kernel needs to be loaded:
And finally, you can restart:
Once inside the system, it is recommended to reinstall GRUB to avoid this error in the next load:
grub-install / dev / sdb