Re: boot problems - initrd
"Keith Mastin" <[email protected]>
| Newsgroups | gmane.linux.redhat.release.enigma |
|---|---|
| Message-ID | <[email protected]> |
Hi Jeremy, > Hello, > > After forgetting my root password and trying to boot into single user > mode under Red Hat 7.2 Pro (boxed retail set) I have run into a kernel > panic. In grub I edited the boot commands to include "kernel /boot/.... > single". Immediately after doing this the system failed to boot with the > error message "kernel panic: no init found. Try passing init= to > kernel". (Previously the machine had run just fine and had been up for > over 150 days). After the first failure I tried adding any combination > of "single", "-single", "s", and "-s" I could think of, and changed > their position in the command (first/last parameter, appended "single" > to other commands including initrd line). Nothing could get me into > single user mode, I never got past the kernel panic. I also tried > passing init= as a kernel argument with the path listed on the "initrd" > command. I eventfully booted to rescue mode from a RH 7.2 install disk > and got my password changed. However, I am still unable to boot from the > hard drives. (In a software RAID 1 config) There's alot of information here... thanks :) Can you give us a little more? Dual or single cpu, kernel version? Filesystem layout, contents of fstab? For future reference, there is a way around losing or forgetting your root password. Add your username to the wheel gorup, and edit the pam.d/su file so only your user can su root and is implicitly trusted (uncomment the two lines referencing the wheel group in the su file). Then you can just "su -" into root without a password, but only as that user. > My grub.conf file contains the following: > root (hd0,0) > kernel /boot/vmlinuz-2.4.7-10 ro root=/dev/sda1 > initrd /boot/initrd-2.4.7-10.img > > ( I set the file back to exactly how it looked when I started, any > changes I made were always lost after having to reboot) Have you tried uninstalling grub and running lilo? (make a backup of grub.conf first) > Also of interest is an error that occurred just before the kernel panic. > It read "pivotroot: pivot_root(/sysroot, /sysroot/initd) failed:2". Does > anyone know what the "2" error code indicates? I cannot find this > anywhere in any documentation of pivot_root. It seems to be a rather > obscure function in the first place. Best to check with the folks at kernel.org on this for the best advise. The kernle and init processes are complex. >>From research I have done online, I have found other posts mentioning >> this exact problem. However, none of them have any solutions. It was >> suggested that this may be due to file system corruption. I doubt this >> is the case as I can mount my software RAID 1 drives from rescue mode >> and read/write all the files just fine. Everything seems to be intact. >> I have not run fsck but I will do that ASAP. Well, everything listed maybe, but there is still the mbr that can get corrupted too.... > > I have gotten my hands on the latest RH 8.0 ISOs. Could upgrading from > 7.2 to 8.0 cure my woes? Would this just preserve the hardware/device > misconfiguration? A new kernel might improve it in any event. <snip> Good luck -- Keith Mastin BeechTree Information Technology Services Inc. Toronto, Canada (416)696 6070