Master Boot Record

From PCLinuxOS Knowledgebase
Jump to navigation Jump to search

Mbr (master boot record) Easy MBR Repair

by old-polack

Grub native install:

From a root terminal on any live CD from any distribution that uses grub; not grub2.

<font color="#FF0000"[root@localhost ~]# grub <Enter>

grub> find /boot/grub/stage2 <Enter>

(hd0,0)        <-- Yours will vary depending on where Linux is installed. Use your results for next command.

grub> root (hd0,0) <Enter>

Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0) <Enter>

Checking if "/boot/grub/stage1" exists... yes'
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.

succeeded

Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded

Done.

grub> quit < Enter>

Now reboot your machine and you should now be able to boot from your hard drive as before.