On Fri, Dec 25, 2009 at 9:51 AM, Nick Martin <njmarti...@gmail.com> wrote: > Changing the lines you mentioned didn't help. I think those lines were > correct as that section refers to directories on my root partition > (/dev/sdb4 - hd1,4). > > Doing another grub-install with a live cd didn't give any errors either. > > 2009/12/24 Tom H <tomh0...@gmail.com>: >>> I'm having trouble getting grub 2 to work. I've tried installing 2 >>> different distros of Linux (Fedora 12 & Ubuntu 9.10), but grub hasn't >>> worked on either. I'm getting "error: no such disk", followed by a >>> grub rescue prompt. When I do "ls" at this prompt, I see this: >>> >>> (hd0) (hd0,1) (hd0,2) (hd1,1) (hd1,2) (hd1,3) (hd1,4) >>> >>> This seems perfectly reasonable. My setup is as follows: >>> >>> 2 ATA hard drives: >>> /dev/sda (hd0) "master" >>> /dev/sda1 (hd0,1) fat32 - Windows XP backup partitionDisk >>> /dev/sda: 40.0 GB, 40020664320 bytes >>> /dev/sda2 (hd0,2) ntfs - Windows XP >>> /dev/sdb (hd1) "slave" >>> /dev/sdb1 (hd1,1) ntfs - storage space >>> /dev/sdb2 (hd1,2) ext2 - /boot - >>> uuid=d53965e1-bcb1-4158-8531-193af32d52e7 >>> /dev/sdb3 (hd1,3) swap >>> /dev/sdb4 (hd1,4) ext4 - / - uuid=17a9cefd-3754-4048-9aa9-93dc7967a107 >>> >>> Output from "fdisk -l": >>> >>> Disk /dev/sda: 40.0 GB, 40020664320 bytes >>> 255 heads, 63 sectors/track, 4865 cylinders >>> Units = cylinders of 16065 * 512 = 8225280 bytes >>> Disk identifier: 0xe156a499 >>> >>> Device Boot Start End Blocks Id System >>> /dev/sda1 1 595 4779306 b W95 FAT32 >>> /dev/sda2 * 596 4865 34298775 7 HPFS/NTFS >>> >>> Disk /dev/sdb: 251.0 GB, 251000193024 bytes >>> 255 heads, 63 sectors/track, 30515 cylinders >>> Units = cylinders of 16065 * 512 = 8225280 bytes >>> Disk identifier: 0x43393f15 >>> >>> Device Boot Start End Blocks Id System >>> /dev/sdb1 1 28684 230400000 7 HPFS/NTFS >>> /dev/sdb2 * 28685 28708 192780 83 Linux >>> /dev/sdb3 28709 28890 1461915 82 Linux swap / Solaris >>> /dev/sdb4 28891 30515 13052812+ 83 Linux >>> >>> GRUB is installed on the mbr of hd0, which is the drive the BIOS boots >>> from. I've attached my grub.cfg and device.map file. The device.map >>> file looks correct to me. At the start of the cfg file, grub seems to >>> be setting up the graphics, for which it needs a font on /dev/sdb4, >>> which is ext4. I see it uses insmod ext2. Is this right? >>> >>> I've tried to fix the problem with a liveCD by chrooting into those >>> partitions and doing update-grub, then grub-install /dev/sda. I'm >>> using GNU GRUB 1.97~beta4. >> >> The "set root=(hd1,4)" and "search --no-floppy --fs-uuid --set >> 17a9cefd-3754-4048-9aa9-93dc7967a107" lines at the top of your >> grub.cfg are incorrect. >> >> They should be "set root=(hd1,2)" and "search --no-floppy --fs-uuid >> --set d53965e1-bcb1-4158-8531-193af32d52e7" (like within the menuentry >> entries). >> >> >> _______________________________________________ >> Help-grub mailing list >> Help-grub@gnu.org >> http://lists.gnu.org/mailman/listinfo/help-grub >> > > > _______________________________________________ > Help-grub mailing list > Help-grub@gnu.org > http://lists.gnu.org/mailman/listinfo/help-grub >
While your thought process is logical the result is not valid. You have a separate /boot partition which is the 'root device' for the grub-files; just as what you see as / after startup is the 'root device' for your Linux OS. As specified earlier, you must inform grub of /grub's root device/ not the /linux root device/. That would be (hd1,2) in grub2 and (hd1,1) in grub 0.9x . ### BEGIN /etc/grub.d/10_linux ### menuentry "Ubuntu, Linux 2.6.31-14-generic" { recordfail=1 if [ -n ${have_grubenv} ]; then save_env recordfail; fi set quiet=1 insmod ext2 set root=(hd1,2) search --no-floppy --fs-uuid --set d53965e1-bcb1-4158-8531-193af32d52e7 linux /vmlinuz-2.6.31-14-generic root=UUID=17a9cefd-3754-4048-9aa9-93dc7967a107 ro quiet splash initrd /initrd.img-2.6.31-14-generic } You'll notice that this section the root device is set to (hd1,2) and then two files are specified which would be under /boot/ when your system normally operates; you'll also see that /boot should have a symlink such that /boot/boot/ has the same files as /boot/ (literally cd /boot ; ln -s . boot ), this is to aid you, so that you can still specify /boot/ before files without breaking the install. _______________________________________________ Help-grub mailing list Help-grub@gnu.org http://lists.gnu.org/mailman/listinfo/help-grub