LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-12-2007, 04:19 AM   #1
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Kernel 2.6.22 + generic config = PANIC


I can't get my custom kernel to work.

I installed Slackware 12 today, on my Asus A8Js.

The "Huge SMP" kernel worked out of the box.

The "Generic SMP" kernel worked after I create an initrd for it with "mkinitrd -c -k 2.6.21.5-smp -m reiserfs -o /boot/generic.gz".

So far so good. Unfortunately, neither kernel had CONFIG_HOTPLUG_CPU enabled, which meant I would have to build a kernel before I could suspend.

So I downloaded a kernel from kernel.org (2.6.22.2). Then I configured it by copying /boot/config-generic-smp-2.6.21.5-smp to the root of the kernel source and doing a "make oldconfig." I did not alter the kernel configuration aside from accepting the defaults for options that were new. While I do plan on making changes later, I want things working on this level first. Then, after building the kernel and copying /arch/i386/boot/bzImage to /boot/vmlinuz-custom, I did a "make modules_install" and got a directory full of kernel modules at /lib/modules/2.6.22.2-smp.

Next, I created an initrd file for my new kernel, using the same steps as above, changing only the version number and the output filename (to "custom.gz").

The relevant sections of my lilo.conf looked like this:
Quote:
# This works
image = /boot/vmlinuz-generic-smp-2.6.21.5-smp
root = /dev/sda5
initrd = /boot/generic.gz
label = Generic
read-only

# This does not
image = /boot/vmlinuz-custom
root = /dev/sda5
initrd = /boot/custom.gz
label = Custom
read-only
When I booted the new kernel, I got:

Quote:
initrd.gz: Loading kernel modules from initrd image:
Using /lib/modules/2.6.22.2-smp/kernel/fs/reiserfs/reiserfs.ko
mount: mounting /dev/sda5 on /mnt failed
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
Kernel panic - not syncing: Attempted to kill init!
How can this be, when my new kernel has exactly the same configuration as one known to work?

So I tried compiling reiserfs support into the custom kernel, and booting it without an initrd. The results are below:

Quote:
VFS: Cannot open root device "805" or unknown-block(8,5)
Please append a correct "root=" boot option; here are the available partitions:
0300 117220824 hda driver: ide-disk
0301 5120000 hda1
0302 47358976 hda2
0303 50050507 hda3
0304 1 hda4
0305 10490413 hda5
0306 4192933 hda6
1640 4590208 hdd driver: ide-cdrom
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,5)
This is a SATA machine, so the above is rather strange.
 
Old 08-12-2007, 05:36 AM   #2
Tux-Slack
Member
 
Registered: Nov 2006
Location: Slovenia
Distribution: Slackware 13.37
Posts: 511

Rep: Reputation: 37
I had that same problem.
Compile ReiserFS support into the kernel, not as module and loose this initrd and you're good to go.
 
Old 08-12-2007, 10:24 AM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Original Poster
Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by Tux-Slack View Post
I had that same problem.
Compile ReiserFS support into the kernel, not as module and loose this initrd and you're good to go.
Thanks. But as I already mentioned, that didn't work for me.

I just tried building a custom kernel using the huge config. Didn't work either (same error as when I compiled reiserfs into the kernel and got rid of the initrd.

EDIT: SOLVED IT!!!!

I removed the entire ATA section except for CONFIG_BLK_DEV_IDE and CONFIG_BLK_DEV_IDE_GENERIC. It works now.

My new problem is that my screen is blank when I return from suspend (after doing an "echo mem > /sys/power/state"), even if I suspend at the console. But that's for another thread.

Last edited by dugan; 08-12-2007 at 11:18 AM.
 
Old 08-12-2007, 10:55 AM   #4
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 15
Posts: 700

Rep: Reputation: 43
I had exactly the same problem as Dugan, three times in a row: kernel panic. Still haven't got a clue what went wrong (and why), but what did work, was Alien Bob's howto: http://alien.slackbook.org/dokuwiki/...kernelbuilding
Worked for me.
Good luck!

EDIT:
A little too late...
Good that you worked it out.

Last edited by adriv; 08-12-2007 at 10:57 AM.
 
Old 08-12-2007, 12:00 PM   #5
Okie
Senior Member
 
Registered: Mar 2002
Location: Oklahoma
Posts: 1,154

Rep: Reputation: 187Reputation: 187
i prefer to build filesystem support in to the kernel itself (select "*" not a "M") when building a kernel, this makes an initrd unnecessary (i use ext3 exclusively)...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade 2.6.15 -> 2.6.16.7; identical .config;kernel panic;user error? PeteAppleton Linux - Kernel 2 08-10-2006 02:27 PM
Changing Grub config at boot to prevent Kernel panic neelay1 Linux - General 2 04-13-2006 03:13 PM
Changing Grub config at boot to prevent Kernel panic neelay1 Linux - Newbie 3 04-12-2006 03:50 PM
Changing Grub config at boot to prevent Kernel panic neelay1 Linux - Software 2 04-12-2006 03:00 PM
Compilation options in config and Kernel panic beejayzed Linux - Newbie 0 01-30-2004 04:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration