LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-13-2012, 02:07 PM   #1
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Rep: Reputation: Disabled
Question Custom kernel 3.2.10 problems


I'm officially stumped. I want to get Linux 3.2, but my distribution uses 2.6. So, I'm trying to compile my own kernel.
This is the first time I've tried anything of the sort. I've used Linux for a few years, but I'm no programmer.
My computer is 64-bit, if it makes a difference.

When I try to boot my newly compiled kernel, I get some errors. I forget what it says exactly, but it's along the lines of this:

Kernel panic! Unable to mount root filesystem. Something about not syncing V-something.

I need to take a picture of the screen, but my camera is AWOL.
Booting the kernel that came with my distro works fine, otherwise I wouldn't be able to post this without a LiveCD or something. But my 3.2.10 kernel is at the top of the boot order, so I have to watch out while booting.

Any ideas on how to fix this? I've verified that it's trying to mount the right partition, /dev/sda6. I've run update-grub as root, and no change.

Do I need to compile a new kernel? Version 3.2.11 came out since I started, too. After all, I might have messed up the configuration.

Any help is greatly appreciated.
 
Old 03-13-2012, 05:59 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
You either left out some important modules or support or something else is wrong. Exact error messages though are helpful. Just write down the error message if you can't take a picture and post it.

Also, edit your grub to default back to your good working kernel so you don't have to keep selecting it at reboot.
 
Old 03-13-2012, 06:55 PM   #3
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by trickykid View Post
You either left out some important modules or support or something else is wrong. Exact error messages though are helpful. Just write down the error message if you can't take a picture and post it.

Also, edit your grub to default back to your good working kernel so you don't have to keep selecting it at reboot.
I think it's very likely I left out something important. I just went with the defaults on everything, so it's probable that I overlooked something.

The problem isn't fixed by upgrading to version 3.2.11. That supports the missing module theory.

Yeah, I should write the error message down. I'll reboot and do that after posting this, and I'll edit this message with the result. I did locate my camera, and took a picture, but I could only fit so much of the message on it. So, I zoomed in on what I thought the most important:

http://i43.servimg.com/u/f43/16/73/49/25/panic10.jpg

Is it possible to add modules to the kernel? Or will I have to compile again? For that matter, which modules do I need to add?

Grub Customizer doesn't work on my system for some reason, and I don't know of any other way of editing boot order. But I don't reboot my computer too much, so it won't be much of a problem, for now at least.

Thanks for your help.
 
Old 03-13-2012, 07:03 PM   #4
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,453

Rep: Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506
Quote:
Originally Posted by Ryan Hoots View Post
I'm officially stumped. I want to get Linux 3.2, but my distribution uses 2.6. So, I'm trying to compile my own kernel.
Ok so what distribution is this for? Yo don't give much information to help you with. Your member profile says various but your user agent says Ubuntu. If its for Ubuntu you can use Backports and update to 3.something (I'm not sure what Ubuntu backports is offering now but I do know they are in the 3.x series).

If it is for "various" google "How to compile a kernel for {distibution}".
 
Old 03-13-2012, 07:20 PM   #5
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
Ok so what distribution is this for? Yo don't give much information to help you with. Your member profile says various but your user agent says Ubuntu. If its for Ubuntu you can use Backports and update to 3.something (I'm not sure what Ubuntu backports is offering now but I do know they are in the 3.x series).

If it is for "various" google "How to compile a kernel for {distibution}".
I'm using Ubuntu 10.04.4 LTS. I said "Various" because I work with a lot of distros in my daily life, but it's mostly Ubuntu. Even then, I have to work with 10.04, 10.10, and 11.10. So really, I work with everything.

Sorry about not providing enough information... I'm new to custom kernels, so I have no idea what you need to know... so, here's a bunch of information, I'm not sure what's relevant, hopefully it will help:

It's a Dell Inspiron N5040 laptop, dual booting Ubuntu 10.04 (with Linux 2.6) and Linux Mint 12 (with Linux 3.0). I have gcc installed on both OSes, because I'm learning C. The computer has an Intel Core i3 four core processor. Four gigs of RAM.

Here's the error message:

Code:
Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(0,0)
and

Code:
Pid: 1, comm: swapper/0 not tainted 3.2.11
The rest of the error is a mix of letters and numbers. That's the part in the image in my previous post.

EDIT:
I did some research, armed with the error codes. Here's the most relevant I've found:
Quote:
Originally Posted by Dankles View Post
I'm geting this error message at startup:
"kernel panic - not syncing : VFS: unable to mount root FS on unknown-block"
I just upgraded from kernel 2.4 to 2.6, then this happend.
any suggestions?
Quote:
Originally Posted by Dankles View Post
I'm and idiot!! The problem was in lilo, i asumed that my loader was pointing to hda3; when in reality it was pointing to hda1
Thanks for your timely help!
This suggests that it's not loading the right partition. I'll double-check it again. Edit: Double and triple checked, it's the right partition. All boot options are the same as the working kernel, too.

Last edited by Ryan Hoots; 03-13-2012 at 08:48 PM. Reason: Did some research, new data.
 
Old 03-13-2012, 09:39 PM   #6
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,453

Rep: Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506
Read this blog post on how to compile your own kernel, be sure to also read the comments.
 
Old 03-14-2012, 01:34 AM   #7
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Squeeze, Wheezy
Posts: 244

Rep: Reputation: 46
Some module is missing for your root filesystem. Are you using initramfs? One option is to get get a copy of a config file from a working live cd / working installed linux for that computer: Try /proc/config.gz or /boot/config.xx. Once you have a configuration that works, you could slowly start removing modules that is not required. Another is to use lsmod on a working live cd to see which modules are used.

From memory you should have the correct modules selected in at least these areas:
SCSI disk support
Serial ATA and Parallel ATA drivers
Files systems: ext2,3,4
+PCI support


Regards,
Stefan

Last edited by propofol; 03-14-2012 at 01:37 AM.
 
Old 03-14-2012, 09:07 AM   #8
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by propofol View Post
Some module is missing for your root filesystem. Are you using initramfs? One option is to get get a copy of a config file from a working live cd / working installed linux for that computer: Try /proc/config.gz or /boot/config.xx. Once you have a configuration that works, you could slowly start removing modules that is not required. Another is to use lsmod on a working live cd to see which modules are used.

From memory you should have the correct modules selected in at least these areas:
SCSI disk support
Serial ATA and Parallel ATA drivers
Files systems: ext2,3,4
+PCI support


Regards,
Stefan
Of course... Linux couldn't mount the root filesystem if it didn't have ext4 compatibility. But one would think that's standard...

I'm not sure I understand your proposed solution. Are you saying that I should copy modules from /lib/modules? I think that would work, only problem would be compatibility with a certain version of Linux.

The LiveCD idea is a good one... find a Linux 3.2.11-running CD somewhere, and copy modules from it.

Quote:
Originally Posted by k3lt01 View Post
Read this blog post on how to compile your own kernel, be sure to also read the comments.
Thanks, that link will be helpful.

I'm really only trying to get the latest kernel to geek out, and for bragging rights.

I think a LiveCD with a 3.2.11 kernel would be hard to find... I'm going to try compiling it again using the steps in the above link. And if I get it done by six tonight, I can tell my friends all about it.

Thanks for your help so far, guys. I would have never figured this out, even with Google.
 
Old 03-14-2012, 09:24 AM   #9
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
You can also usually go back and add missing modules without recompiling from the beginning as well. I've gone back to my config, added what modules I needed and then started at the make modules steps to compile the missing ones I needed, etc.

You may want to start from scratch though to get more familiar with it all. The first time I did a kernel compile manually, I went through every single option, if I wasn't sure what it was for, I googled it to understand more. Some are dead obvious, others aren't.
 
1 members found this post helpful.
Old 03-14-2012, 09:45 AM   #10
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by trickykid View Post
You can also usually go back and add missing modules without recompiling from the beginning as well. I've gone back to my config, added what modules I needed and then started at the make modules steps to compile the missing ones I needed, etc.

You may want to start from scratch though to get more familiar with it all. The first time I did a kernel compile manually, I went through every single option, if I wasn't sure what it was for, I googled it to understand more. Some are dead obvious, others aren't.
That sounds good.

I recompiled using the aforementioned link's steps. They didn't work, so I used my method again, this time paying more attention to module settings. It worked a lot better this time. I got the Ubuntu boot splash, but it still couldn't mount the root fs. So, looks like I just change the settings and recompile and install the modules...
Edit: Changing the configuration and recompiling and installing the modules didn't do it. I think I need to recompile the kernel specifically with support for everything. At least I have plenty of time..
Edit: Same problem. It says, "Unable to mount /dev/sda6, unsupported optional features". Looks like I need to go module hunting. I went through every option before compiling the kernel, and I selected every "optional feature" I could find when it came to filesystem support.

Last edited by Ryan Hoots; 03-14-2012 at 10:33 AM.
 
Old 03-14-2012, 04:19 PM   #11
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Squeeze, Wheezy
Posts: 244

Rep: Reputation: 46
Quote:
Originally Posted by Ryan Hoots View Post
I'm not sure I understand your proposed solution. Are you saying that I should copy modules from /lib/modules? I think that would work, only problem would be compatibility with a certain version of Linux.

The LiveCD idea is a good one... find a Linux 3.2.11-running CD somewhere, and copy modules from it.
Actually what I have in mind is that you use a live CD with the most recent kernel you can find. Use the command 'lsmod' to list the modules which are required for your hardware. Make sure to select these modules when you configure your 3.2 kernel.

Alternatively, get a copy of the config file for that particular kernel from the live cd (eg /proc/config.gz). Copy this file to the build folder of your new kernel as '.config'. Then do 'make oldconfig'.

Regards,
Stefan
 
Old 03-15-2012, 10:28 AM   #12
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by propofol View Post
Actually what I have in mind is that you use a live CD with the most recent kernel you can find. Use the command 'lsmod' to list the modules which are required for your hardware. Make sure to select these modules when you configure your 3.2 kernel.

Alternatively, get a copy of the config file for that particular kernel from the live cd (eg /proc/config.gz). Copy this file to the build folder of your new kernel as '.config'. Then do 'make oldconfig'.

Regards,
Stefan
Ah, I see... finding a kernel config file. Now the hard part of finding a Linux 3.2.11 liveCD. I'll report back when I find something...
 
Old 03-15-2012, 12:42 PM   #13
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,453

Rep: Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506
Quote:
Originally Posted by Ryan Hoots View Post
Ah, I see... finding a kernel config file. Now the hard part of finding a Linux 3.2.11 liveCD. I'll report back when I find something...
You should already have usable config files on your system that you can use as a basis for your new kernel. Getting one of a live cd is pretty much like getting one off your current system.
 
Old 03-15-2012, 12:54 PM   #14
Ryan Hoots
Member
 
Registered: Sep 2011
Location: Indiana, USA
Distribution: Ubuntu, Fedora, Linux Mint, Debian
Posts: 35

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
You should already have usable config files on your system that you can use as a basis for your new kernel. Getting one of a live cd is pretty much like getting one off your current system.
I looked in /proc, there's no config.gz file there. Any idea where I might find the file needed?

By the way, I used apt-get to upgrade to the 3.0 kernel, at least until I can get 3.2. I've already noticed a lot of improvements. For one thing, the internal speakers work. They didn't in version 2.6. So, I'm optimistic.
 
Old 03-15-2012, 01:42 PM   #15
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with Slackware 14.
Posts: 2,453

Rep: Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506
Quote:
Originally Posted by Ryan Hoots View Post
I looked in /proc, there's no config.gz file there. Any idea where I might find the file needed?

By the way, I used apt-get to upgrade to the 3.0 kernel, at least until I can get 3.2. I've already noticed a lot of improvements. For one thing, the internal speakers work. They didn't in version 2.6. So, I'm optimistic.
You didn't read that article very well. The native configs are in /boot they will have a name like config-x.x.x-x-amd64 or similar (this is off my Debian system so Ubuntu may have something like Generic in the name as well but they will start with config-

If you have never done this before you should use the native config as a basis to start with.
 
  


Reply

Tags
compile, kernel 3


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems booting custom kernel smartacus Linux - General 2 02-09-2011 11:07 PM
[SOLVED] Custom kernel problems after encrypting disk brooky9999 Slackware 15 09-18-2008 02:30 PM
Problems with custom kernel k3rnel Debian 9 03-08-2007 01:15 PM
Custom Kernel Problems Penguin of Wonder Ubuntu 13 03-14-2006 10:20 PM
problems installing custom 2.6.14 kernel (for SATA problems) Ekkume Ubuntu 0 12-29-2005 02:39 PM


All times are GMT -5. The time now is 03:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration