Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 10-02-2004, 09:44 AM   #1
Registered: Jul 2004
Posts: 73

Rep: Reputation: 15
kernel woes: cannot mount/find root fs

I'm trying to build the 2.4.27 kernel, with the PaX patch applied. Everything compiles and installs fine, but when I try to boot off of it, it gives me an error with modprobe, and tells me it can't mount (or find? sorry; I'm not by the machine right now) the root fs. This is, of course, a kernel panic error.

Now, I've tried reconfiguring and recompiling several times. I don't have devfs enabled, and I've mirrored all the lines in modules.dep that I believe are related to the hard drive I use (a SCSI HDD). And, GRUB is indeed pointing at all the same things that the working kernel's entry does, only with the new initrd and kernel.

I'm new to compiling Linux kernels, so I'm hoping there's just some oversight I'm not realizing. Does anyone have any hints?
Old 10-02-2004, 10:11 AM   #2
Registered: Mar 2003
Location: Belgium
Distribution: Hardened gentoo
Posts: 323

Rep: Reputation: 30
Hi, make sure you included the following in your kernel:

* scsi support
* driver for your scsi host adapter
* scsi disk support

These must be either built-in into the kernel, or built as modules and then be included in the initrd.

Let me know if it's something else that's the problem, but this is the most common problem
Old 10-02-2004, 11:53 AM   #3
Registered: Jul 2004
Posts: 73

Original Poster
Rep: Reputation: 15
I know I included SCSI support as a module, since that's what the old modules.dep shows, and I'm pretty confident that I have all the disk drivers that I need. I built the initrd with just "mkinitrd /boot/initrd-whatever.img 2.4.27-pax" -- is there anything special I need to do? I know when I was first starting out, mkinitrd failed because it didn't find the disk driver that it needed. I'm puzzled!
Old 10-04-2004, 10:44 AM   #4
Registered: Jul 2004
Posts: 73

Original Poster
Rep: Reputation: 15
Here's my output from lspci:

00:00.0 Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge (AGP disabled) (rev 02)
00:06.0 SCSI storage controller: Symbios Logic Inc. (formerly NCR) 53c875 (rev 14)
00:06.1 SCSI storage controller: Symbios Logic Inc. (formerly NCR) 53c875 (rev 14)
00:07.0 Network controller: Compaq Computer Corporation ProLiant Integrated Netelligent 10/100 (rev 10)
00:08.0 VGA compatible controller: ATI Technologies Inc 3D Rage IIC 215IIC [Mach64 GT IIC] (rev 7a)
00:09.0 System peripheral: Compaq Computer Corporation Advanced System Management Controller
00:14.0 ISA bridge: Intel Corporation 82371AB PIIX4 ISA (rev 02)
00:14.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01)
00:14.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01)
00:14.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 02)

Do I need a module for the first item? I don't really know where to look in the "make menuconfig" menu.

I'm pretty confident I've included all the SCSI modules I need. Could it be a problem with mkinitrd rather than the kernel?
Old 10-04-2004, 01:58 PM   #5
Registered: Jul 2004
Posts: 73

Original Poster
Rep: Reputation: 15
Here are the last few lines of what is displayed at boot:

ds: no socket drivers loaded!
kmod: failed to exec /sbin/modprobe -s -k block-major-8, errno = 2
VFS: Cannot open root device "sda2" or 08:02
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 08:02
Now, the entry in GRUB is identical to my working entry, save for the edits I made to point at the new initrd and kernel bzImage. So, the "root=" option should be fine.

I compiled SCSI support as a module, since that is how it appears to have been done for the working kernel. Some IDE initialization was done before those last lines, and they all seemed to go fine (e.g. the information for the CD-ROM drive was printed) Does the fix seem obvious to anyone?
Old 10-06-2004, 05:18 PM   #6
Registered: Jul 2004
Posts: 73

Original Poster
Rep: Reputation: 15
I think I have found the solution to this problem. For future reference, I'll outline it below:

Browsing for clues on Google whilst reading the help messages for various kernel configuration options, I noticed an interesting imperative in the help for minix file system support: it said that you must compile support for your root file system into the kernel itself; it cannot be a module. So, I compiled ext3 support into the kernel rather than leaving it a module, and, after rebuilding the kernel, it booted!

I haven't tried this fix on the original computer (this problem replicated on another machine), but I suspect it will work. I think it's valuable to have this solution archived, as I did not find it on the net.

It feels very good to have overcome this obstacle under my own steam. It bugged the heck out of me that I had to use the default RedHat configs to build my new kernel. I want to know why something is; not just have a fix for it. So, I'm very happy now.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW-TO: find out kernel gcc versions.... woes :S kevingpo Linux - General 8 07-19-2011 08:14 AM
Kernel Panic! could not mount root fs. Please help me out. TruongAn Linux - Software 1 10-20-2005 08:45 AM
cannot mount root fs: Kernel 2.6.6 technopasta Linux - Software 0 06-03-2004 03:45 AM
Cant mount root kernel 2.6.6 Kyl3 Slackware 10 05-23-2004 03:06 PM
Kernel 2.6.0 mount root fs killer_bunny Linux - Newbie 4 12-22-2003 06:37 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:47 AM.

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