From mboxrd@z Thu Jan 1 00:00:00 1970 From: md@Linux.IT (Marco d'Itri) Date: Sat, 12 Jul 2008 02:52:16 +0000 Subject: how to create /dev/root Message-Id: <20080712025216.GA13808@bongo.bofh.it> MIME-Version: 1 Content-Type: multipart/mixed; boundary="VS++wcV0S1rZb1Fb" List-Id: To: linux-hotplug@vger.kernel.org --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I added this to the Debian udev init script, run between mounting /dev and starting udevtrigger. mountpoint at least on Debian systems is part of sysvinit and happens to be in /bin, but if /usr is available then you can as well use stat(1). create_devroot_rule() { local udevroot=3D"$1" local rootnumbers=3D$(mountpoint -q -d / || true) local rootmajor=3D${rootnumbers%:*} local rootminor=3D${rootnumbers#*:} [ "$rootmajor" -a "$rootminor" ] || return 0 =20 echo 'ACTION=3D=3D"add", SUBSYSTEM=3D=3D"block", ENV{MAJOR}=3D=3D"'$rootm= ajor'", ENV{MINOR}=3D=3D"'$rootminor'", SYMLINK+=3D"root"' > /dev/.udev/rul= es.d/rules.d/61-dev-root-link.rules } --=20 ciao, Marco --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkh4HGAACgkQFGfw2OHuP7EWVgCfareprV1GDYSO3+jvfBNf760Z xHEAoJ1YfcwVR6+TF+hmysc/jmWU6i2J =6rCl -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb--