Re: root= needs hex in 2.6.0-test1-mm2

From: Steven Cole (elenstev@mesatop.com)
Date: Wed Jul 23 2003 - 14:30:00 EST


On Wed, 2003-07-23 at 12:17, Diego Calleja García wrote:
> El 23 Jul 2003 17:08:31 +0200 Felipe Alfaro Solana <felipe_alfaro@linuxmail.org> 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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:50 EST