lkml.org 
[lkml]   [2013]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] init: fix name of root device in /proc/mounts
On Mon, Feb 04, 2013 at 06:54:32PM -0800, H. Peter Anvin wrote:
> The difference is that it used to be customary to have a /dev/root symlink; iirc udev created one. Devtmpfs does not (for largely valid reasons, but it does break some userspaces.)

Correct. The /dev/root symlink is not created any longer. If you boot
with an initramfs this path does not show up in /proc/mounts. If you
boot without one, however, it does.

This patch just makes the /dev/root path not show up at all in
/proc/mounts, regardless of whether an initramfs is used.

Thanks,

William

> Rob Landley <rob@landley.net> wrote:
>
> >On 01/31/2013 05:22:09 PM, H. Peter Anvin wrote:
> >> On 01/31/2013 02:51 PM, William Hubbs wrote:
> >> > On a system that does not use an initramfs, /dev/root was always
> >> > listed in /proc/mounts. This breaks software which scans
> >> /proc/mounts to
> >> > determine which file systems are mounted since /dev/root is not a
> >> valid
> >> > device name.
> >> >
> >> > This changes that processing so that "/dev/root" is only added to
> >> > /proc/mounts if a root device is not specified with the root=
> >> option on
> >> > the kernel command line.
> >> >
> >> > Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
> >>
> >> Let me also point out that most of the time, the kernel actually has
> >a
> >> udev device name for an actual device...
> >
> >So your software is broken by overmounts? /dev/root is just one example
> >
> >of this. (And you can specify a root= on the kernel command line and
> >have that be parsed by initramfs. I vaguely recall klibc does this...)
> >
> >For an example of how to parse this stuff, how about:
> >
> > http://landley.net/hg/toybox/file/4ffb735aea59/toys/posix/df.c
> >
> >I.E. parse from the end of the list (most recent match is the
> >overmount), and eliminate synthetic filesystems. Note that code is from
> >
> >2006, other people have managed to cope all this time...
> >
> >Rob
>
> --
> Sent from my mobile phone. Please excuse brevity and lack of formatting.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-02-05 06:01    [W:0.080 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site