LinuxQuestions.org
Review your favorite Linux distribution.
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 09-13-2009, 09:13 AM   #1
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Kernel panic on kernel compile


Hello. I'm not too familiar with slack. The way I compile kernel in gentoo or arch is rather simple, just make and modules_install does it. And then copying over bzImage and System.map to /boot. I also copied the config file just in case. However I'm getting:

Code:
kernel panic - not syncing:VFS:Unable to mount rootfs on unknown-block(3,4)
All I did was modify the default kernel and recompiled it. Didn't change anything except put my name instead of smp just to test how things are done in slack. And I did configure lilo, as it is showing in the menu.
 
Old 09-13-2009, 09:16 AM   #2
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
make sure you have got an initrd.img. if no run inside your /boot directory
Code:
mkinitrd -c -k kernel -m yourfilesystem -f yourfilesystem -r yourrootpartition
or
Code:
man mkinitrd
..

edit:i had the same issue earlier and i got it solved..visit thread
http://www.linuxquestions.org/questi...-error-753732/

Last edited by mobinskariya; 09-13-2009 at 09:20 AM.
 
Old 09-13-2009, 09:23 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

When you make changes to the '/etc/lilo.conf' then write your bootloader via the 'lilo' command.
 
Old 09-13-2009, 09:43 AM   #4
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173

Original Poster
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
>>mobinskariya

Thnx for replying, but is initrd really needed? By default I don't see any initrd image of the default kernel either. Hence I didn't create any.

>> oneBuck

yes I ran lilo after configuring /etc/lilo.conf and it gave one warning: LBA32 assuming...I can't remember the exact error. :P
Then it added Windows and the two linux kernels.

EDIT: Hi oneBuck, I saw your kernel compile guide, but they are outdated now. Would you please guide me from start how to do it in slack? Or is there already a new guide for 13? I'm going to try the new kernel 2.6.31
TIA

Last edited by ~sHyLoCk~; 09-13-2009 at 09:50 AM.
 
Old 09-13-2009, 09:51 AM   #5
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
initrd isnt needed for the huge kernel..but for the generic kernel you need one..
editlease dont ask the difference between the two kernel.me too a newbie

Last edited by mobinskariya; 09-13-2009 at 09:53 AM.
 
Old 09-13-2009, 09:56 AM   #6
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173

Original Poster
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
ok will try that after oneBuck gives me some hint to compile 2.6.31 ; hopefully :P Thnx again
 
Old 09-13-2009, 10:09 AM   #7
mudangel
Member
 
Registered: May 2008
Location: Ohio
Distribution: Slackware
Posts: 267

Rep: Reputation: 56
All you should have to do is make *config, make, make modules, make modules_install, copy bzImage to /boot/vmlinuz-whatever, ditto System.map, edit lilo.conf, run lilo. An initrd isn't necessary if you compile in the root filesystem drivers.

Last edited by mudangel; 09-13-2009 at 10:10 AM. Reason: missed an s
 
Old 09-13-2009, 10:31 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by ~sHyLoCk~ View Post
ok will try that after oneBuck gives me some hint to compile 2.6.31 ; hopefully :P Thnx again
Which guide are you referencing in post #4?

The compilation methodology is basically the same. There might be some minor semantics/syntax but generally the same for the newer kernels. Of course if you don't provide the filesystem in your kernel then you would need to create a 'initrd' and that method has been covered many times. Most distributions have the means to indicate how to create a 'initrd'. Slackware has the '/boot/README.initrd' which should be read to understand how to create the 'initrd'.

BTW, add 'lba32' to the global section of the '/etc/lilo.conf' file then run 'lilo' to update the bootloader to get rid of the warning.
 
Old 09-13-2009, 10:42 AM   #9
Ahmed
Member
 
Registered: May 2005
Location: München, Germany
Distribution: Slackware, Arch
Posts: 386

Rep: Reputation: 41
What filesystem to you have, and is the support for it built into the kernel? A mistake I did was to take the regular configuration and optimize it, but somehow oversee that ext4 support was not built into the kernel itself, but rather only as a module, conveniently stored on the ext4 partition

Kind of like locking yourself out of your car, really..

-A
 
Old 09-13-2009, 10:50 AM   #10
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173

Original Poster
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Yes but all I did was just took the default kernel's .config file and removed the -smp from append line and added -shy. Nothing else. How can that be so troublesome?
 
Old 09-13-2009, 10:54 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Quote:
Originally Posted by ~sHyLoCk~ View Post
Yes but all I did was just took the default kernel's .config file and removed the -smp from append line and added -shy. Nothing else. How can that be so troublesome?
Where did you do this? Please post example as there seems to be some confusion.
 
Old 09-13-2009, 11:04 AM   #12
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173

Original Poster
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Yes I definiely did screw something up by doing that. I just went to /usr/src/linux and make menuconfig and then did the above. So I'm guessing /usr/src/linux was symlinking to 2.6.29.6 the default kernel. Anyway, I will not be even thinkin about compiling my own kernel for a while until I get things sorted,being a newbie to slack it's not going to be easy. I'm already having problem with nvidia driver. Thanks for all your help though.
 
Old 09-13-2009, 11:13 AM   #13
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,222

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
A kernel's modules are stored in a directory on the root partition, namely /lib/modules. To use those modules, the kernel must first mount the root partition. If the root partition's filesystem driver is a module that it must mount the root partition to access, well, that won't work, will it? When you configure the kernel, you have two options. One is to specifically make sure that your filesystem's driver is compiled into the kernel, and not as a kernel module. (Don't assume it. Check it in the kernel configuration program!) The other is to compile the filesystem driver as a module, then put it in an initrd. There's a README file about this in /boot.

The huge kernel's configuration file actually does build support for most filesystems into the kernel. The generic kernel's configuration file has them built as modules.

Last edited by dugan; 09-13-2009 at 11:42 AM.
 
Old 09-13-2009, 08:31 PM   #14
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173

Original Poster
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Well I was using huge:
Code:
# file /boot/vmlinuz
/boot/vmlinuz: symbolic link to `vmlinuz-huge-smp-2.6.29.6-smp'
EDIT: Solved by mkinitrd, should have done hat earlier. Thnx for all the help.

Last edited by ~sHyLoCk~; 09-13-2009 at 10:33 PM.
 
Old 09-13-2009, 11:26 PM   #15
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173

Original Poster
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
One thing I noticed though while system bootup, that rc.d modules where still loading 2.6.29.6 modules.
Code:
$ file /etc/rc.d/rc.modules
/etc/rc.d/rc.modules: symbolic link to `rc.modules-2.6.29.6-smp'
How do I change that to my kernel's modules?
I don't have any such 2.6.31 rc modules there.
Re-EDIT: just copied the rc.modules of older kernel and created a new symlink. :P

Last edited by ~sHyLoCk~; 09-14-2009 at 08:02 AM.
 
  


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
kernel compile of 2.6.23: Kernel panic fof3 Debian 3 12-01-2007 07:35 PM
kernel compile 2.6.20 - kernel panic - SATA drive bgeddy Slackware 7 04-08-2007 07:59 AM
kernel panic after 2.6 compile drlouis Slackware 3 08-28-2006 12:20 AM
Kernel panic after 2.6.1 compile Phaethar Fedora 6 01-14-2004 10:55 PM
kernel panic after compile RIgimp75 Slackware 1 01-09-2004 07:46 PM

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

All times are GMT -5. The time now is 04:19 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