LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   grub, hard drive mapping, booting (http://www.linuxquestions.org/questions/linux-newbie-8/grub-hard-drive-mapping-booting-97900/)

chrisrose21044 09-28-2003 01:46 PM

grub, hard drive mapping, booting
 
So I am trying to use grub to rewrite my MBR and reboot to linux. (I had previously been sharing disks between linux and Windows and got a corrupted disk.)

I have a partition / and a separate /boot partition.
I have grub in /boot/grub.
I don't have a recovery disk so I boot linux from the CDRom, using linux rescue, and it sets an image up in /mnt/sysimage.

Using grub, I can find stage 1 like this;
find /grub/stage1
(hd0,1)

Then I do this, as instructed by the grub manual;
root (hd0,1)
setup(hd0)

What setup actually runs is this;
install /grub/stage1 d (hd0) /grub/stage2 p /grub/grub.conf

This looks good to me - I have a link from menu.lst to grub.conf.

However, if I cycle the power now and try it without the linux CD, I see grub startup, it gives me a menu, I pick a version of linux, and it says;

root (hd1,1)
kernel /vmlinuz-2.4.20-20.7 ro root=/dev/hdc1 hdb=ide-scsi

Error 15; file not found

The kernel command looks right, but why, oh why, is it setting root to (hd1,1) ? Could it be something in my device.map? Or /etc/fstab? I don't know how to diagnose this problem beyond recognizing that it's not using the root that I set prior to running setup in grub.

I have tried the same install command (that setup creates) but without the 'd' argument, I get the same result when I reboot (still looking for (hd1,1)).

I have tried setting up device.map (in boot/grub) with either of
these two lines (obviously not both at the same time)
(hd0) /dev/hdc
(hd1) /dev/hdc


PLEASE HELP! Any insight would be greatly appreciated!!!

chrisrose21044 09-29-2003 08:57 AM

Hey,
Just as an update, I finally solved this problem on my own.
My device.map was wrong (after I had switched the drives around) and I had forgotten that grub-install uses that file. After I fixed device.mmap, and reran grub-install, I was able to get grub to boot. Yay! (Big sigh, much relief.)


All times are GMT -5. The time now is 08:10 AM.