LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Custom kernel + RAID1 = Kernel Panic (http://www.linuxquestions.org/questions/slackware-14/custom-kernel-raid1-%3D-kernel-panic-892785/)

tunkaflux 07-20-2011 02:31 PM

Custom kernel + RAID1 = Kernel Panic
 
Hello,

I'm currently running Slackware64 13.37 with the 2.5.38.4 huge kernel from /testing on a RAID1 root (ext3 on /dev/md0).

I'm trying to compile a custom kernel at the moment, but whenever I try to run it, the boot process seems to hang just after the /dev/md0 messages with an error like "VFS Unable to mount root fs on unknown-block(9,0)". I'm following Alien Bob's kernel compile guide at http://alien.slackbook.org/dokuwiki/...kernelbuilding

I've compiled ext2, ext3, ext4, RAID support in the kernel and I'm currently at a loss at what I'm still missing... It's probably something stupid that I'm currently overlooking :(

Any ideas are greatly appreciated :)

mRgOBLIN 07-20-2011 04:49 PM

You'll need an initrd if you are booting from the RAID array.

tunkaflux 07-20-2011 05:21 PM

Quote:

Originally Posted by mRgOBLIN (Post 4420566)
You'll need an initrd if you are booting from the RAID array.

Do I also need one when I compile everything in the kernel? I was under the impression this was not necessary?

mRgOBLIN 07-20-2011 05:56 PM

Yes it's still needed.

tunkaflux 07-21-2011 02:58 AM

Thank you for your answer. How do I know which modules to add?

mRgOBLIN 07-21-2011 03:34 AM

run
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
If you are sure you have all kernel modules built in you may not need to specify any modules so something like this might do it.

Code:

mkinitrd -c -k 2.6.38.4 -f ext4 -r /dev/md0 -R -u -o /boot/initrd.gz
Don't forget to add your initrd line to lilo.conf and run lilo again

tunkaflux 07-21-2011 02:26 PM

How come an initrd is not needed when using the Slackware huge kernel?

According to the mkinitrd_command_generator.sh I had to use "mkinitrd -c -k 2.6.38.4-tfx -f ext4 -r /dev/md0 -m ext4 -R -u -o /boot/initrd.gz" which I did, adapted lilo, still kernel panic :(

mRgOBLIN 07-21-2011 04:12 PM

Quote:

How come an initrd is not needed when using the Slackware huge kernel?
In my experience, the initrd has been required ever since the "raid-autodetect" behaviour changed in the kernel.

The raid array is assembled in the initrd.

Looking back at your first post you said that you had "RAID1 root (ext3 on /dev/md0)." so you'd need "-f ext3" (unless that was a typo)

tunkaflux 07-21-2011 04:42 PM

Quote:

Originally Posted by mRgOBLIN (Post 4421696)
How come an initrd is not needed when using the Slackware huge kernel?
In my experience, the initrd has been required ever since the "raid-autodetect" behaviour changed in the kernel.

Hmm, strange.

Quote:

Originally Posted by mRgOBLIN
The raid array is assembled in the initrd.

How come I don't need one when I use the huge kernel? Sorry about all the questions, I'm just trying to understand how the initrd and boot process works...

Quote:

Originally Posted by mRgOBLIN
Looking back at your first post you said that you had "RAID1 root (ext3 on /dev/md0)." so you'd need "-f ext3" (unless that was a typo)

That was a typo, sorry ;-)


All times are GMT -5. The time now is 12:37 PM.