From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Goldstein Date: Sat, 21 Apr 2007 17:47:42 +0000 Subject: Re: [PATCH] creating link /dev/root to device / is mounted from Message-Id: <462A4E3E.3020708@gentoo.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1566900386==" List-Id: References: <200704201246.21524.zzam@gentoo.org> In-Reply-To: <200704201246.21524.zzam@gentoo.org> To: linux-hotplug@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1566900386== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8CD09AE13C90C6DA153B0FD5" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8CD09AE13C90C6DA153B0FD5 Content-Type: multipart/mixed; boundary="------------030807000900060709060006" This is a multi-part message in MIME format. --------------030807000900060709060006 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I honestly feel that this is a kernel issue. Since according to the mount man page, /proc/mounts and /etc/mtab should be relatively in sync and /etc/mtab can technically be a symlink of /proc/mounts. It states that /proc/mounts should update quicker and as such should technically be more reliable. Which I feel contradicts some people's opinions that the kernel and /proc/mounts can not be trusted. I think this is bogus because with an initramfs, the kernel does the right thing. Without one, it hardcodes itself to /dev/root when the kernel knows via the root=3D option what the proper dev node should be. As a result, here's a kernel patch to correct this issue. --=20 Doug Goldstein http://dev.gentoo.org/~cardoe/ --------------030807000900060709060006 Content-Type: text/x-patch; name="dev-root-real-root.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="dev-root-real-root.patch" --- linux-2.6.20-gentoo-r6/init/do_mounts.c 2007-04-17 01:27:27.000000000= -0400 +++ linux-dev-root/init/do_mounts.c 2007-04-21 13:00:32.000000000 -0400 @@ -354,7 +354,10 @@ va_start(args, fmt); vsprintf(buf, fmt, args); va_end(args); - fd =3D sys_open("/dev/root", O_RDWR | O_NDELAY, 0); + if (saved_root_name[0]) + fd =3D sys_open(saved_root_name, O_RDWR | O_NDELAY, 0); + else + fd =3D sys_open("/dev/root", O_RDWR | O_NDELAY, 0); if (fd >=3D 0) { sys_ioctl(fd, FDEJECT, 0); sys_close(fd); @@ -397,8 +400,13 @@ } #endif #ifdef CONFIG_BLOCK - create_dev("/dev/root", ROOT_DEV); - mount_block_root("/dev/root", root_mountflags); + if (saved_root_name[0]) { + create_dev(saved_root_name, ROOT_DEV); + mount_block_root(saved_root_name, root_mountflags); + } else { + create_dev("/dev/root", ROOT_DEV); + mount_block_root("/dev/root", root_mountflags); + } #endif } =20 --------------030807000900060709060006-- --------------enig8CD09AE13C90C6DA153B0FD5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGKk4/oeSe8B0zEfwRAuxSAJ4rx6xmkV53MmoDgQ7yZB3z0/BEDACeJPhq MeazycJMUWHG/aDvIKLQs6w= =q+66 -----END PGP SIGNATURE----- --------------enig8CD09AE13C90C6DA153B0FD5-- --===============1566900386== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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/ --===============1566900386== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1566900386==--