Resurrecting Grub

From Rosalab Wiki
Revision as of 10:42, 3 June 2012 by D uragan (Talk | contribs) (translated from Russian)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Below is instruction on how to resurrect the Grub loader installed into MBR:

1. Boot from Linux LiveCD or flash.

2. In terminal under the root user type:

grub

3. You should see the grub> prompt

4. Now type:

find /boot/grub/stage2

(Or find /grub/stage2 if the loader is installed to a separate partition mounted to /boot). Using this command, we detect location of the loader by looking for one of its files. If you already know the partition where the loader is installed, you can skip this step.

5. As a result, we will get something like (hd0,6). Example: if Grub is installed to sda6, then we should get (hd0,5), that is (hd<drive_number>,<partition_number>-1).

6. Now let's mar this partition as the "root":

root (hd0,6)

7. And install Grub to its MBR:

setup (hd0)

You can type setup (hd0,6) to install the loader to pbr instead of mbr.

8. And now quit the session:

quit

That's all.