kernel panic - not syncing: Attempted to kill init!
I'm currently running Fedora Core 3 with the 2.6.10.770_FC3 kernel.
I wanted to take a look at Zen Linux, so I downloaded the Zen Linux Gnome live CD iso. After burning the cd, I tried it and it failed to start X. I rebooted and now I get a kernel panic when I boot FC3. Here are the last few lines of the boot process: Code:
Mounting root filesystems How do I fix this? Thanks. Kent, K5KNT |
Have you checked the md5 checksum for the ISO image? From the output I'd suggest checking that - if it's fine the reburn the image, if not the redownload the ISO then reburn.
|
Quote:
Anyway, the CD is now in my growing pile of "useless" CD's and I have reinstalled Fedora Core 3. Kent |
Sorry about that Kent - you're right, having reread the original post I got the boot up the wrong way around :o
|
FYI I'm getting this error in Mandriva 2007 also.
|
I am also having this problem with Fedora 7. I went to the Fedora-specific forum first for help, but received none. I always check my md5sums. I know the CD boots fine. It installed fine. But when booting, I get kernel panic.
If anyone could offer some possible reasons for this, that would be very helpful. |
You get kernel panic but for which reason?
It is important to know what is displayed before the kernel panic. Are you using LVM? Which file system are you using? Please post more information. Anyway, you can try to make a new initrd file with the correct setup from the boot CD (try rescue, chroot to your system and run mkinitrd) |
This message is misleading, because it implies that the problem you should be focusing upon is here, when in fact the root cause of the problem occurred earlier. The "attempted to kill 'init'" message is actually the last piston that the machine will typically cough-up before it dies ... a death caused by a message that will have occurred sooner.
The actual problem in this case is: Code:
exec of init (/bin/sh) failed!!!: 13 Code:
Oh, my! 'init' died! |
Have you tried booting into single user mode from a CD and testing the init binary and/or the /bin/sh binary? It may be something like a missing library for example.
Try booting via a CD, mount your Fedora partition and try running the /sbin/init (and also /bin/sh) on that partition to see if it gives any errors - post them here if you get any. (Just an hunch that's all! :)) |
Q: is there a way to copy the text that comes up during boot (without having to manually write it)?
|
Use the dmesg command
|
I was able to copy the following text from the boot screen:
Code:
Waiting for driver initialization. Quote:
f-t |
Unfortunately, the problem dates back from before the part of log you provided.
Indeed, "mount: could not find filesystem '/dev/root'" means that linux can not mount the root filesystem, most probably because it was not able to create the dev file, probably because some modules are missing. Could you please try to post more of the log? Also please try this : Boot from CD and select rescue mode at grub screen. Answer questions and do : Code:
chroot /mnt/sysimage near the end of it, you will see something like that : Code:
echo Creating root device. Regards Edit : note that you can boot your kernel in quiet mode (option quiet) ; it will reduce the output only to errors, so you can actually see them. |
Thanks Agrouf. I'll try booting from the CD and checking out the init file. I'll also try Jeiku's suggesiton of:
Quote:
Also, I should note that I installed with both the Fedora 7 Live CD, and the Fedora 7 Installation CD, and got kernel panic both times I tried to boot directly after installation. I can't be sure that the errors were the same, but the end result was. |
IMHO, /sbin/init won't help you because your system didn't mount the root partition, therefore it didn't access the init file, therefore the problem can't be there.
The program that isn't working is the init in the initrd file. With all respect, I don't think dmesg can help you either, since the log files are written nowhere (since the partitions are not mounted linux can't access any file, but those in the initrd because it is copied to ram by grub). If you have a live CD, you can mount your boot partition and check your initrd file. It is located at /boot ; the command : gunzip<initrd_file | cpio -i -d extracts the initrd file. We just need to know which file system (ext2? ext3? reiserfs?) you are using and on which kind of hardrive it is installed (USB? SATA? LVM? RAID? IDE?) |
This is what I got when I copied the initrd file from my Fedora /boot directory on my hard drive:
Code:
[root@localhost initrd]# cat init |
I believe your mkrootdev command is wrong
Code:
mkrootdev -t ext3 -o defaults,ro /dev/sdb5 Code:
rootdev=/dev/sdb5 mkinitrd Then edit /boot/grub/menu.lst and use your new initrd file that you have put in /boot Also check that /dev/sdb5 indeed is an ext3 filesystem. Code:
su - |
Thank you for the help -- I will try these things. Though I'm wondering why I'd have to edit menu.lst to use the 'new' initrd file. Shouldn't the mkinitrd command just overwrite the existing one?
|
You should give the initrd file to create as argument for mkinitrd.
It won't overwrite unless you specify the -f (force) option. If you feel like you won't need the old one, go ahead. |
When I tried the mkinitrd command this is what I got:
Code:
[root@localhost initrd]# rootdev=/dev/sdb5 mkinitrd btw, I checked, and /dev/hdb5 definitely has the ext3 filesystem |
Did you try from a Fedora system (liveCD or rescue CD)?
|
Yes I did use a Fedora live CD -- I was able to mount my installed partition just fine and view the contents. I copied the initrd-2.6.21-1.3194.fc7.img file to /tmp/initrd -- that's where I ran the "cat init" command to view the contents of the file. It's been a few days now, but I believe I also ran the mkinitrd command in the /tmp/initrd directory (I assumed here that once the new initrd file was created, I could copy it over to the installed partition).
I still don't understand though why it would return "command not found"... |
Hi,
I think I might have the same issue as fire-tick. Exept I installed FC7 with lvm. My system has also 2 SATA drives in raid. I installed FC7 via the boot CD and via ftp. After installation, the kernel paniced at first reboot. I think the system is stuck on "mkrootdev -t ext3 -o defaults,ro /dev/VolGroup00/LogVol00". I used the commands Agrouf provided to read into init after starting from the rescue cd. Code:
chroot /mnt/sysimage Code:
[root@localhost initrd]# rootdev=/dev/sdb5 mkinitrd I read somewhere else that you can use mknitrd with options like --with=lvm --with=raid. So I tried to Code:
[root@localhost initrd] mkinitrd --force-lvm-probe Code:
"VolGroup00" was not found |
Quote:
I'm currently on holidays and don't have access to any fedora system, but from memory, it should be in /sbin or in /usr/sbin. Save your /boot/initrd-2.6.21-1.3194.fc7 somewhere and try this : Code:
rootdev=/dev/sdb5 /sbin/mkinitrd /boot/initrd-2.6.21-1.3194.fc7 2.6.21-1.3194.fc7 If you don't have mkinitrd, copy it from the cd before chroot Code:
cp /sbin/mkinitrd /mnt/sysimage/sbin Regards |
Quote:
Quote:
Quote:
Quote:
You should copy it to /boot Quote:
Quote:
change the line Code:
vg_list="" Code:
vg_list=VolGroup00 Check that the new initrd has the correct vgchange (gunzip, cpio, cat init etc) Copy the generated initrd file to /boot Edit /boot/grub/menu.lst to use this initrd Reboot Good Luck |
I know where I screwed up before -- I missed the first part of Agrouf's post that said basically boot into rescue mode. So I booted into rescue mode, and followed all the steps. When I got to the rootdev=/dev/sdb5 mkinitrd part, I stalled for a bit, because i didn't have the right syntax. Then I did:
Code:
rootdev=/dev/sdb5 mkinitrd initrd-2.6.21-1.3195.fc7.img 2.6.21-1.3194.fc7 |
Agrouf,
I followed your instructions but I still cannot boot Fedora 7 on my system. I copied mkinitrd from /sbin. Updated vg_list which was empty with VolGroup00. I ran mkinitrd with the options previously specified. The first error I receive is: After Reading all physical volumes. This may take a while..., it takes not even a second. The system says, no volume groups found. "VolumeGroup00" not found. I shall submit my init, mkinitrd.log and mount info. Code:
#!/bin/nash Code:
Creating initramfs Code:
rootfs / rootfs rw 0 0 |
The new file I created was already in the /boot folder. I ran the dpkg and cat init command to check if the changes had been made, and indeed...
Code:
mkrootdev -t ext3 -o defaults,ro sdb5 Code:
mkrootdev -t ext3 -o defaults,ro /dev/sdb5 I think I'm going to re-install Mandriva for now. Thanks anyway to everyone for their help. I'll keep an eye on this thread to see if a resolution is reached. <EDIT: so as to not be a quitter, I'll stick it out w/ Fedora for a while. I really appreciate the fact that there is a community of folks that are willing and able to provide support> |
Quote:
I may have had guessed wrong, the problem isn't rootdev then. If you decide to persist with Fedora, please post the first error that is displayed at boot and some errors after this one if possible. If you decide to give up for the moment, that is understandable, you can always come back here later and I'll be happy to help if I can. |
Quote:
|
Agrouf,
I haven't tried booting in quiet mode yet -- I SuSE's GRUB to boot Elive and Fedora. What do I add to menu.lst to tell it to boot Fedora in quiet mode? |
the output of my pvdisplay:
Code:
--- Physical volume --- |
Quote:
example : Code:
kernel /boot/vmlinuz root=LABEL=ROOT quiet |
Quote:
Does /proc/mdstats exist? What is the output of dmraid -s? What is the output of Code:
echo dm list | nash |
Agrouf,
I booted in quiet mode, and I copied down the entire boot output: Code:
root (hd1,4) What can you make of this output? |
Quote:
Code:
kernel /boot/vmlinuz-2.6.21-1.3194.fc7 root=/dev/sdb5 quiet |
Is this software or hardware raid?
Code:
It's hardware raid. These are my BIOS settings. Code:
No but proc/mdstat exists, I suppose you ment this. Code:
*** Active Set Code:
(running in test mode). |
Success!!
I changed /dev/hdb5 to /dev/sdb5, and Fedora booted up just fine [I'm writing this from Fedora] -- Thanks Agrouf for pointing that out!! I think I had tried that earlier, before I created the new initrd file, so I forgot all about that one...
I'm glad I stuck with it a bit longer. I knew Mandriva worked, but I really wanted to give Fedora a try. I liked what I saw with the live CD. |
Congrats fire-tick, I'm glad for you. Have a happy fedora experience.
Sanoj21, I suspect /dev/mapper/via_cghfdbhccbp4 is not generated and therefore vgscan doesn't find your pv. I suggest adding the line "find /dev/mapper" after dm create and just before the vgscan in init You can also try regenerating devs with mkblkdevs before vgscan. Extract your initrd with the usual gunzip|cpio to /tmp/initrd, edit init and then you can regenerate initrd with Code:
rm /tmp/initrd/initrd* (boot in verbose mode to see the result of find) You probably need some raid drivers from via? check "lsmod | grep via" and "lsmod | grep raid" |
Had similar problem. Try checking and/or editing the /etc/ftab file. Also the grub configuration file. What might have happened is that the attempt to run Zen from the CD has altered the partion info. Did it install a swap partion or file?
|
All times are GMT -5. The time now is 02:34 AM. |