LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-21-2012, 11:11 AM   #1
shree24985
LQ Newbie
 
Registered: Jan 2009
Location: Mumbai
Distribution: slackware
Posts: 15

Rep: Reputation: 0
Assistance compiling 3.2.1 kernel


Hello guys,

I am running a slackware13.37 64 bit. I downloaded a linux 3.2.1 kernel from kernel.org and compiled it with default options and an initrd. Now when I try to boot from the kernel it gives a kernel panic and gives message which says some error in loading ext4.ko.

The logs are
...
Loading kernel modules from initrd image:
using /lib/modules/3.2.1/kernel/fs/ext4/ext4.ko
insmod: not configured to support older kernels.
....
ERROR: /dev/sda1 on /mnt failed. No such device...

I can see that while loading the initrd the insmod is failing, Would it be something to do with the 3.X range of kernels. Please let me know if there is something that i am doing wrong.

Thanks
Shridhar
 
Old 01-21-2012, 11:21 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
You need to update/rebuild your initrd. It contains modules from the older kernel, so when the initrd script tried to load the necessary modules to mount the root file system, this happens:
insmod: not configured to support older kernels.
 
Old 01-21-2012, 11:25 AM   #3
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
Here's a guide to building a kernel, adapt the release numbers to suit:
http://alien.slackbook.org/dokuwiki/...kernelbuilding
 
Old 01-21-2012, 11:28 AM   #4
shree24985
LQ Newbie
 
Registered: Jan 2009
Location: Mumbai
Distribution: slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Hello Olmy,

I had a stock kernel initially which did not have a initrd. I built this new kernel 3.2 and an initrd with it.

command used:
mkinitrd -c -k 3.2.1 -m mbcache:jbd:ext4 -f ext4 -r /dev/sda1
"-c option wipes out the existing initrd if at all it exists"

is there anything more that i need to do.
 
Old 01-21-2012, 11:42 AM   #5
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
That is a bit odd. Your mkinitrd parameters seem perfectly fine, including "-k 3.2.1". Did you run "make modules_install" before running mkinitrd? And you didn't build the 3.2.1 kernel with a custom suffix?

Take a look in /boot/initrd-tree/lib/modules. There should be a "3.2.1" subdirectory containing the modules for the 3.2.1 kernel.

Last edited by Ser Olmy; 01-21-2012 at 11:43 AM.
 
Old 01-21-2012, 02:03 PM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
when you built your kernel did you use the one of the config files from /boot or did you just download and untar the 3.2 kernel and go from there. Most problems with booting a newly compiled kernel involves not having all the drivers/items built directly into the kernel or as modules. To get a kernel to boot without an initrd your need the filesystem your using and drivers for you hard drive controllers built into the kernel. When you built your kernel did you select ext4 under the filesystem section and the correct drivers for your hardware. Without knowing what kind of hardware you have and what your did or did not build into your kernel, there is not very much advice any one can really give you. The thing about building a kernel is that you have to know your hardware and what filesystems you will be accessing.
 
Old 01-23-2012, 04:59 AM   #7
shree24985
LQ Newbie
 
Registered: Jan 2009
Location: Mumbai
Distribution: slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Hello,

I was using existing config file "2.6.29.6-generic", may be as you said some hardware drivers were missing. So tried out with config file of "2.6.19.6-huge" without any changes and it worked. Will go backwards now and try and remove unwanted modules etc.

Thank you guys for all the help. Its a lovely community :-)

Shridhar Shetty
 
  


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
[SOLVED] Need assistance in getting kernel 3.0 modules setup... ramkatral Slackware 13 08-16-2011 12:57 PM
[SOLVED] Assistance in compiling an old version of gcc with a newer one Ztif Linux - Newbie 2 07-01-2011 12:01 PM
Compiling kernel for the first time need some assistance badgerbox76 Linux - Newbie 10 01-11-2006 09:01 AM
Kernel Assistance DigiCrime Linux - Software 13 11-01-2005 12:37 PM
Young studant in need of assistance with c compiling using gcc madh@ter Red Hat 3 08-09-2004 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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