From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] creating link /dev/root to device / is mounted from
Date: Sat, 21 Apr 2007 13:31:36 +0000 [thread overview]
Message-ID: <200704211531.36439.zzam@gentoo.org> (raw)
In-Reply-To: <200704201246.21524.zzam@gentoo.org>
On Samstag, 21. April 2007, Kay Sievers wrote:
> On 4/21/07, Matthias Schwarzott <zzam@gentoo.org> wrote:
> > On Freitag, 20. April 2007, Kay Sievers wrote:
> >
> > Well, our initramfs
>
> Hmm, the issue should only occur _without_ an initramfs-image, right?
> It's a different code path in the kernel, that should not happen when
> initramfs code mounts /, then /proc/mounts has matching entries.
>
> > does not move its /dev to new mounted root filesystem,but
> > we get a completely fresh tmpfs.
>
> Sure, we all just mount an empty tmpfs without any moving of nodes.
> The thing is, the kernel does not create /dev/root in /dev of the root
> on disk, it's in the kernel's initramfs, which every kernel has, even
> when you don't use an cpio-image to pupulate it during bootup.
Yeah - but I meant some initramfs images do mount a tmpfs - and /dev/root on
it, and later move that mounted fs onto the its final position.
>
> > We also can just have a program to write out major/minor of "/" and then
> > mknod it (outside of udev)
> > But I really like a link better.
> > Here I also can search udev-database (or whatever)
> >
> > For example when /usr is already mounted (for udevinfo):
> > dev_nr=$(root_get_dev_nr)
> > dev_path=$(udevtrigger --verbose --attr-matchÞv=${dev_nr})
> > dev_name=$(udevinfo -q name --path ${dev_path})
> > ln -s /dev/${dev_name} /dev/root
>
> Yeah, sure, a link looks a bit nicer, but I'm not sure that it's worth
> all this effort.
>
Depends :)
Only thing that I dislike on this solution is that it needs udevinfo that is
in /usr/bin, make it impossible to do it right after udev has been started,
but in another init-script.
> Btw, how is your system doing an fsck on the rootfs? What device node
> is it using?
It just uses the device node listed in fstab :)
Yeah, that is the other possibility - if fstab has a entry for "/" just create
a symlink there. (But here it can differ from the real used device.)
Matthias
--
Matthias Schwarzott (zzam)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2007-04-21 13:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-20 10:46 [PATCH] creating link /dev/root to device / is mounted from Matthias Schwarzott
2007-04-20 14:55 ` Kay Sievers
2007-04-21 9:35 ` Matthias Schwarzott
2007-04-21 10:29 ` Andrey Borzenkov
2007-04-21 10:41 ` Kay Sievers
2007-04-21 13:31 ` Matthias Schwarzott [this message]
2007-04-21 17:47 ` Doug Goldstein
2007-04-22 12:01 ` Kay Sievers
2007-04-23 17:58 ` David Zeuthen
2007-04-24 9:37 ` Kay Sievers
2007-05-03 5:56 ` David Zeuthen
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=200704211531.36439.zzam@gentoo.org \
--to=zzam@gentoo.org \
--cc=linux-hotplug@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).