From: Matthias Schwarzott Date: Sat, 21 Apr 2007 13:31:36 +0000 Subject: Re: [PATCH] creating link /dev/root to device / is mounted from Message-Id: <200704211531.36439.zzam@gentoo.org> List-Id: References: <200704201246.21524.zzam@gentoo.org> In-Reply-To: <200704201246.21524.zzam@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Samstag, 21. April 2007, Kay Sievers wrote: > On 4/21/07, Matthias Schwarzott 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 o= n=20 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=3D$(root_get_dev_nr) > > dev_path=3D$(udevtrigger --verbose --attr-match=DEv=3D${dev_nr}) > > dev_name=3D$(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 i= s=20 in /usr/bin, make it impossible to do it right after udev has been started,= =20 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 cre= ate=20 a symlink there. (But here it can differ from the real used device.) Matthias --=20 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