Michael Torrie torriem at gmail.com
Sun Feb 22 00:29:42 MST 2009

Russel Caldwell wrote:
> I've probably spent more time on this than I should have. Maybe somebody can
> help me out. I'm trying to set up an external drive in fstab on an Ubuntu
> 8.04 machine so that I can mount it explicitly rather than on boot. The line
> in fstab is:

The problem with what you're trying to do is that it is very prone to
break if you happen to have some other usb drive plugged in before your
disk.  IE you're not always guaranteed to be /dev/sdc1 or whatever.
Could be sdd, sde, f or g or whatever.  The correct way to go about this
is to go through HAL.  Fortunately this is not that hard.  There is a
nice program called halmount.py[1] to mount any volume by name to a
particular spot (in /media).  You could write a wrapper around this to
make it faster (call it mydisk.sh or something).   You could even make a
 wrapper that could be used in conjunction with mount and fstab if you
put your mind to it.

Attached is a quick and dirty python script that you can use to do stuff
with HAL and valumes.  It has no error checking... you'll want to
actually check for errors and throw exceptions.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: halvolume.py
Url: http://plug.org/pipermail/plug/attachments/20090222/da8d23a8/attachment.pl 

More information about the PLUG mailing list