[Grml] Re: Wishlist: automount by names

T mlist4suntong at yahoo.com
Wed Aug 30 16:31:30 CEST 2006


On Wed, 30 Aug 2006 17:48:15 +0200, Michael Prokop wrote:

>> I know grml can (re)generate fstab on boot each time. However, I'd like
>> to access my partitions by their names instead of sda7, sda12, which I
>> have no way to remember. So I have to disable the automatic fstab
>> generation on boot.
> 
>> I hope that grml can utilize the automount, as knopsis does, and use
>> udev to access them by their names, ie disk labels.
> 
>> The bonus is that USB drives will be taken care of as well by this.
> 
>> Would this happen in near future, or I'm out of luck and have to find
>> the way to do it myself.
> 
> Sorry, I don't understand your problem. :)
> 
> If you are using filesystem labels just mount them using:
> 
> mount -L $LABEL /mnt/test
> 
> If you need stable root devices you can use UUIDs as well:
> http://michael-prokop.at/blog/2006/08/11/stable-root-device-aka-uuid/
> 
> What do you mean with automount and "use udev to access them by their
> names"? What should /etc/fstab look like in your opinion? Did I miss what
> you are searching for? :)

OK. Let me explain in detail.

First about disk labels and udev:
=================================

I have many disk partions. One type is OS, so I have os11, os12, till os14.
The other type is caches, eg, cache11, cache12 & cache13. Currently only
my os12 is mounted, and all my caches are mounted. 

Udev knows about all my disk labels:

$ ls /dev/disk/by-label/* | grep os
/dev/disk/by-label/os12

$ ls /dev/disk/by-label/* | grep cache
/dev/disk/by-label/cache11
/dev/disk/by-label/cache12
/dev/disk/by-label/cache13

Yes, you can use UUIDs to make stable root devices. But udev also allows
using disk labels as well, beside UUIDs. To me this is an better option.
It is intuitive, and as long as they are mounted correctly, I don't need
to care about UUIDs. 

In other words, I want to mount my HD/USB devices not by UUIDs but by
labels. Eg. the disk partition labeled os12 would always mounted on
/mnt/os12.

Now for the automount:
======================

Instead of building HD partions into /etc/fstab, buit it into automount
rules. So, whenever I cd into /mnt/os12, the disk partition labeled os12
is automatically mounted -- all taken care of by automount. 

Now for USB pens:
=================

It should be taken care of by pmount-hal. According to Florian Kulzer:

,-----
| ... you will not need fstab entries for pluggable devices anymore.
| Devices will be mounted at the correct mount point automatically. Even
| better, if you use the "pmount-hal" command then the devices will be
| mounted by their volume label so that you can address each medium
| unambiguously and independent of the order in which you attached them.
| This is also fully integrated in e.g. KDE and Gnome.
`-----

These are all my researches finding so far. 

HTH

tong





More information about the Grml mailing list