From: Daniel McNeil <daniel@osdl.org>
To: Florian Huber <florian.huber@mnet-online.de>,
Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6.0-test1-mm2] fix unable to mount root fs
Date: 23 Jul 2003 11:42:19 -0700 [thread overview]
Message-ID: <1058985739.23448.25.camel@dell_ss5.pdx.osdl.net> (raw)
In-Reply-To: <20030720125547.11466aa4.florian.huber@mnet-online.de>
[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]
The problem is being caused by the dev_t changes that now print out
dev_t's as major:minor instead of a hex value. See print_dev_t().
This patch changes try_name() in init/do_mounts.c to get the major
and minor and return a MKDEV(major, minor). I've tested this on
my machines and it boots with root=/dev/hda2.
Daniel McNeil <daniel@osdl.org>
On Sun, 2003-07-20 at 03:55, Florian Huber wrote:
> Hello ML,
> I can't boot my 2.6.0-test1-mm2 kernel (+GCC 3.3). The kernel panics
> at bootime:
>
> VFS: Cannot open root device "hda3" or unknow-block(0,0)
> Please append a correct "root=" boot option
> Kernel Panic: VFS: Unable to mount root fs on unknown-block(0,0)
>
> I do have compiled support for the file system on my root partition
> (xfs). The same configuration worked well with 2.6.0-test1-mm1.
>
> Perhaps somebody knows how to solve this.
>
> TIA
> Florian Huber
> -
> 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/
[-- Attachment #2: patch.2.6.0-test1-mm2.do_mounts --]
[-- Type: text/x-patch, Size: 922 bytes --]
diff -rupN -X /home/daniel_nfs/dontdiff linux-2.6.0-test1-mm2/init/do_mounts.c linux-2.6.0-test1-mm2.do_mounts/init/do_mounts.c
--- linux-2.6.0-test1-mm2/init/do_mounts.c 2003-07-23 11:19:32.018914859 -0700
+++ linux-2.6.0-test1-mm2.do_mounts/init/do_mounts.c 2003-07-23 11:25:19.356002570 -0700
@@ -58,6 +58,7 @@ static dev_t __init try_name(char *name,
char *s;
int len;
int fd;
+ unsigned int maj, min;
/* read device number from .../dev */
@@ -70,8 +71,12 @@ static dev_t __init try_name(char *name,
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 */
prev parent reply other threads:[~2003-07-23 18:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-20 10:55 [2.6.0-test1-mm2] unable to mount root fs on unknown-block(0,0) Florian Huber
2003-07-20 11:55 ` Felipe Alfaro Solana
2003-07-20 18:47 ` Joe
2003-07-20 21:54 ` Jeremy Fitzhardinge
2003-07-20 23:17 ` Jeremy Fitzhardinge
2003-07-21 15:38 ` Florian Huber
2003-07-21 18:05 ` Christian Axelsson
2003-07-23 18:42 ` Daniel McNeil [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1058985739.23448.25.camel@dell_ss5.pdx.osdl.net \
--to=daniel@osdl.org \
--cc=akpm@osdl.org \
--cc=florian.huber@mnet-online.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).