From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: Some basic questions on udev usage
Date: Sun, 07 Jan 2007 15:53:26 +0000 [thread overview]
Message-ID: <200701071853.31919.arvidjaar@mail.ru> (raw)
In-Reply-To: <a02278b00701061225h4c373cb6ga65581948e49a85f@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sunday 07 January 2007 18:18, Allexio Ju wrote:
>
> I am referring menu.lst file that is available on 2.6.19 vanila
> kernel. On the file, I thought I could modify 'root=/dev/sda2' to
> 'root=/dev/my-disk' from following entry in the file after I create
> new initrd image that has udev infra structure.
> title Linux-2.6.19
> kernel (hd0,1)/boot/Linux-2.6.19 root=/dev/sda2 vga=1
> resume=/dev/sda1 console=ttyS0,115200 console=tty0 nmi_watchdog=1
>
> Is this O.K?
>
If you ensure that initrd is able to create this name. Most persistent rules
require non-trivial infrastructure (they call shell scripts that in turn call
grep/sed/awk/...; they use *_id tools that are built against libc and
libvolume_id and possibly require some more libraries). So you end up either
maintaining two versions of rules (one for initrd one for booted system) or
making initrd pretty big by putting large number of tools there. Both have
obvious drawbacks although I'd say size of initrd is not that important
now-a-days. More serious is simple observation that you do not have any
automated way to find out what is required by udev rules.
It may be possible to automatically create specific rule for initrd that
generates persistent name for a given root partition. I expect that when (if)
major numbers become really dynamic, this is what will be done anyway.
akes sense?
>
> One more question.
> All .rules file under /etc/udev/rules.d start with number. If (really
> if) I want to have my own .rules file, what number should I consider
> as part of my file name?
> Are there any such guideline?
If you want to override default rules, add your own in the beginning. If you
want to augment - add them in the end. Try to not override anything unless
you know well what you are doing (as example - renaming disks away from sd*
or hd* likely renders most tools that autodetect HDDs unusable). If you need
to have specific name - *add* it as SYMLINK; never ever use NAME :)
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFFoRd7R6LMutpd94wRAhGbAJ9oAyEokylwaAEp8ZPaY065+6GW5gCcCSlw
b9GE8WqtJ1wjOk4F6ch0610)Qa
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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-01-07 15:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-06 20:25 Some basic questions on udev usage Allexio Ju
2007-01-06 23:21 ` Bryan Kadzban
2007-01-07 13:39 ` Bryan Kadzban
2007-01-07 15:18 ` Allexio Ju
2007-01-07 15:53 ` Andrey Borzenkov [this message]
2007-01-07 16:19 ` Alexander E. Patrakov
2007-01-07 21:56 ` Bryan Kadzban
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=200701071853.31919.arvidjaar@mail.ru \
--to=arvidjaar@mail.ru \
--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).