Red HatThis forum is for the discussion of Red Hat Linux.
Notices
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.
I am working on a system that should be running RedHat, either 7.3 or 8. It was working ok for a while, then it froze up in the middle of an ssh session. It did not respond to a local console connection, so it was hardware rebooted. Now it boots to a grub> prompt. When I type 'root (hd0,0)' it returns 'Filesystem is type ext2fs, partition type 0x83'. Issuing 'boot', of course, returns 'Error 8: you must specify a kernel' A subsequent 'setup (hd0,0)' returns:
Checking if "/boot/grub/stage1" exists...no
Checking if "/grub/stage1" exists...no
Error 15: file not found
The same happens when I use root (hd0,1). I'm not certain that the setup command is even what I want to use. I have tried to specify a kernel file, but I am not sure of the exact path or filename, and nothing I've tried so far has worked.
If anyone out there has any suggestions, I'd really appreciate it. Thank you.
I have tried to specify a kernel file, but I am not sure of the exact path or filename
The kernel path is relative to the "root(hd0,0)" that you specified. Therefore, if "(hd0,0)" is separate /boot partition you just have to enter the name of the kernel you want to boot preceded by a '/'. If "(hd0,0)" is a "/" partition then you will have to specify "/boot/kernelname".
To make this easier, keep in mind that grub has tab completion much like bash so:
Code:
grub> root (hd0,0)
Filesystem is type ext2fs, partition type 0x83
grub> kernel /[tab]
Possible files are [...]
grub> kernel /bzimage-2.6.19 root=/dev/hda2 [etc ...]
grub> boot
An update: I used a linux system rescue disk to boot and was able to mount /dev/hdb2 and look at the filesystem on it. /dev/hdb1 is the /boot partition and appears to be completely empty. /dev/hdb2 is missing some directories that I thought were key, like /etc. I can't find any kernel files or vmlinuz files on the filesystem. I did find a vmlinuz on a floppy disk that was hanging out of the drive. From grub> I entered:
root (fd0)
kernel (fd0)/vmlinuz
boot
It looks like it starts to boot, but when it tries to mount the root filesystem it gets a kernel panic. When I try to boot with the floppy in the drive, it looks like it starts LILO, then begins to boot and gets to a point where it says 'Warning: Cannot connect to console" and freezes up. I used the linux system rescue disk to fsck both /dev/hdb1 and /dev/hdb2, but nothing has changed. I'm suspecting a faulty hard drive, but I'm not certain as some of the particulars (e.g. being able to mount and fsck the drives) seem to point away from that.
Sounds really fouled up. Rule out the faulty HD if you can. In any event, it seems a reinstall is in order, as much as I hate to say it. The system will never boot without the files in /etc.
As for grub, the kernel panics there because you need to pass the root '/' directory as a kernel argument, ie:
Code:
kernel (fd0)/vmlinuz root=/dev/hda2
Moot point, as you don't have the needed files there, but that's how you would do it if you did
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.