Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Could someone help me restore GRUB? Here's what I have done so far:
1.) Booted from Ubuntu Dapper Drake LiveCD
2.) I type sudo grub-install /dev/sda5 and get:
Probing devices to guess BIOS drives. This may take a long time.
Could not find device for /boot: Not found or not a block device.
3.) Mounted my Linux partitions under /mnt/linux. I have two linux partitions: one at /dev/sda7 which was mounted under /, and one at /dev/sda5 which was mounted under /boot/
So I typed in "sudo mount /dev/sda7 /mnt/linux/" and "sudo mount /dev/sda5 /mnt/linux/boot"
4.) Then I typed "sudo mount -o bind /proc /mnt/linux/proc"
5.) I sudo chroot /mnt/linux.
6.) sudo grub-install /dev/sda5 returns:
sudo: unable to lookup ubuntu via gethostbyname()
7.) I type sudo grub, get "sudo: unable to lookup ubuntu via gethostbyname()"
8.) I type grub. I enter grub.
9.) find /boot/grub/stage1 returns: Error 15: File Not Found
10.) I type root (hd0,4) (since /boot was at /dev/sda5), I get Error 21: Selected disk does not exist
11.) I type root (sd0,4), I get Error 23: Error while parsing number
12.) I type grub-install /dev/sda5 (without sudo), get:
/dev/sda5: Not found or not a block device.
What should I do?
Some helpful information:
Before chroot, if I type sudo fdisk -l, I get:
Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 8 64228+ de Dell Utility
/dev/sda2 * 9 6087 48829567+ 7 HPFS/NTFS
/dev/sda3 6088 7295 9703260 5 Extended
/dev/sda5 * 6088 6098 88326 83 Linux
/dev/sda6 6099 6160 497983+ 82 Linux swap / Solaris
/dev/sda7 6161 6641 3863601 83 Linux
/dev/sda8 6642 7295 5253223+ b W95 FAT32
After chrooting, if I type fdisk -l, I get nothing.
My menu.lst had the following entry for Ubuntu:
title Linux 2.6.15-23-386
kernel /vmlinuz-2.6.15-23-386 root=/dev/sda6 ro quiet splash
"updating" Grub will only reinstall the system files which are probably already there. When you installed Windows it rewrote the master boot record (MBR), so you will need to install Grub back to the MBR. You can do so with grub-install. See here for instructions from the Grub site.