2003-07-23 06:41:29

by Tom Felker

[permalink] [raw]
Subject: root= needs hex in 2.6.0-test1-mm2

I finally booted 2.6.0-test1-mm2, after reading somebody else who needed to
use hex in the root= argument. root=/dev/hdb1 and root=hdb2 would panic
("VFS: Cannot open root device hdb1 or unknown-block(0,0)"), but root=0341
worked. Devfs is compiled in, devfs=nomount and devfs=mount make no
difference. Is this intentional?

--
Tom Felker

Try not! Do! or do not. There is no try.
-- Yoda


2003-07-23 12:05:22

by Felipe Alfaro Solana

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2

On Wed, 2003-07-23 at 08:56, Tom Felker wrote:
> I finally booted 2.6.0-test1-mm2, after reading somebody else who needed to
> use hex in the root= argument. root=/dev/hdb1 and root=hdb2 would panic
> ("VFS: Cannot open root device hdb1 or unknown-block(0,0)"), but root=0341
> worked. Devfs is compiled in, devfs=nomount and devfs=mount make no
> difference. Is this intentional?

I would say it's a bug :-)

2003-07-23 13:28:47

by Christoph Hellwig

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2

On Wed, Jul 23, 2003 at 01:56:40AM -0500, Tom Felker wrote:
> I finally booted 2.6.0-test1-mm2, after reading somebody else who needed to
> use hex in the root= argument. root=/dev/hdb1 and root=hdb2 would panic
> ("VFS: Cannot open root device hdb1 or unknown-block(0,0)"), but root=0341
> worked. Devfs is compiled in, devfs=nomount and devfs=mount make no
> difference. Is this intentional?

Yes. If you use devfs you have to use devfs names for root=. It's
pretty simple. Best option of course is to avoid devfs.

2003-07-23 14:49:43

by Florian Huber

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2

On 23 Jul 2003 14:20:21 +0200
Felipe Alfaro Solana <[email protected]> wrote:

> I would say it's a bug :-)

"It's not a bug, it's an undocumented feature" ;)

On the one hand it sounds reasonable tom me that I cannot use the
device "path", because devfs sets it, but why has it changed? It
seemed to work well with older kernel versions. And what do the hex
numbers stand for?

TIA
Florian Huber

2003-07-23 14:53:31

by Felipe Alfaro Solana

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2

On Wed, 2003-07-23 at 15:43, Christoph Hellwig wrote:
> On Wed, Jul 23, 2003 at 01:56:40AM -0500, Tom Felker wrote:
> > I finally booted 2.6.0-test1-mm2, after reading somebody else who needed to
> > use hex in the root= argument. root=/dev/hdb1 and root=hdb2 would panic
> > ("VFS: Cannot open root device hdb1 or unknown-block(0,0)"), but root=0341
> > worked. Devfs is compiled in, devfs=nomount and devfs=mount make no
> > difference. Is this intentional?
>
> Yes. If you use devfs you have to use devfs names for root=. It's
> pretty simple. Best option of course is to avoid devfs.

I didn't compile devfs in... However, root=/dev/xxx caused a panic
during bootup. So, I guess those panics aren't related exclusively to
devfs.

What's really strange on this issue is that I haven't still heard any
response from the kernel gurus :-?

2003-07-23 15:14:57

by Con Kolivas

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2

On Wed, 23 Jul 2003 23:43, Christoph Hellwig wrote:
> On Wed, Jul 23, 2003 at 01:56:40AM -0500, Tom Felker wrote:
> > I finally booted 2.6.0-test1-mm2, after reading somebody else who needed
> > to use hex in the root= argument. root=/dev/hdb1 and root=hdb2 would
> > panic ("VFS: Cannot open root device hdb1 or unknown-block(0,0)"), but
> > root=0341 worked. Devfs is compiled in, devfs=nomount and devfs=mount
> > make no difference. Is this intentional?
>
> Yes. If you use devfs you have to use devfs names for root=. It's
> pretty simple. Best option of course is to avoid devfs.

ie use

root=/dev/ide/host0/bus0/target1/lun0/part1

or equivalent

2003-07-23 15:33:38

by Charles Lepple

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2


Florian Huber said:
> On 23 Jul 2003 14:20:21 +0200
> Felipe Alfaro Solana <[email protected]> wrote:
>
>> I would say it's a bug :-)
>
> "It's not a bug, it's an undocumented feature" ;)
>
> On the one hand it sounds reasonable tom me that I cannot use the
> device "path", because devfs sets it, but why has it changed? It
> seemed to work well with older kernel versions. And what do the hex
> numbers stand for?

First two are the device major, second two are the minor.

$ ls -l /dev/hdb1
brw-rw---- 1 root disk 3, 65 Jan 30 05:24 /dev/hdb1

-> root=0341

--
Charles Lepple <ghz.cc!clepple>
http://www.ghz.cc/charles/

2003-07-23 18:03:24

by Diego Calleja

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2

El 23 Jul 2003 17:08:31 +0200 Felipe Alfaro Solana <[email protected]> escribi?:

> I didn't compile devfs in... However, root=/dev/xxx caused a panic
> during bootup. So, I guess those panics aren't related exclusively to
> devfs.

I can confirm this. It happens without devfsd.
The hex trick worked ;)

2003-07-23 18:37:44

by Tom Felker

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2

On Wednesday 23 July 2003 10:33 am, Con Kolivas wrote:
> On Wed, 23 Jul 2003 23:43, Christoph Hellwig wrote:
> > On Wed, Jul 23, 2003 at 01:56:40AM -0500, Tom Felker wrote:
> > > I finally booted 2.6.0-test1-mm2, after reading somebody else who
> > > needed to use hex in the root= argument. root=/dev/hdb1 and root=hdb2
> > > would panic ("VFS: Cannot open root device hdb1 or
> > > unknown-block(0,0)"), but root=0341 worked. Devfs is compiled in,
> > > devfs=nomount and devfs=mount make no difference. Is this intentional?
> >
> > Yes. If you use devfs you have to use devfs names for root=. It's
> > pretty simple. Best option of course is to avoid devfs.

>From the perspective of an ignorant user, I kinda like the idea of devfs.

> ie use
>
> root=/dev/ide/host0/bus0/target1/lun0/part1
>
> or equivalent

Yes, this worked. I guess now my question is, why does /dev/hdb1 work for
2.6.0-test1, but not 2.6.0-test1-mm2?

Also, I just started getting oopses during startup and shutdown with
test1-mm2, EIP at ext3_journaling_dirty_data or something similar, followed
by a bunch of file not found errors. I'm getting scared, I have valuable
data on ext3. I'll be looking into some way to capture this.

--
Tom Felker

Hack user friendliness onto a pure and simple system, because
you can't hack purity and simplicity onto a user friendly system.

2003-07-23 19:21:32

by Steven Cole

[permalink] [raw]
Subject: Re: root= needs hex in 2.6.0-test1-mm2

On Wed, 2003-07-23 at 12:17, Diego Calleja Garc?a wrote:
> El 23 Jul 2003 17:08:31 +0200 Felipe Alfaro Solana <[email protected]> escribi?:
>
> > I didn't compile devfs in... However, root=/dev/xxx caused a panic
> > during bootup. So, I guess those panics aren't related exclusively to
> > devfs.
>
> I can confirm this. It happens without devfsd.
> The hex trick worked ;)

In case you missed it, Daniel McNeil posted this patch here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105898580610066&w=2
For some odd reason, that mail didn't show up in my lkml box,
but I grabbed his patch from the above, and it had some weird mailer
mangling in the archive, but nothing difficult to fix.

The patch works for me. Now I can boot 2.6.0-test1-mm2 with
root=/dev/hda1 and no hex tricks.

Here is Daniel's patch.

Steven

--- linux-2.6.0-test1-mm2/init/do_mounts.c.orig 2003-07-23 12:52:21.000000000 -0600
+++ linux-2.6.0-test1-mm2/init/do_mounts.c 2003-07-23 13:04:32.000000000 -0600
@@ -58,6 +58,7 @@
char *s;
int len;
int fd;
+ unsigned int maj, min;

/* read device number from .../dev */

@@ -70,8 +71,12 @@
if (len <= 0 || len == 32 || buf[len - 1] != '\n')
goto fail;
buf[len - 1] = '\0';
- res = (dev_t) simple_strtoul(buf, &s, 16);
- if (*s)
+ /*
+ * The format of dev is now %u:%u -- see print_dev_t()
+ */
+ if (sscanf(buf, "%u:%u", &maj, &min) == 2)
+ res = MKDEV(maj, min);
+ else
goto fail;

/* if it's there and we are not looking for a partition - that's it */