Click to See Complete Forum and Search --> : Problem booting from Grub


smollica
08-07-2003, 10:15 PM
Hi,

I have the 2.4.20-8 version of Redhat installed on both my laptop and desktop machines. I use Grub to boot both machines. My laptop works fine, however, I can't boot my desktop machine from my /boot partition on my harddrive. My Kernel command is kernel /vmlinuz-2.4.20-8 ro root=LABEL=/dev/hdf2 hdc=ide-scsi and the initrd command is initrd /initrd-2.4.20-8.img. Both the kernel and initrd commands seem to load from the Grub command line. When I enter the boot command the machine freezes. I tried setting my root to the floppy drive, since I can boot from the floppy, and load the kernel from the floppy. Again, it seems to load and so does the initrd but my machine freezes when I type boot.

I can boot my desktop from the boot diskette, which I don't believe uses Grub, but I have no luck trying to boot from the HD (using Grub).

Equipment:
- Two 120 GB Maxtor Drives
- Maxtor/Promise ATA133 PCI HD adapter (Primary Master and Slave on Maxtor/Promise controller).
- Plextor 16/10/40 CDR (Primary Master on MB)
- Intel 850MV Motherboard (up to date BIOS)
-1.8 GHz Pentium IV
- Geforce2 MX440 AGP Graphics Card
- 1 GB RDRAM

Any help will be greatly appreciated.

ScottyM

more info re: my grub problem ( post #2)

I made a grub boot diskette and attempted to boot from my diskette. I get the same result when booting from grub off the HD.

After selecting my Linux installation from the grub menu, I see the following output:

" Booting 'Red Hat Linux (2.4.20-9)'

root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
[Linux-bzImage, setup=0x1400, size-0x11098a]
initrd /initrd-2.4.20-8.img
[Linux-initrd @ 0x37fcc000, 0x23c23 bytes]"

after the preceding message is displayed, the computer hangs.
My grub.conf file follows:

[root@localhost smollica]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this
file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdf2
# initrd /initrd-version.img
#boot=/dev/hdf1
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd1,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
title DOS
rootnoverify (hd0,0)
chainloader +1
[root@localhost smollica]#

The layout for my two hard drives follows:

[smollica@localhost smollica]# fdisk -l /dev/hde

Disk /dev/hde: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hde1 * 1 10791 86678676 7 HPFS/NTFS
/dev/hde2 10792 14945 33366973+ 7 HPFS/NTFS
[smollica@localhost smollica]# fdisk -l /dev/hdf

Disk /dev/hdf: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdf1 * 1 13 104391 83 Linux
/dev/hdf2 14 14692 117909067+ 83 Linux
/dev/hdf3 14693 14946 2040255 82 Linux swap

and, finally, I also included the output of my `grub-install` command:

[smollica@localhost smollica]# grub-install /dev/fd0
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'.

# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hde
(hd1) /dev/hdf

Thanks again,
Scott

hard candy
08-08-2003, 06:46 AM
Same layout as mine:
title=RedHat 2.4.20-8
root (hd1,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hdb1 hdc=ide-scsi hdd=ide-scsi
initrd /boot/initrd-2.4.20-8.img

See where I had to point the root to /dev/hdb1?
That is probably what you need. Good luck.

smollica
08-08-2003, 11:35 PM
I tried changing my kernel parameters as suggested with the same result.

Since my two harddrives are hde and hdf, and I use a boot partition, /boot, I chaned the kernel parameter from "root=LABEL=/" to "root=/dev/hdf2" (I believe this means my root is on the second partition of my second drive). I also corrected my "hdc=ide-scsi" to "hde=ide-scsi hdf=ide-scsi". Thanks for the suggestion.

Still looking for more help.

Scott

hard candy
08-09-2003, 05:05 AM
"hdc=ide-scsi" to "hde=ide-scsi hdf=ide-scsi" This line is for a cdrw and cdrom. You don't want this line for a hard drive.
The line is for scsi emulation to work for the cd drives.

sarah31
08-09-2003, 05:35 AM
in the section of your menu.lst that said LABEL put the path to your root partition (as mentioned earlier). for your "/boot/vmlinuz" change it it to "hd(1,0)/vmlinuz" (that is if your boot partition is the first partition of the second drive 1,1 if it is the second partition)
grub is sometimes stupid when it comes to having it in a separate /boot partition.


kernel hd(x,x)/vmlinuz-2.4.20-8 ro root=/dev/hdf1 hdc=ide-scsi

smollica
08-09-2003, 11:16 PM
Tried changing by kernel command to be explicit as recommended `kernel hd(x,x)/vmlinuz-2.4.20-8 ro root=/dev/hdf1 hdc=ide-scsi' with the same result. Thanks for the tip regarding `hdc=ide-scsi`

After altering the grub command line for the above kernel command I get the following response after selecting my Linux installation from the grub menu:

" Booting 'Red Hat Linux (2.4.20-9)'

root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
kernel (hd1,0)/vmlinuz-2.4.20-8 ro root=/dev/hdf2 hdc=ide-scsi
[Linux-bzImage, setup=0x1400, size-0x11098a]
initrd /initrd-2.4.20-8.img
[Linux-initrd @ 0x37fcc000, 0x23c23 bytes]"

From the preceding output it appears the kernel and initrd commands are both loaded to memory before the boot process freezes.

I believe the next step is for Linux to mount a ramdisk, decompress the initrd image and execute a script on the ramdisk.

Any thoughts?

mdwatts
08-10-2003, 06:37 AM
Is hdf1 the /boot partition and hdf2 the '/' root?

Then try

root (hd1,0) /vmlinuz-2.4.20-8 ro root=/dev/hdf2 hdc=ide-scsi
initrd (hd1,0) /initrd-2.4.20-8.img

smollica
08-10-2003, 10:36 AM
That's correct, hde is my windoze drive and hdf is for Linux. My boot ( /boot) partition is hdf1 and my root (/) partition is hdf2.

I tried altering the kernel and initrd commands to explicitly describe the location of my images. I believe the kernel and initrd images are where they are supposed to be, and loaded, however, I don't believe my installation is taking the next step which seems to involve mounting the initrd.img to a ramdisk and continuing the boot process.

Scott

lhm0155
08-10-2003, 10:56 AM
did you try specifying the absolute path for the vmlinuz as in /boot/vmlinuz instead of /vmlinuz assuming of course your vmlinuz and initrd files are under the /boot dir structure??

mdwatts
08-10-2003, 03:14 PM
Originally posted by lhm0155
did you try specifying the absolute path for the vmlinuz as in /boot/vmlinuz instead of /vmlinuz assuming of course your vmlinuz and initrd files are under the /boot dir structure??

You cannot use the absolute path if /boot is a separate partition.

/vmlinuz-2.4.20-8 and /initrd-2.4.20-8.img are correct.

smollica... Do you have another kernel version you can try instead of 2.4.20-8?

Either that or try installing Grub in the mbr of hde and boot directly from HD instead of floppy.

smollica
08-12-2003, 09:43 PM
Tried to use absolute paths to my kernel and initrd files. and it didn't work. That said. I thoroughly believe that grub is not having a problem locating these files, see the following output I see after selecting Linux in grub:


root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
[Linux-bzImage, setup=0x1400, size-0x11098a]
initrd /initrd-2.4.20-8.img
[Linux-initrd @ 0x37fcc000, 0x23c23 bytes]"



Notice that, what appears to be, the memory location and length of the loaded files.

I believe the problem begins after loading initrd.img. The ramdisk should be mounted, decompressed and control should be handed-off to a boot script (?). Instead, Linux freezes after displaying the above message.

Scott