Reinstall Grub2 from a live ROSA

From Rosalab Wiki
Jump to: navigation, search

Original instructions with discussion can be found at the MIB (Mandriva International Backports) forum: How to reinstall Grub2 from a live ROSA Desktop Linux

Here are instructions on how to recover Grub2 (e.g., after Windows update/installation) using your live Rosa boot cd or usb (the latter is faster).

1. Boot from ROSA LiveCD or flash

2. Open a root console and type

fdisk -l

You will see partitions of your disk:

Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6e2792ad

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *      273105   461740229   230733562+   7  HPFS/NTFS/exFAT
/dev/sda2       461744073   500103449    19179688+   5  Extended
/dev/sda5       461744128   500103449    19179661   83  Linux

3. In this case sda is the boot disk and sda5 is the root partition.

Now you have to mount your root partition:

mount /dev/sda5 /mnt

4. Now install Grub2 to MBR.

grub2-install --root-directory=/mnt/ /dev/sda

5. Finally, run update-grub2 to refresh Grub2 configuration:


6. ... and you're done.

You can now reboot and see again your grub boot loader