linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Initrd problem with 2.6 kernel
@ 2003-08-08 20:52 Andrey Borzenkov
  0 siblings, 0 replies; 5+ messages in thread
From: Andrey Borzenkov @ 2003-08-08 20:52 UTC (permalink / raw)
  To: H. J. Lu; +Cc: linux-kernel

> There is a chicken and egg problem with initrd on 2.6. When
> root=/dev/xxx is passed to kernel, kernel will call try_name, which
> uses /sys/block/drive/dev, to find out the device number for ROOT_DEV.
> The problem is /sys/block/drive may not exist if the driver is loaded
> by /linuxrc in initrd. As the result, /linuxrc can't use
> /proc/sys/kernel/real-root-dev to determine the root device number.

{pts/1}% grep \"/sys\" *
do_mounts.c:    sys_mkdir("/sys", 0700);
do_mounts.c:    if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0)
do_mounts.c:    sys_umount("/sys", 0);
do_mounts.c:    sys_rmdir("/sys");

or do you mean something different?

-andrey

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Initrd problem with 2.6 kernel
  2003-08-08 10:49 ` Herbert Xu
@ 2003-08-08 15:23   ` H. J. Lu
  0 siblings, 0 replies; 5+ messages in thread
From: H. J. Lu @ 2003-08-08 15:23 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-kernel

On Fri, Aug 08, 2003 at 08:49:16PM +1000, Herbert Xu wrote:
> H. J. Lu <hjl@lucon.org> wrote:
> > There is a chicken and egg problem with initrd on 2.6. When
> > root=/dev/xxx is passed to kernel, kernel will call try_name, which
> > uses /sys/block/drive/dev, to find out the device number for ROOT_DEV.
> > The problem is /sys/block/drive may not exist if the driver is loaded
> > by /linuxrc in initrd. As the result, /linuxrc can't use
> > /proc/sys/kernel/real-root-dev to determine the root device number.
> 
> You can replicate the sysfs probing in userspace.  I did that in
> Debian initrd-tools 0.1.51.

It sounds a good idea. I will give it a try.

Thanks.

H.J.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Initrd problem with 2.6 kernel
  2003-08-07 22:30 H. J. Lu
  2003-08-08  0:32 ` Andrew Morton
@ 2003-08-08 10:49 ` Herbert Xu
  2003-08-08 15:23   ` H. J. Lu
  1 sibling, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2003-08-08 10:49 UTC (permalink / raw)
  To: H. J. Lu, linux-kernel

H. J. Lu <hjl@lucon.org> wrote:
> There is a chicken and egg problem with initrd on 2.6. When
> root=/dev/xxx is passed to kernel, kernel will call try_name, which
> uses /sys/block/drive/dev, to find out the device number for ROOT_DEV.
> The problem is /sys/block/drive may not exist if the driver is loaded
> by /linuxrc in initrd. As the result, /linuxrc can't use
> /proc/sys/kernel/real-root-dev to determine the root device number.

You can replicate the sysfs probing in userspace.  I did that in
Debian initrd-tools 0.1.51.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Initrd problem with 2.6 kernel
  2003-08-07 22:30 H. J. Lu
@ 2003-08-08  0:32 ` Andrew Morton
  2003-08-08 10:49 ` Herbert Xu
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2003-08-08  0:32 UTC (permalink / raw)
  To: H. J. Lu; +Cc: linux-kernel

"H. J. Lu" <hjl@lucon.org> wrote:
>
> There is a chicken and egg problem with initrd on 2.6. When
> root=/dev/xxx is passed to kernel, kernel will call try_name, which
> uses /sys/block/drive/dev, to find out the device number for ROOT_DEV.
> The problem is /sys/block/drive may not exist if the driver is loaded
> by /linuxrc in initrd. As the result, /linuxrc can't use
> /proc/sys/kernel/real-root-dev to determine the root device number.

You should be able to use the numeric identifier:

	root=03:02

that's major:minor, and it recently changed.  In 2.6.0-test2 that would be
"0302".



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Initrd problem with 2.6 kernel
@ 2003-08-07 22:30 H. J. Lu
  2003-08-08  0:32 ` Andrew Morton
  2003-08-08 10:49 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: H. J. Lu @ 2003-08-07 22:30 UTC (permalink / raw)
  To: linux kernel

There is a chicken and egg problem with initrd on 2.6. When
root=/dev/xxx is passed to kernel, kernel will call try_name, which
uses /sys/block/drive/dev, to find out the device number for ROOT_DEV.
The problem is /sys/block/drive may not exist if the driver is loaded
by /linuxrc in initrd. As the result, /linuxrc can't use
/proc/sys/kernel/real-root-dev to determine the root device number.


H.J.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-08-08 20:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 20:52 Initrd problem with 2.6 kernel Andrey Borzenkov
  -- strict thread matches above, loose matches on Subject: below --
2003-08-07 22:30 H. J. Lu
2003-08-08  0:32 ` Andrew Morton
2003-08-08 10:49 ` Herbert Xu
2003-08-08 15:23   ` H. J. Lu

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).