All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Hubbs <w.d.hubbs@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Rob Landley <rob@landley.net>,
	linux-kernel@vger.kernel.org, mpagano@gentoo.org
Subject: Re: [PATCH] init: fix name of root device in /proc/mounts
Date: Mon, 4 Feb 2013 22:19:53 -0600	[thread overview]
Message-ID: <20130205041953.GA24029@linux1> (raw)
In-Reply-To: <a6a99589-ac94-4cfc-a871-095431bfd8ef@email.android.com>

[-- Attachment #1: Type: text/plain, Size: 2094 bytes --]

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.

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-02-05  4:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31 22:51 [PATCH] init: fix name of root device in /proc/mounts William Hubbs
2013-01-31 23:22 ` H. Peter Anvin
2013-02-01 17:14   ` William Hubbs
2013-02-01 19:03     ` H. Peter Anvin
2013-02-05  2:42   ` Rob Landley
2013-02-05  2:54     ` H. Peter Anvin
2013-02-05  4:19       ` William Hubbs [this message]
2013-03-17 22:23       ` William Hubbs
2013-03-19 22:28       ` William Hubbs
2013-03-19 23:17         ` H. Peter Anvin
2013-03-20  0:20           ` William Hubbs
2013-03-20  0:24             ` H. Peter Anvin
2013-03-20  7:03             ` Rob Landley
2013-03-20 15:02               ` H. Peter Anvin
2013-03-20 21:11               ` William Hubbs
2013-03-20 21:46                 ` Kay Sievers
2013-03-22  3:00                 ` Rob Landley
2013-02-09 21:32 ` William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2013-02-05 20:07 William Hubbs
2013-02-05 20:10 ` William Hubbs
2013-02-05 21:45   ` Stephen Rothwell
2013-02-05 23:36     ` William Hubbs

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=20130205041953.GA24029@linux1 \
    --to=w.d.hubbs@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpagano@gentoo.org \
    --cc=rob@landley.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.