From: md@Linux.IT (Marco d'Itri)
To: linux-hotplug@vger.kernel.org
Subject: how to create /dev/root
Date: Sat, 12 Jul 2008 02:52:16 +0000 [thread overview]
Message-ID: <20080712025216.GA13808@bongo.bofh.it> (raw)
[-- Attachment #1: Type: text/plain, Size: 667 bytes --]
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="$1"
local rootnumbers=$(mountpoint -q -d / || true)
local rootmajor=${rootnumbers%:*}
local rootminor=${rootnumbers#*:}
[ "$rootmajor" -a "$rootminor" ] || return 0
echo 'ACTION=="add", SUBSYSTEM=="block", ENV{MAJOR}=="'$rootmajor'", ENV{MINOR}=="'$rootminor'", SYMLINK+="root"' > /dev/.udev/rules.d/rules.d/61-dev-root-link.rules
}
--
ciao,
Marco
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2008-07-12 2:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-12 2:52 Marco d'Itri [this message]
2008-07-15 13:50 ` how to create /dev/root Kay Sievers
2008-07-16 14:51 ` piterpk
2008-07-16 15:37 ` Harald Hoyer
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=20080712025216.GA13808@bongo.bofh.it \
--to=md@linux.it \
--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 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.