What more could you want?
Recover Grub in Ubuntu with grub-install and Live CD
I re-installed Windows XP on my laptop for the sole purpose of playing American McGee’s Alice. And I blew away grub.
So, to reinstall it, I booted the Hardy LiveCD, and mounted some things:
$ sudo mkdir /mnt/ubu
$ sudo mount /dev/hda5 /mnt/ubu/
$ sudo mount -t proc none /mnt/ubu/proc
$ sudo mount -o bind /dev /mnt/ubu/dev
I was able to determine the appropriate partition to mount by running “fdisk -l” before-hand.
Once mounted, I chrooted into the existing installation:
$ sudo chroot /mnt/ubu/ /bin/bash
Once in, I ran the following, and received the listed error:
# grub-install /dev/hda
/dev/hda does not have any corresponding BIOS drive.
Crap. What to do now? So, after a little Googling, which I am quite fond of, I found the answer:
# grub-install –recheck /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Searching for GRUB installation directory … found: /boot/grub
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install’.(fd0) /dev/fd0
(hd0) /dev/hda
Success! I can now boot myself back into a realm of happiness known as the Hardy Heron!
/cs
| Print article | This entry was posted by chuck on April 7, 2008 at 3:29 pm, and is filed under Admin, Linux. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 1 year ago
Thanks So Much , I needed that!
(Love American McGee’s Alice Too!)
jman6495