LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Kernel panic (Debian: migrating from 2.4 to 2.6 kernel) (https://www.linuxquestions.org/questions/linux-software-2/kernel-panic-debian-migrating-from-2-4-to-2-6-kernel-286350/)

VertX 02-04-2005 05:46 PM

Kernel panic (Debian: migrating from 2.4 to 2.6 kernel)
 
I'm using Debian sarge. Migrating from kernel 2.4.27 to 2.6.10

After solving problem with VSF and root partition, I get this error:

-----------------------
pivot_root: No such file or directory
/sbin/init: 426:cannot open /dev/console: No such file
Kernel panic - not syncing: Attempted to kill init!
-----------------------

I also created initrd.img-2.6.10 with mkinitrd. Devfs is enabled on boot. Machine is laptop.
I can't find what 426 belongs to


Any suggestions?
Also, Is it possible to swith completely to udev?

linuxLuser 02-04-2005 07:27 PM

OK, my guess is that it's got to have something to do with the initrd image. You either don't have a driver that you need to have (like for the hard drive, for instance) or the the console device is missing or something. Mount the initrd:
Code:

# mount -t ext2 -o loop initrd.img-2.6.10 /mnt/initrd
or something like that and see what you have in there. You NEED /dev/null and /dev/console in order to have a sucessful boot. Looks like you're missing /dev/console. Go into the initrd and then into the dev directory. Make the device file via
Code:

# mknod -m 660 console c 5 1
# mknod -m 660 null c 1 3

I'm not too familiar with initrds but that's where you need to start. Also, be warned that I may be wrong in certain areas as I haven't done this myself. pivot_root is the process of moving / from one filesystem to another (or one partition to another) without disrupting anything else (like processes and whatnot).

I'd like to help you out more but I don't have enough experience. Just trying to point you to where I think the problem is.

-- the dudeman


PS
Quote:

Also, Is it possible to swith completely to udev?
Yes, it is...but not in all cases. Here's a quote from the udev FAQ:
Quote:

Q: How will udev handle devices found before init runs?
A: udev will be placed in initramfs and run for every device that is found.
Work to get this implemented is still underway.
So you might not want to go completely udev until the initrd is fixed up right. Also, udev does not support all devices yet and sometimes you just need to do it the "olde fashion" way and create a device file without udev deleting it!


linuxLuser 02-04-2005 07:41 PM

OOPS! You need to make /dev/null and /dev/console in your normal filesystem, not the initrd. I'm pretty sure about that.
It could be that udev just delted the device files so you have to remake them.

SOrry about that correction. Like I said, I don't have much experience in that area.

-- the dudeman

VertX 02-05-2005 02:07 AM

/dev/console & /dev/null are here, in my filesystem..

linuxLuser 02-05-2005 09:32 AM

Did you check your initrd? Mount it and check what's in there
Code:

# ls -Rl /mnt/initrd
You really do need all the device files for at least your harddrive. Or just create a new initrd
Code:

# mkinitrd initrd-2.6.10.img vmlinuz-2.6.10
assuming your kernel is called vmlinuz-2.6.10. Theoretically, mkinitrd should check what your kernel needs for bootup and put that in the initrd.

Here's some other tips that you could read.

I noticed that you had your initrd named "initrd.img-2.6.10". It could be that it has to have the same name as the kernel but just with the ".img" part on the end.

Also, what's your bootloader entry look like? I usually use Gentoo but I also have Yoper linux installed which uses an initrd and here's the entry I have for it in grub
Code:

# cat /boot/grub/grub.conf
.
.
.
# Yoper Linux
title=Yoper GNU/Linux 2.6.8.1-3
root=(hd1,1)
kernel=(hd1,1)/boot/yos root=/dev/hdb2  vga=791 splash=silent
initrd=/boot/initrd-2.6.8.1-3.img
.
.
.

I don't know if that helps any.

-- the dudeman


All times are GMT -5. The time now is 04:48 AM.