
Hi
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.
thanks
tong

* T mlist4suntong@yahoo.com [20060830 16:29]:
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? :)
regards, -mika-

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

* T mlist4suntong@yahoo.com [20060830 23:15]:
On Wed, 30 Aug 2006 17:48:15 +0200, Michael Prokop wrote:
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
Sure, nothing new and just symlinks to the real devices.
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.
That's what I already mentioned and demonstrated:
,---- [ demo on grml with a fs with label foo ] | grml@grml ~ % ls -la /dev/disk/by-label | total 0 | drwxr-xr-x 2 root root 60 2006-08-31 11:04 ./ | drwxr-xr-x 6 root root 120 2006-08-31 11:04 ../ | lrwxrwxrwx 1 root root 10 2006-08-31 11:04 foo -> ../../hda2 | grml@grml ~ % su | root@grml ~ # mount -L foo /mnt/test | root@grml ~ # mount | grep hda | /dev/hda2 on /mnt/test type xfs (rw) `----
I don't see the need for the entries in /etc/fstab. But I don't want to stop investigating in new ideas, so I try to elaborate a little bit.
Mounting by label already works (see my demo). An entry like:
LABEL=foo /mnt/foo auto .....
in fstab would (IMO) cause more problems than the current:
/dev/hda2 /mnt/foo auto .....
does. Possible reasons:
* people are used to the "old-style" fstab entries; that's what they (usually) expect to get when they use a "Linux for sysadmins"
* what about multiple identical LABELs? How should this be handled smoothly without any further confusion?
I personally don't think 'la /dev/disk/by-label', 'vol_id /dev/ice42' and/or 'mount -L foo /mnt/test' are that hard for people who want to mount devices via fs-label. :)
But your feature request lead me to a possible nice addon: To provide the filesystem's labels as directories in /mnt so mounting hasn't to be done via /mnt/test. :)
The implementation would be something like:
# for label in /dev/disk/by-label/* ; mkdir /mnt/$(basename $label)
in the booting sequence so 'mount -L foo /mnt/test' is possible straight forward.. Maybe integration in rebuildfstab would be useful too, so directories for new fs-labels are present as well. Does this sound useful for you? Could you live with that? :)
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.
No.
Automounting sucks. The automounting stuff at Knoppix (what you mention in another mail) was such annoying that I wanted to get rid of it completely. People using grml know what they are doing and what they want to do. Especially when rescuing systems you definitely don't want any automatizations on your filesystems. Oh and just try automounting with directory completion of the shell - anything but *not* amusing.
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. `-----
pmount-hal requires running dbus/hald. Not an option for the default behaviour of grml for me at the moment.
grml's udev solution for usb pens works for me. Just run 'mount /mnt/external1' and usually that's it. Plain and simple. Mounting by label is possible anyway and pmount-hal exists on grml too. What are missing therefore? :)
regards, -mika-

On Thu, 31 Aug 2006 10:26:54 +0200, Michael Prokop wrote:
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.
That's what I already mentioned and demonstrated:
Oh, forgot to mention I tried it before post. Guess I need further setup for it to work...
Mounting by label already works (see my demo). An entry like:
LABEL=foo /mnt/foo auto .....
in fstab would (IMO) cause more problems than the current:
Totally agree. I hate entries like "LABEL=..." in fstab.
/dev/hda2 /mnt/foo auto .....
does.
Is it the new grml0.8 feature? That's exactly what I want. grml0.7 used to be
/dev/hda2 /mnt/hda2 auto .....
The implementation would be something like:
# for label in /dev/disk/by-label/* ; mkdir /mnt/$(basename $label)
hmm.... that won't work. As shown in my example. /dev/disk/by-label/ is only populated when a disk is mounted. So you didn't see the full list of my os partions.
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. `-----
pmount-hal requires running dbus/hald. Not an option for the default behaviour of grml for me at the moment.
grml's udev solution for usb pens works for me. Just run 'mount /mnt/external1' and usually that's it. Plain and simple. Mounting by label is possible anyway and pmount-hal exists on grml too. What are missing therefore? :)
The default behavior of the grml's udev solution for usb pens works for you but might not work for others. For example, I have 2 usb pens, one has no partition, so I can't use /mnt/external1; whereas the 2nd has 3 partitions, in which grml's solution is not enough.

On Thu, 31 Aug 2006 12:26:45 +0200, T wrote:
/dev/hda2 /mnt/hda2 auto .....
The implementation would be something like:
# for label in /dev/disk/by-label/* ; mkdir /mnt/$(basename $label)
hmm.... that won't work. ...
I was wrong.
Yes, that'll do. Just check for existence before creating the dirs, to make it friendly to hd install cases.
thanks

* T mlist4suntong@yahoo.com [20060831 19:15]:
On Thu, 31 Aug 2006 10:26:54 +0200, Michael Prokop wrote:
[...]
/dev/hda2 /mnt/foo auto ..... does.
Is it the new grml0.8 feature? That's exactly what I want. grml0.7 used to be
/dev/hda2 /mnt/hda2 auto .....
Sorry, was a typo of course.
The implementation would be something like:
# for label in /dev/disk/by-label/* ; mkdir /mnt/$(basename $label)
hmm.... that won't work. As shown in my example. /dev/disk/by-label/ is only populated when a disk is mounted. So you didn't see the full list of my os partions.
As you wrote in your other mail it will work. :)
So I will implement it and see how well it works for all of you in the next develrelease.
[usb-pens]
pmount-hal requires running dbus/hald. Not an option for the default behaviour of grml for me at the moment.
grml's udev solution for usb pens works for me. Just run 'mount /mnt/external1' and usually that's it. Plain and simple. Mounting by label is possible anyway and pmount-hal exists on grml too. What are missing therefore? :)
The default behavior of the grml's udev solution for usb pens works for you but might not work for others. For example, I have 2 usb pens, one has no partition, so I can't use /mnt/external1; whereas the 2nd has 3 partitions, in which grml's solution is not enough.
Use /mnt/external for pens without any partitions. :)
But you are right - for multiple partitions it's still not a nice solution, I'll think about that with the other grml-devs. Thanks for your suggestions!
regards, -mika-

If GRML would build fstab with labels/UUIDs instead of device numbers, it would probably satisfy the request.
The change is desirable and easy. An OS is much more robust if it uses labels/UUIDs. Device numbers could be appended in a comment (#).
Thanks mika,
M

On Wed, 30 Aug 2006 14:40:58 -0700, Mark wrote:
If GRML would build fstab with labels/UUIDs instead of device numbers, it would probably satisfy the request.
The change is desirable and easy. An OS is much more robust if it uses labels/UUIDs. Device numbers could be appended in a comment (#).
yes, almost what I want. I just want one step more. only mount them on demond, but automatically.
tong
Teilnehmer (3)
-
Mark
-
Michael Prokop
-
T