Newsgroups: gmane.linux.distributions.grml.user Date: Wed, 30 Aug 2006 17:48:15 +0200
Newsgroups: gmane.linux.distributions.grml.user Date: Wed, 30 Aug 2006 17:48:15 +0200
> 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? :)
> 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. not only mount them on demond, but automatically.
T
>> 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.
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.
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.
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.
T
> 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? :)
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.
Newsgroups: gmane.linux.distributions.grml.user Date: Thu, 26 Oct 2006 12:16:14 +0200
> grml-rebuildfstab executes '"rebuildfstab -v -r -u $fstabuser -g > $fstabuser'" where $fstabuser is the user with the UID 1000.
> Is this UID 1000, GID 1000 configurable somewhere?
Not yet.
If you want to adjust the alias for your needs just redefine the alias via ~/.zshrc.local or /etc/zsh/zshrc.local.
But I'll think about it whether we can use a less static version.
mika
> thanks, I hope we can do it in /etc/grml/autoconfig, we have CONFIG_FSTAB > already at least.
This is what I'm planning to do, yes. (Needs detailed design though because of the several places where rebuildfstab is used.)
mika
> >> >> Is this UID 1000, GID 1000 configurable somewhere?
> >> Hm.., how is rebuildfstab called when new device is plugged in? It > >> should not be a alias, should it?
> > man rebuildfstab
> Done in /etc/udev/grml_usbdev.rules?
Yes, activated via /etc/udev/rules.d/z31_grml_usbdev.rules
mika
>> I saw in the script that it uses "-g users", which is 100 in my system, >> but why files show up as group id 1000? ... > > Please show the entry for the device in /etc/fstab where the above > files are hanging around, plus the corresponding "mount"-output.
$ tail -3 /var/log/messages Oct 27 10:02:26 cxmr kernel: sd 3:0:0:0: Attached scsi removable disk sdb Oct 27 10:02:28 cxmr rebuildfstab[6704]: re-generating /etc/fstab - see 'man rebuildfstab' Oct 27 10:02:33 cxmr rebuildfstab[7051]: re-generating /etc/fstab - see 'man rebuildfstab'
$ grep /mnt/usb-sd /etc/fstab /dev/usb-sdb /mnt/usb-sdb auto user,noauto,nodev,noatime,nosuid,noexec,rw,uid=1000,gid=1000 0 0 /dev/usb-sdb1 /mnt/usb-sdb1 auto user,noauto,nodev,noatime,nosuid,noexec,rw,uid=1000,gid=1000 0 0
% mount /mnt/usb-sdb1
$ ls -l /mnt/usb-sdb1 total 16 drwxr-xr-x 3 1000 1000 16384 2006-04-23 dcim/
$ apt-cache policy grml-rebuildfstab grml-rebuildfstab: Installed: 0.3-12 Candidate: 0.3-12 Version table: *** 0.3-12 0 683 http://grml.org ./ Packages 100 /var/lib/dpkg/status
mika
> grml-rebuildfstab: > Installed: 0.3-12
Ok. Is the entry OK if you manually run:
# rebuildfstab -v -r -u $USER -g $GROUP
and replace $USER with your username and $GROUP with the groupname of your user?
> Further question, why is rebuildfstab called twice?
Because the udev-rule KERNEL=="sd[a-z]*" matches the disk *and* each of its partitions. Thinking about it, "sd[a-z]" should be OK as well.
mika
> Ok. Is the entry OK if you manually run: > > # rebuildfstab -v -r -u $USER -g $GROUP
Yep, that works.
T
Newsgroups: gmane.linux.distributions.grml.user Date: Thu, 31 Aug 2006 09:16:58 +0200
> I'm not used to the new console-terminus font, and would perfer the > traditional one. However, I can't remove it:
> $ apt-get remove --purge console-terminus The following packages will be > REMOVED: > console-terminus* grml* grml-autoconfig* grml-debugtools* grml-etc* > grml-x* > 0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
> Would it be a better idea to have this extra eye candy to be > recommended, as opposed to required?
> I was able to remove it in grml0.7 and didn't have any problem with > that...
The dependency was introduced because grml uses the font as default now.
But there's no reason to remove the package at all because it's possible to deactivate the font anyway. In live-cd mode you can use the 'nodefaultfont' bootoption (as stated in Release Notes of grml 0.8). On your hd-installation setting the consolefont can be done also via $CONSOLEFONT in /etc/grml/autoconfig. Just set it to a font you like, if you notice any problems feel free to drop me a note.
mika