I'm really having trouble getting my head around udev and udev rules for removeable USB devices. When I plug in my USB stick, it automounts under /media/sda1. What I don't like is that I have to "su" to write to the stick and to unmount it again, so this automounting is pretty useless. I've tried to decipher the files under /etc/udev to find the rule that actually mounts stuff, but grepping for "mount" just shows me some unmounting detail in a file called "hal.rules".
What I'd like is:
1. Automounting USB mass storage devices under some unique name determined
by the label of the partition
2. Write access and unmounting by normal user.
I've seen this work transparently under Gnome and KDE, but I use fvwm or no X at all so that's no option for me.
Thanks
--D.
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
I've never had a problem; I've never used automount.
What type of filesystem is on the USB and who created it? If root
created an ext2, then it belongs to root. You would want to create it
as your own user. If its FAT* then use the UID/GID mount options.
Put the mount point in /etc/fstab and use the user option.
You can use the LABEL= instead of a device name and create per-LABEL
mount points and put them all in fstab.
Doug.
Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
There's also great information on quoting, e.g.
http://www.vranx.de/mail/tofu.html
-André
--
May as well be hung for a sheep as a lamb!
Linkstation/KuroBox/HG/HS/Tera Kernel 2.6/PPC from <http://hvkls.dyndns.org>
The description of usbmount says:
This package automatically mounts USB mass
storage devices (typically USB pens) when they
are plugged in, and unmounts them when they are
removed.
Does this limit filesystems to FAT? FAT doesn't care if
you rip it out without doing any cleanup. If you've
formatted your thumbdrive as an ext2 filesystem, how can it
be properly unmounted if you simply unplug it? Won't that
mean you have to run fsck every time you plug it in again?
Best wishes,
Max Hyre
maybe mount with sync instead of async, though mount warns of
life-shortening possibilities with flash stuff. probably a good idea
to go for noatime also to help coutneract that. Both of those would
minimise the risk of damage -- so long as the current process was
done, you could pull it. that just a guess. check man mount.
A
There's also great information on quoting, e.g.
http://www.vranx.de/mail/tofu.html
-André
--
May as well be hung for a sheep as a lamb!
Linkstation/KuroBox/HG/HS/Tera Kernel 2.6/PPC from <http://hvkls.dyndns.org>
.
Umm, OK. But that sort of obviates the point of
usbmount. I guess I'll just continue to umount by hand.
I don't use any sort of automounting or unmounting. I don't have
NFS-homes (the traditional UNIX automounter setup). This is a UNIX-like
OS, although its lookin more and more like a Windows-like OS.
I label the filesystems on anything I want users to mount. I then have
per-label mount points and lines in fstab; users are responsible for
their own mounts and umounts and any damage they do. Then again, I
don't have that many devices.
Doug.
There's also great information on quoting, e.g.
http://www.vranx.de/mail/tofu.html
-André
--
May as well be hung for a sheep as a lamb!
Linkstation/KuroBox/HG/HS/Tera Kernel 2.6/PPC from <http://hvkls.dyndns.org>
..
.
There's also great information on quoting, e.g.
http://www.vranx.de/mail/tofu.html
-André
--
May as well be hung for a sheep as a lamb!
Linkstation/KuroBox/HG/HS/Tera Kernel 2.6/PPC from <http://hvkls.dyndns.org>
...
..
.
>From the usbmount README:
> Vfat Filesystems
> ----------------
>
> Filesystems of type vfat are not considered by default, despite being
> popular for many USB devices, because the Linux kernel does not yet
> fully implement sync-mounting for this filesystem type. This means that
> you risk losing data or even corrupting the filesystem if you remove the
> medium before all data has been written to it. If you include vfat in
> the FILESYSTEMS configuration variable, you *MUST* run the 'sync'
> command before removing the device.
So ext works via sync-mounting, and vfat requires manual syncing.
> A
Celejar
--
mailmin.sourceforge.net - remote access via secure (OpenPGP) email
ssuds.sourceforge.net - A Simple Sudoku Solver and Generator