LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-01-2005, 08:44 PM   #1
Tons of Fun
Member
 
Registered: Dec 2004
Location: Orlando, Florida
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382

Rep: Reputation: 37
Compiling kernel = kernel panic


After over 6 months of learning Debian, I finally got my first kernel panic. I finally decided to compile a kernel. I downloaded the latest kernel, 2.6.12.2, and followed "The Very Verbose Guide to Updating and Compiling Your Debian Kernel" article from Clinton De Young from www.osnews.com.
After the kernel compiled without any errors, I installed the kernel. It seemed to install OK, I didn't see any errors. I rebooted, selected the new kernel (using Grub), and saw the kernel panic. The last three lines were:

VFS: Cannot open root device "hda1" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs

Does anyone know what I did wrong and how I can fix this? I'm completely stoked that I got the kernel to compile. Now if I can get it to boot, it'll make my day.

Thanks,

 
Old 07-01-2005, 08:47 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Did you include the correct file systems when your compiled the kernel?
 
Old 07-01-2005, 08:48 PM   #3
Tons of Fun
Member
 
Registered: Dec 2004
Location: Orlando, Florida
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382

Original Poster
Rep: Reputation: 37
I selected ext2 and ext3.
 
Old 07-02-2005, 11:07 AM   #4
mentalwindex
LQ Newbie
 
Registered: Jul 2005
Distribution: knoppix/debian GNULinux
Posts: 1

Rep: Reputation: 0
Re: Compiling kernel = kernel panic ? Does this help?

Hi,

Some of your error messages remind me of some of my early warnings.

I am also fairly new to Linux, so what I have to say might be obvious, or might even be wrong for your situation. But I present it in the hope that it could be both true and non obvious, if not for you, then at least for someone reading this.

Quote:
The last three lines were:

VFS: Cannot open root device "hda1" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs
When I first loaded Knoppix, the friend who lent (gave) it to me showed me a few quick cheat codes (ie, command line arguments ) to either modify or mollify your installation . . . that is to say, some of these codes are shortcuts to optimize your setup, such as screen resolution, others might be necessary to get the OS to run at all! (This is kernel Panic. The first time my screen spewed out those words, I panicked too!).

Try typing this when the command loader thing loads (if you have a magic word here like *Linux* type that and separate every other argument with regular, single spacebar type spaces) colon, break, break.

Code:
 Linux [or whatever] [space] root=/dev/hda1
That is assuming that your main (or first or only) hard drive is partitioned and you are attempting to load the . . . well. the root file system . . . onto Hard Drive A, Partition One.

With Knoppix my friend showed me that I had to type in the word knoppix, followed by [arguments] or what could also be called Commands or Parameters or Options, but are in fact called Arguments. Some are helpful, some are useful, and a few are absolutely necessary, like this onetime designating of the Target location for the as yet non existent Root (of the) File System.

So, one word or no word (like Linux or Knoppix) followed by a SPACE followed by this short equation, which, somewhat like many shell environments, must have no Internal Whitespace but have a space on either side. I dont know if each no whitespace Statement is called an Expression or what, but thats the rule. You can also say just 1024x768 or suchlike to call up your screen rez, and yes, all these command line parameters can be put in a file and read automatically at boottime but I havent gotten that far myself yet.

But this first equation must say ROOT EQUALS SOMEPLACE and put the Someplace in the hardware abstraction layer language which calls any thing a Device and abbreviates Device as DEV. So if your root file system is going to be on Partition Number The First, you tell the startup script, in no uncertain terms, and without spaces,

Code:
root=/dev/hda1
And so it will be.

Like I said, you may have figured this out in less time than it took me to type this. Or, your system may have deeper issues which this little fix wont solve. But as I said, this may help somebody.


Free as in love, virii and all.

<{ )}>

someone stole my dots and dogeshes, no Colon, no quotation marks, no eyes for my smiley!
 
Old 07-02-2005, 12:50 PM   #5
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
I see a couple of possible sources of problem...

It is possible that you have indeed forgotten to include support for you root filesystem to the kernel. Alternatively you have chosen root filesystem support as a _module_, which is probably not enough. It is better to have it compiled statically to the kernel, than as a module. I doubt there is any way you can load the module before mounting the root filesystem.

Second possibility is that you have wrong root partition in your bootloader. Check that all settings - excluding the kernel image name - are similar or same as in your working kernel.
 
Old 07-02-2005, 01:59 PM   #6
Tons of Fun
Member
 
Registered: Dec 2004
Location: Orlando, Florida
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382

Original Poster
Rep: Reputation: 37
I am real new at this, first time I ever tried to compile. How do I know if I forgot to include support for the root filesystem? I removed everything in the filesystem except ext 2 and ext 3. Was there something else I need to look for? As for the bootloader, I am using Grub. Where is the configuration file for that?

Thanks for the suggestions, maybe one of these will fix the problem.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling kernel 2.6.13.3: panic! Mr.Bloom Linux - General 7 10-21-2005 05:42 PM
Kernel panic after compiling - Hoarx MarioT Ubuntu 1 06-08-2005 05:14 AM
Kernel panic after compiling 2.4.29 ? gnirtS Debian 8 03-15-2005 10:08 AM
Kernel panic after compiling 2.4.26 alantang Linux - General 4 02-01-2005 02:51 PM
Compiling Pentium4 Support Gives Kernel Panic activematrix Linux - Hardware 12 05-17-2003 07:12 AM

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

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