From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Borzenkov Date: Sun, 07 Jan 2007 15:53:26 +0000 Subject: Re: Some basic questions on udev usage Message-Id: <200701071853.31919.arvidjaar@mail.ru> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org -----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=3D/dev/sda2' to > 'root=3D/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=3D/dev/sda2 vga=3D1 > resume=3D/dev/sda1 console=3DttyS0,115200 console=3Dtty0 nmi_watchdog=3D1 > > Is this O.K? > If you ensure that initrd is able to create this name. Most persistent rule= s=20 require non-trivial infrastructure (they call shell scripts that in turn ca= ll=20 grep/sed/awk/...; they use *_id tools that are built against libc and=20 libvolume_id and possibly require some more libraries). So you end up eithe= r=20 maintaining two versions of rules (one for initrd one for booted system) or= =20 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=20 now-a-days. More serious is simple observation that you do not have any=20 automated way to find out what is required by udev rules. It may be possible to automatically create specific rule for initrd that=20 generates persistent name for a given root partition. I expect that when (i= f)=20 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 yo= u=20 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*= =20 or hd* likely renders most tools that autodetect HDDs unusable). If you nee= d=20 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=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ 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