View previous topic :: View next topic |
Author |
Message |
Alighieri Tux's lil' helper
Joined: 27 Jan 2005 Posts: 88
|
Posted: Wed Jul 13, 2005 8:58 pm Post subject: Udev rule to map partition labels to device links |
|
|
It is sometimes useful to refer to a disk partition by its partition label rather than the device name. First, place the following: Code: | # Maps ext2/3 partition labels to symlinks
SUBSYSTEM="block", PROGRAM="/sbin/e2label %r/%k", MATCH="?*", SYMLINK="e2label/%c%e"
| into the file /etc/udev/rules.d/10-local-udev.rules. This could be tailored a bit [done], but does the job.
Now use e2label to label an ext2/3 partition, e.g, Code: | e2label /dev/hd4 test |
Then run
There should be a device symlink at /dev/e2label/test pointing to /dev/hda4. You can now use these device links in /dev/e2label in your fstab, etc.
Update: changed to disallow empty labels and to append a number to duplicate symlinks.
Last edited by Alighieri on Tue Jul 19, 2005 6:52 pm; edited 4 times in total |
|
Back to top |
|
|
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Wed Jul 13, 2005 9:59 pm Post subject: |
|
|
oooo, that's cool! |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Wed Jul 20, 2005 8:40 am Post subject: |
|
|
Yes it really is!!!
Is there by any chance a similar tool for reiserfs???
don't wanna reformat 400 GB |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|