Bug 110

Summary: Current bk Linux-2.5, VFS Kernel Panic from Devfs + NO UNIX98_PTYS
Product: File System Reporter: Mohamed El Ayouty (mae)
Component: devfsAssignee: Bugme Janitors Team (bugme-janitors)
Status: CLOSED CODE_FIX    
Severity: normal CC: tmokros
Priority: P2    
Hardware: IA-32   
OS: Linux   
Kernel Version: Subsystem:
Regression: --- Bisected commit-id:
Attachments: Kernel configuration: unable to mount root with DEVFS compiled in

Description Mohamed El Ayouty 2002-11-20 15:32:33 UTC
(Please check that the problem happens on Linus' tree if not then file under the
Alternate Trees category.)
Exact Kernel version:Current Linus' Bitkeeper tree
Distribution: Gentoo
Hardware Environment: Dell Dimension Pentium 3
Software Environment: gcc-2.95.3
Problem Description:
Steps to reproduce:
If the kernel is configured with:

CONFIG_UNIX98_PTYS = N
CONFIG_DEVFS_FS = Y
CONFIG_DEVFS_MOUNT = Y

at boot a kernel panic occurs with this msg:

VFS: Cannot open root device "hda2" or 03:02
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 03:02

But if I compile with 

CONFIG_UNIX98_PTYS = Y
CONFIG_DEVFS_FS = Y
CONFIG_DEVFS_MOUNT = Y

the kernel boots.
Comment 1 Jos 2002-11-26 15:24:41 UTC
Created attachment 33 [details]
Kernel configuration: unable to mount root with DEVFS compiled in
Comment 2 Jos 2002-11-26 15:25:30 UTC
Same problem here with a _heavy_ patched kernel version 2.5.49. But in my setup
the kernel is unable to mount root even with CONFIG_UNIX98_PTYS=y. Tried two
kernel configurations only differing in CONFIG_DEVFS_FS being set or unset, and
I get the following:
# CONFIG_DEVFS_FS is not set => kernel boots OK

CONFIG_DEVFS_FS=y => kernel panics trying to mount root
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set

The differences in the kernel configuration files are as follows:
--- /tmp/config-KO      2002-11-27 00:09:31.000000000 +0100
+++ /tmp/config-OK      2002-11-26 23:55:00.000000000 +0100
@@ -816,9 +816,7 @@
 # CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
-CONFIG_DEVFS_FS=y
-# CONFIG_DEVFS_MOUNT is not set
-# CONFIG_DEVFS_DEBUG is not set
+# CONFIG_DEVFS_FS is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_ROMFS_FS is not set

I am about to create an attachment with the kernel config that fails to mount
root, just for reference. If there is interest to repeat the test with unpatched
kernel sources, I will do.
Comment 3 Dave Jones 2002-12-13 05:16:34 UTC
Read http://www.lkml.org/archive/2002/12/13/50/index.html

Does that fix your problem too ?

Comment 4 Jos 2003-01-10 13:48:48 UTC
Sorry for the one month long delay :-(. I have just tried the same configuration
with kernel versions 2.5.54 and 2.5.55 (devfs compiled in, but not automatically
mounted at boot). 2.5.55 boots ok with no workarounds needed, but 2.5.54 fails
to mount root. Applying the "LILO append trick" in the URL Dave posted doesn't
help, though I didn't try to remove the four lines of code and recompile.