From: James Lockie <bjlockie@lockie.ca>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] external USB harddrive
Date: Thu, 04 Jan 2007 15:37:28 -0500 [thread overview]
Message-ID: <459D6588.1060600@lockie.ca> (raw)
In-Reply-To: <3D60AF2712C16D42A38076E52FD6E3D23F0C36@ukmcrdembx01.rd.astrazeneca.net>
Nelson, David (ED, PAR&D) wrote:
>> -----Original Message-----
>> From: James Lockie [mailto:bjlockie@lockie.ca]
>> Sent: 04 January 2007 05:28
>> To: Gentoo User Mailing List
>> Subject: [gentoo-user] external USB harddrive
>>
>>
>> Does anyone have one of these? :-)
>> It mounts when I connect it but a user can't unmount it.
>> My USB memory stick and USB card reader work fine.
>> It is only the hard drive that I can't unmount as a user.
>> I don't have or want an /etc/fstab entry for it, I should be able to
>> configure KDE to handle it.
>>
>> --
>> gentoo-user@gentoo.org mailing list
>>
>>
>
> I would add it to fstab (I reckon this would be the easiest way) - the same fstab entry should work for USB memory sticks/card readers as well, to my knowledge.
>
> Or if you wanted to get really fancy I believe you could write a udev rule so it recognises that device and assigns it /dev/externalhdd or the like :)
>
> David
> Note: These views are my own, advice is provided with no guarantee of success. I do not represent anyone else in any emails I send to this list.
>
>
I tried creating 10-my-udev.rules
# http://wiki.archlinux.org/index.php/Udev
KERNEL=="sd[c-z]", NAME="%k", SYMLINK+="usbhd-%k", GROUP="users",
OPTIONS="last_
rule"
ACTION=="add", KERNEL=="sd[c-z][0-9]", SYMLINK+="usbhd-%k",
GROUP="users", NAME=
"%k"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/ln -s /media/usbhd-%k
/mnt/usb
hd-%k"
ACTION=="add", KERNEL=="sd[c-z][0-9]", PROGRAM=="/lib/udev/vol_id -t
%N", RESULT
=="vfat", RUN+="/bin/mount -t vfat -o
rw,noauto,sync,dirsync,noexec,nodev,noatim
e,dmask=000,fmask=111 /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mount -t auto -o
rw,noauto,syn
c,dirsync,noexec,nodev,noatime /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rm -f /mnt/usbhd-%k"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/umount -l
/media/usbhd-%k"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rmdir
/media/usbhd-%k", OPT
IONS="last_rule"
but then KDE doesn't see the new drive.
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2007-01-04 20:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 5:28 [gentoo-user] external USB harddrive James Lockie
2007-01-04 8:59 ` Neil Bothwick
2007-01-04 20:34 ` James Lockie
2007-01-05 17:05 ` Richard Fish
2007-01-04 13:30 ` Nelson, David (ED, PAR&D)
2007-01-04 20:37 ` James Lockie [this message]
2007-01-04 15:20 ` Richard Fish
2007-01-04 17:13 ` Uwe Thiem
2007-01-04 19:35 ` Neil Bothwick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=459D6588.1060600@lockie.ca \
--to=bjlockie@lockie.ca \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox