From: "Herbert Pötzl" <herbert@13thfloor.at>
To: jeff millar <wa1hco@adelphia.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SOLUTION Re: 2.6.0-test3 cannot mount root fs
Date: Wed, 13 Aug 2003 15:24:30 +0200 [thread overview]
Message-ID: <20030813132429.GA7551@www.13thfloor.at> (raw)
In-Reply-To: <00bb01c36198$51cba650$6401a8c0@wa1hco>
On Wed, Aug 13, 2003 at 08:42:12AM -0400, jeff millar wrote:
> I didn't try 16 versions but did try at least
>
> /dev/hda3, 0303, 03:03, hda3
>
> All with grub.conf similar to below
>
> Please let me know if I need to try something else with grub.. If you have a
> patch, I'll try it tonite and email the results to you and the list.
here is the patch, please try to capture/copy
all lines starting with $$ (and the ones immediately
following) ...
boot okay ...
$$ name_to_dev_t() >/dev/hda1<
$$ check >hda1<
$$ check >hda1< (<31)
$$ try_name() I
$$ try_name() >hda1<,0
$$ open >/sys/block/hda1/dev< = -1
$$ fail
$$ strtoul >1< -> 1
$$ try_name() II
$$ try_name() >hda<,1
$$ open >/sys/block/hda/dev< = 0
$$ read 0[32] = >3:0
< (4)
$$ buf: >3:0<
$$ mkdev (3,0) -> 768
$$ open2 >/sys/block/hda/range< = 0
$$ read2 0[32] = >64
< (3)
$$ buf: >64<
$$ strtoul >64< -> 64
$$ 1 < 64 ?
$$ name_to_dev_t() done
VFS: Mounted root (ext2 filesystem) readonly.
device not present ...
$$ name_to_dev_t() >/dev/hdc1<
$$ check >hdc1<
$$ check >hdc1< (<31)
$$ try_name() I
$$ try_name() >hdc1<,0
$$ open >/sys/block/hdc1/dev< = -1
$$ fail
$$ strtoul >1< -> 1
$$ try_name() II
$$ try_name() >hdc<,1
$$ open >/sys/block/hdc/dev< = -1
$$ fail
$$ name_to_dev_t() failed
$$ name_to_dev_t() done
VFS: Cannot open root device "hdc1" or unknown-block(0,0)
patch below ...
-----------------
diff -NurP --minimal linux-2.6.0-test3/init/do_mounts.c linux-2.6.0-test3-debug/init/do_mounts.c
--- linux-2.6.0-test3/init/do_mounts.c 2003-08-09 16:31:35.000000000 +0200
+++ linux-2.6.0-test3-debug/init/do_mounts.c 2003-08-13 15:15:23.000000000 +0200
@@ -62,11 +62,14 @@
/* read device number from .../dev */
+ printk("$$ try_name() >%s<,%d\n", name, part);
sprintf(path, "/sys/block/%s/dev", name);
fd = open(path, 0, 0);
+ printk("$$ open >%s< = %d\n", path, fd);
if (fd < 0)
goto fail;
len = read(fd, buf, 32);
+ printk("$$ read %d[32] = >%*s< (%d)\n", fd, len, buf, len);
close(fd);
if (len <= 0 || len == 32 || buf[len - 1] != '\n')
goto fail;
@@ -74,9 +77,11 @@
/*
* The format of dev is now %u:%u -- see print_dev_t()
*/
- if (sscanf(buf, "%u:%u", &maj, &min) == 2)
+ printk("$$ buf: >%s<\n", buf);
+ if (sscanf(buf, "%u:%u", &maj, &min) == 2) {
res = MKDEV(maj, min);
- else
+ printk("$$ mkdev (%d,%d) -> %d\n", maj, min, res);
+ } else
goto fail;
/* if it's there and we are not looking for a partition - that's it */
@@ -86,21 +91,27 @@
/* otherwise read range from .../range */
sprintf(path, "/sys/block/%s/range", name);
fd = open(path, 0, 0);
+ printk("$$ open2 >%s< = %d\n", path, fd);
if (fd < 0)
goto fail;
len = read(fd, buf, 32);
+ printk("$$ read2 %d[32] = >%*s< (%d)\n", fd, len, buf, len);
close(fd);
if (len <= 0 || len == 32 || buf[len - 1] != '\n')
goto fail;
buf[len - 1] = '\0';
+ printk("$$ buf: >%s<\n", buf);
range = simple_strtoul(buf, &s, 10);
+ printk("$$ strtoul >%s< -> %d\n", buf, range);
if (*s)
goto fail;
/* if partition is within range - we got it */
+ printk("$$ %d < %d ?\n", part, range);
if (part < range)
return res + part;
fail:
+ printk("$$ fail\n");
return (dev_t) 0;
}
@@ -130,27 +141,32 @@
dev_t res = 0;
int part;
+ printk("$$ name_to_dev_t() >%s<\n", name);
sys_mkdir("/sys", 0700);
if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0)
goto out;
if (strncmp(name, "/dev/", 5) != 0) {
res = (dev_t) simple_strtoul(name, &p, 16);
+ printk("$$ strtoul >%s< -> %d\n", name, res);
if (*p)
goto fail;
goto done;
}
name += 5;
res = Root_NFS;
+ printk("$$ check >%s<\n", name);
if (strcmp(name, "nfs") == 0)
goto done;
+ printk("$$ check >%s< (<31)\n", name);
if (strlen(name) > 31)
goto fail;
strcpy(s, name);
for (p = s; *p; p++)
if (*p == '/')
*p = '.';
+ printk("$$ try_name() I\n");
res = try_name(s, 0);
if (res)
goto done;
@@ -160,7 +176,9 @@
if (p == s || !*p || *p == '0')
goto fail;
part = simple_strtoul(p, NULL, 10);
+ printk("$$ strtoul >%s< -> %d\n", p, part);
*p = '\0';
+ printk("$$ try_name() II\n");
res = try_name(s, part);
if (res)
goto done;
@@ -168,19 +186,23 @@
if (p < s + 2 || !isdigit(p[-2]) || p[-1] != 'p')
goto fail;
p[-1] = '\0';
+ printk("$$ try_name() III\n");
res = try_name(s, part);
done:
+ printk("$$ name_to_dev_t() done\n");
sys_umount("/sys", 0);
out:
sys_rmdir("/sys");
return res;
fail:
+ printk("$$ name_to_dev_t() failed\n");
res = (dev_t) 0;
goto done;
}
static int __init root_dev_setup(char *line)
{
+ printk("$$ root_dev_setup() >%s<\n", line);
strlcpy(saved_root_name, line, sizeof(saved_root_name));
return 1;
}
next prev parent reply other threads:[~2003-08-13 13:24 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-09 10:46 2.6.0-test3 cannot mount root fs gaxt
2003-08-09 10:40 ` Norbert Preining
2003-08-09 11:56 ` Herbert Pötzl
2003-08-09 9:07 ` Norbert Preining
[not found] ` <20030809130641.A8174@electric-eye.fr.zoreil.com>
[not found] ` <01a201c35e65$0536ef60$ee52a450@theoden>
2003-08-09 11:58 ` Henrik Storner
2003-08-09 13:48 ` Felipe Alfaro Solana
2003-08-09 14:32 ` Mr. James W. Laferriere
2003-08-09 14:48 ` gaxt
2003-08-09 14:38 ` Mr. James W. Laferriere
2003-08-09 15:19 ` DVD Problems 2.6.0-test3 & 2.6.0-test2-mm5 gaxt
2003-08-09 15:01 ` 2.6.0-test3 cannot mount root fs Henrik Ræder Clausen
2003-08-10 21:17 ` Norbert Preining
2003-08-10 22:43 ` Andrew Morton
2003-08-11 5:34 ` Norbert Preining
2003-08-11 14:59 ` Herbert Pötzl
2003-08-11 15:40 ` Norbert Preining
2003-08-11 18:53 ` Herbert Pötzl
2003-08-11 21:50 ` Norbert Preining
2003-08-11 22:21 ` Herbert Pötzl
2003-08-12 1:52 ` Mark W. Alexander
2003-08-12 6:28 ` Norbert Preining
2003-08-12 5:39 ` Norbert Preining
2003-08-12 12:26 ` Herbert Pötzl
2003-08-12 12:31 ` Norbert Preining
2003-08-12 12:44 ` jeff millar
2003-08-12 23:52 ` Thomas Molina
2003-08-13 16:59 ` Paul Dickson
2003-08-14 4:09 ` jeff millar
2003-08-13 6:15 ` SOLUTION " Norbert Preining
2003-08-13 6:27 ` "Andrey Borzenkov"
2003-08-13 6:30 ` Norbert Preining
2003-08-13 12:07 ` jeff millar
2003-08-13 12:30 ` Herbert Pötzl
[not found] ` <00bb01c36198$51cba650$6401a8c0@wa1hco>
2003-08-13 13:24 ` Herbert Pötzl [this message]
[not found] ` <009b01c362d5$13838b90$6401a8c0@wa1hco>
[not found] ` <20030815030013.GA9587@www.13thfloor.at>
[not found] ` <00a401c3632a$80dd2a20$6401a8c0@wa1hco>
[not found] ` <20030815132619.GB3695@www.13thfloor.at>
2003-08-16 0:34 ` 2.6.0-test3 _still_ " jeff millar
2003-08-16 15:00 ` Herbert Pötzl
2003-08-13 13:24 ` SOLUTION Re: 2.6.0-test3 " Christian Mautner
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=20030813132429.GA7551@www.13thfloor.at \
--to=herbert@13thfloor.at \
--cc=linux-kernel@vger.kernel.org \
--cc=wa1hco@adelphia.net \
/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).