2002-12-13 03:42:26

by Rusty Russell

[permalink] [raw]
Subject: [2.5.51] Failure to mount ext3 root when ext2 compiled in

Just noticed this (usually ext2 is compiled as a module, but was
testing a patch with CONFIG_MODULES=n). Reverted to plain 2.5.51, and
it's still there:

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

Now, I have an ext3 root, but when CONFIG_EXT3_FS=y and
CONFIG_EXT2_FS=y, I get this failure. Turning off CONFIG_EXT2_FS
"fixes" it.

Hope this helps,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.


2002-12-13 04:02:10

by Andrew Morton

[permalink] [raw]
Subject: Re: [2.5.51] Failure to mount ext3 root when ext2 compiled in

Rusty Russell wrote:
>
> Just noticed this (usually ext2 is compiled as a module, but was
> testing a patch with CONFIG_MODULES=n). Reverted to plain 2.5.51, and
> it's still there:
>
> VFS: Cannot open root device "301" or 03:01
> Please append a correct "root=" boot option
> Kernel panic: VFS: Unable to mount root fs on 03:01
>
> Now, I have an ext3 root, but when CONFIG_EXT3_FS=y and
> CONFIG_EXT2_FS=y, I get this failure. Turning off CONFIG_EXT2_FS
> "fixes" it.
>

In the past year I've booted about 1,000,000,000 kernels with
CONFIG_EXT2_FS=y and CONFIG_EXT3_FS=y. Across that period,
maybe five or ten times I have seen this problem.

As soon as I get down to debug it it goes away. I once traced it
as far as seeing ext3_fill_super() return failure, then I lost it.

Rebuilding the kernel, even if you "didn't change anything" makes
it go away.

I assume that in your case a `make clean' will not fix it. You
lucky duck. Can you stick a printk right at the end of
ext3_fill_super()?

2002-12-13 14:24:44

by Wayne Willson

[permalink] [raw]
Subject: Re: [2.5.51] Failure to mount ext3 root when ext2 compiled in

I have seen the exact same problem. Turning off CONFIG_EXT2_FS fixes it for
me as well.



----- Original Message -----
From: "Rusty Russell" <[email protected]>
To: <[email protected]>; <[email protected]>
Cc: <[email protected]>
Sent: Thursday, December 12, 2002 9:48 PM
Subject: [2.5.51] Failure to mount ext3 root when ext2 compiled in


> Just noticed this (usually ext2 is compiled as a module, but was
> testing a patch with CONFIG_MODULES=n). Reverted to plain 2.5.51, and
> it's still there:
>
> VFS: Cannot open root device "301" or 03:01
> Please append a correct "root=" boot option
> Kernel panic: VFS: Unable to mount root fs on 03:01
>
> Now, I have an ext3 root, but when CONFIG_EXT3_FS=y and
> CONFIG_EXT2_FS=y, I get this failure. Turning off CONFIG_EXT2_FS
> "fixes" it.
>
> Hope this helps,
> Rusty.
> --
> Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2002-12-13 14:28:58

by Mohamed El Ayouty

[permalink] [raw]
Subject: Re: [2.5.51] Failure to mount ext3 root when ext2 compiled in

Hi,

This sounds more like the bug I have opened:

http://bugme.osdl.org/show_bug.cgi?id=110

where if CONFIG_DEVFS_FS = Y and CONFIG_DEVFS_MOUNT = Y, you will get:

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

I worked around it by enabling CONFIG_UNIX98_PTYS = Y under the
character devices.

But, a recent update to the bug shows that a patch was posted but nobody
cared.

Personally, I think the patch should be merged.

Mohamed

2002-12-14 10:04:08

by Andrew Morton

[permalink] [raw]
Subject: Re: [2.5.51] Failure to mount ext3 root when ext2 compiled in

Mohamed El Ayouty wrote:
>
> Hi,
>
> This sounds more like the bug I have opened:
>
> http://bugme.osdl.org/show_bug.cgi?id=110
>
> where if CONFIG_DEVFS_FS = Y and CONFIG_DEVFS_MOUNT = Y, you will get:
>
> 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
>
> I worked around it by enabling CONFIG_UNIX98_PTYS = Y under the
> character devices.
>
> But, a recent update to the bug shows that a patch was posted but nobody
> cared.
>
> Personally, I think the patch should be merged.

You mean this one?

http://www.lkml.org/archive/2002/12/13/50/index.html

It appears to simply disable internal mounting of devfs.

In which kernel did this problem first appear? There were
devfs changes in 2.5.51.

2002-12-14 14:15:33

by Mohamed El Ayouty

[permalink] [raw]
Subject: Re: [2.5.51] Failure to mount ext3 root when ext2 compiled in

I started having that problem since 2.5.48.

I just commented out those 4 lines in init/do_mounts.c:

#ifdef CONFIG_DEVFS_FS
sys_mount("devfs", "/dev", "devfs", 0, NULL);
do_devfs = 1;
#endif

and 2.5.51 now works.

Mohamed

2002-12-14 18:41:07

by Andrew Morton

[permalink] [raw]
Subject: Re: [2.5.51] Failure to mount ext3 root when ext2 compiled in

Mohamed El Ayouty wrote:
>
> I started having that problem since 2.5.48.
>
> I just commented out those 4 lines in init/do_mounts.c:
>
> #ifdef CONFIG_DEVFS_FS
> sys_mount("devfs", "/dev", "devfs", 0, NULL);
> do_devfs = 1;
> #endif
>
> and 2.5.51 now works.
>

OK, the above code was added in 2.5.48. Thanks. I'll bug Mr Viro
about it when the power comes back on over on the East coast...

If you replace CONFIG_DEVFS_FS with CONFIG_DEVFS_MOUNT there, does
that fix it?

2002-12-14 18:59:16

by Mohamed El Ayouty

[permalink] [raw]
Subject: Re: [2.5.51] Failure to mount ext3 root when ext2 compiled in

I tried your suggestion to replace CONFIG_DEVFS_FS with

CONFIG_DEVFS_MOUNT in the code snippet:

#ifdef CONFIG_DEVFS_FS
sys_mount("devfs", "/dev", "devfs", 0, NULL);
do_devfs = 1;
#endif

But it gave me the same panic on boot.

Mohamed

2002-12-16 22:56:17

by Rusty Russell

[permalink] [raw]
Subject: Re: [2.5.51] Failure to mount ext3 root when ext2 compiled in

In message <[email protected]> you write:
> Rebuilding the kernel, even if you "didn't change anything" makes
> it go away.
>
> I assume that in your case a `make clean' will not fix it. You
> lucky duck. Can you stick a printk right at the end of
> ext3_fill_super()?

You have cursed me. Now it works. Looks like a build problem?

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.