Saturday, May 26, 2007

Repair Grub with Ubuntu LiveCD

After re-installing windows, my ubuntu partition have disappear. What I mean is a grub bootloader (which come from ubuntu) that already installed before on MBR cannot be accessed because windows re-write MBR partition with its own boot manager.

what I should do?
1. boot using ubuntu livecd (desktop version)
a. login as root
using command: sudo_root or sudo -s
b. mount your ubuntu partition
e.g: - mount point as /media/disk
mount /dev/sda1 /media/disk

2. mount your livecd /dev directory into your ubuntu mount point ( /media/disk )
e.g: mount --bind /dev /media/disk/dev

3. run this command: grub-install --root-directory=/media/disk /dev/sda

hope this helpful.