LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 02-28-2006, 05:58 AM   #1
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
initrd won't mount root


Hi,

I have been running FC3 with a 2.6.9 kernel. Since I updated gtk, glib and all the other major libraries and programs I figured that the kernel could do with an update as well.

I downloaded the stable 2.6.15 source code from kernel.org, configured and compiled it. No problems.

The trouble started when I tried to run it. There are several scenarios I tried. Running the kernel without initial ram filesystem turns out a "kernel panic: VFS: could not mount root filesystem on unknown-block(0,0)". When I boot without using the quiet-parameter in grub the block strangely enough becomes 33,5.

OK, no problem. In that case use a initrd. I made it using mkinitrd using the old 2.6.9 system. "tried to enforce... but no policy loaded". I found the solution was enforce=0 while invoking the kernel.

Now the kernel sais mount error 6 (along with seperate 2 and 4) every time the kernel should perform an action involving the root filesystem. Why it does this is beyond me, hence my post. I took the initrd apart, tried replacing switchroot with pivot_root and chroot, no change. The filesystem that is supposed to get mounted in the initrd is /dev/root. The errors however indicate a system error or an internal bug (since no nfs is used), not an unknown or not found fs.

Why am I getting these mount errors? And most important of all, how do I get rid of them?

thx
 
Old 02-28-2006, 09:05 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Quote:

Quote:
OK, no problem. In that case use a initrd. I made it using mkinitrd using the old 2.6.9 system.
I think that's your problem right there. You have to generate initrd from the new kernel modules. See man mkinitrd.
 
Old 03-01-2006, 01:43 PM   #3
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Original Poster
Rep: Reputation: 32
the actual command used was mkinitrd /boot/initrd-2.6.15 2.6.15.

modules are installed properly in /lib/modules, mkinitrd showed no error messages.

I tried to use the old 2.6.9 modules when playing around with the initrd the day before, but the 2.6.15 kernel would not insert them claiming "invalid format", the mount errors are new and exclusive to the usage of the initrd created with 2.6.15 newly compiled and installed modules (ext3.so and jbd.so).
 
Old 03-01-2006, 01:58 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I have a Dell at work where the SATA drivers (SCSI) were built as modules. I didn't add them to initrd, jut compiled them into the kernel and the problem went away. If your drive is SATA and using the SCSI drivers that may help.

Also, how did you configure your new kernel? Did you take the 2.6.9 .config file and run make oldconfig with your new sources? That should at least get you to the point where you can build your new initrd the with same setup the old one was.
 
Old 03-01-2006, 04:09 PM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
IIRC you have to compile ext2 and ext3 directly into the kernel; it won't boot if compiled as a module if ext2 or ext3 is on your root filesystem. See:

http://kerneltrap.org/node/1973
 
Old 03-02-2006, 04:07 AM   #6
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Original Poster
Rep: Reputation: 32
Why did the 2.6.9 kernel work? The modules got insmoded in the initrd (i'll try compiling in the support non the less, can' t hurt to try it).
 
Old 03-02-2006, 04:58 AM   #7
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Quote:
kernel panic: VFS: could not mount root filesystem on unknown-block(0,0)
The driver for your chipset / IDE-controller is probably missing
 
Old 03-04-2006, 12:03 PM   #8
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Original Poster
Rep: Reputation: 32
First of all I would like to thank everyone for your help - real nice of you people.

jomen: No, my driver is there. Its a Intel B440 Mainboard, kernel messages at boot indicate that ACPI control, APIC/Interrupt and DMA's all got activated and assigned. The driver is checked as Y in the .config file I used to last compile it.

gilead: I am using a Promise Ultra 66 SCSI card. It gets reconed at boot, becuase the kernel does find a /dev/hda after running the udev from initrd. The initrd runs fine, it just won't mount the root disk.

I used the old configs from the 2.6.9 kernel, the one delivered with the FC3 DVD. All new kernel features I answered with the selected default (mostly NO). I recreated the initrd using 'mkinitrd /boot/initrd-2.6.15.img 2.5.15', no errors. grub has been configured using the 'rhdb enforce=0' options on the kernel and the appropriate initrd. root (hd0,0), as with the prior option for the old kernel.

The kernel does boot, initrd gets mounted in ram. At the point when rootfs is supposed to get mounted, I get the errors 2,6,22 in this sequence, indicating something of a notfound NFS (or a bug) and a system failure according to the manpages.

I'm really running out of ideas.
 
Old 03-14-2006, 04:45 AM   #9
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Original Poster
Rep: Reputation: 32
I had a quite weird incident the day before. I updated my system from FC3 to FC4 (actually it messed my system up very badly, which is why I downgraded it again). The interesting thing was that after the new kernel (2.6.11) was installed by FC4, the old one (2.6.9) would no longer boot, even though the parameters and initrd remained unchanged. It showed the same mount errors as the 2.6.15 kernel does.

Might the problem have something to do with the system and not with the kernel and initrd?
 
Old 03-14-2006, 05:02 AM   #10
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
I wouldn't think so. You fell back to kernel 2.6.9 though it wasn't necessary. Never mind, now that you try boot off, does initrd reports on any unresolved symbols ? Are you using that same initrd which you'd used for 2.6.9 ? Did you change the partition layout in someway ?

Try to create a new initrd image and boot with that image. If it doesn't work provide info on your HD interanl/external, partition layout and what drivers are required for your HD and also post the linuxrc script from the initrd.
 
Old 03-14-2006, 05:06 AM   #11
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
Why don't you try it without an initrd - to rule out a possible failure?
I read something similar in a thread about debian - they changed the filesystem used for the initrd from cramfs to initramfs.
It is here.
 
Old 03-19-2006, 06:07 AM   #12
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Original Poster
Rep: Reputation: 32
tried, unknown block (0,0)
 
Old 03-19-2006, 06:44 AM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Unless I'm severely mistooked, that says you can't talk to your hard drive - look to make sure you have chipset and filesystem included.

Did you pick up the .config for the previously working kernel ???.
 
Old 03-19-2006, 06:46 AM   #14
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
I'm sure you checked this already - this will be my last guess...
If you do it without an initrd you need to make sure that support for your / filesystem is compiled into the kernel - this cannot be a module.
Also the driver for your harddisk cannot be a module - as well as the driver for your chipset.
You said the kernel finds a /dev/hda on boot but you also say you have it on a Promise Ultra 66 SCSI card - I don't know what to check but to be sure compile both scsi and ide-support in.
 
Old 03-21-2006, 02:16 AM   #15
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Original Poster
Rep: Reputation: 32
That's ok jomen, I think I'm gonna stick with my old kernel. Anyways, I recompiled the new one yesterday. Heres a full summary:

Forst off, I'm using FC3 with the 2.6.9-1.667 kernel (precompiled with distro). I downloaded the new 2.6.15 kernel, stable, md5sum matches.
So,

make clean, make mproper, make depend (apparently obsolete).

Then I copied the config-2.6.9-1.667 file from the old kernel to .config of the new.

make bzImage, make modules, make modules install.

Next I created a new initrd image:

mkinitrd /boot/initrd-2.6.15.img 2.6.15

No errors. I copied the arch/i386/boot/bzImage to /boot/vmlinuz-2.6.15, the system.map to /boot/System.map-2.6.15, .config to /boot/config-2.6.15.

Next comes grub. A little info about the PC i'm using. Its a iBX440 mainboard, Pentium II processor at 392Mhz, Promise Ultra 66 SCSI controller. DVD-drive is /dev/hda, prime HDD at /dev/hde (root partition at /dev/hde5, boot at /dev/hde1, major/minor of root is 33,5).
Grub entry is:

title Fedora Core 3 (2.6.9-1.667)
root (hd0,0)
kernel /vmlinuz-2.6.9-1.667 ro rhgb root=LABEL=/ quiet
initrd /initrd-2.6.9-1.667.img
title FC3 2.6.16
root (hd0,0)
kernel /vmlinuz-2.6.15 ro rhgb root=LABEL=/ quiet
initrd /initrd-2.6.15.img


When booting with the new kernel I get the SElinux error message "policy requested but no [something] loaded" (sorry, don't remember it by heart). Overwriting this problem with the boot parameter enforce=0 leads to the loading of the initrd, but initrd can't mount the root partition giving 'error 2 on ext3', then 'error 4 on none', kernel panics.
Without initrd the kernel claims it can't mount root filesystem because it can't open an initial console - again, the kernel panics. If I pass the 'quiet' option without defining initrd, the error message claims that the kernel could not mount root fs, unknown block(0,0), which is weird because during compile, the rootfs was set to (33,5). I have tried omitting the 'root=LABEL=/' parameter, but again that only leads to an initial console not being opened.

All devices are recognized correctly during boot (types and stats of harddisks are displayed if the 'quiet' option is omitted), motherboard components (ACPI, APIC/Interrupts, DMA) are displayed and assigned.

Pehaps an interresting phenomenon. When I updated to FC 4, which installed the 2.6.11 kernel, I tried to boot on the 2.6.9-1.667 again. At that time the old kernel would not boot either, though the parameters and initrd had remained unchanged. I am thus inclined to believe that the problem is related to SELinux (perhaps I have to define which kernels are allowed to boot? Though that makes no sense since SELinux is a kernel component). I downgraded back to FC3 because a large percentage of my software (including xfce, xmms and xine) continously crashed due to segmentation faults.

If anyone, someday, has an answer to how I make the new kernel boot, please tell me.

Again, I would like to thank everyone for their time and effort - Danke

Last edited by ichrispa; 03-21-2006 at 02:20 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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount initrd.img? sti2envy Linux - General 3 02-12-2006 08:53 PM
Trying to move the old root into /initrd ... friend3141 Linux - Software 0 10-08-2005 01:54 AM
can't mount some initrd images?! citro Linux - General 3 06-10-2005 02:36 AM
Root FileSystem from RamDisk/InitRD winklmj Linux - Newbie 1 11-24-2004 11:16 PM
Trying to move old root to /initrd... da_kidd_er Linux - General 5 02-27-2003 03:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:24 AM.

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