You are not logged in.
Pages: 1
i recently purchased 2 apacer 2GB usb flash drives so i could transfer my files between computers with ease and speed. i have the computer, using udev rules, recognizing the drives as i put them in, and automounting them to a /mnt directory.
couple questions about it though
1. the drives are read only, and cannot be changed from (using chmod or chown) root
drwxr-xr-x 4 root root 16384 Nov 14 11:18 usb1
how can i fix this?
[root@creech ~]# ls -l /mnt
drwxr-xr-x 4 root root 16384 Nov 14 11:18 usb1
[root@creech ~]# chown spookshow /mnt/usb1
chown: changing ownership of `/mnt/usb1': Operation not permitted
[root@creech ~]# chmod 777 /mnt/usb1
[root@creech ~]# ls -l /mnt
drwxr-xr-x 4 root root 16384 Nov 14 11:18 usb1
[root@creech ~]#
is this possibly because it is fat16? and if so, what format should i use to make it readable across windows and linux machines?
fdisk -l
xxxx
Disk /dev/sdi: 2063 MB, 2063597568 bytes
16 heads, 32 sectors/track, 7872 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Device Boot Start End Blocks Id System
/dev/sdi1 * 1 7872 2015216 e W95 FAT16 (LBA)
2. i want to create links on the desktop automatically so that i could easily access the drives when i plug them in, how can i do this?
udev rules file i created below (and by created i mean stole from the wiki)
KERNEL=="sd[h-z]", NAME="%k", SYMLINK+="usb%m", GROUP="users", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[h-z][0-9]", SYMLINK+="usb%n", GROUP="users", NAME="%k"
ACTION=="add", KERNEL=="sd[h-z][0-9]", RUN+="/bin/mkdir -p /mnt/usb%n"
ACTION=="add", KERNEL=="sd[h-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o
rw,noauto,sync,dirsync,noexec,nodev,noatime,dmask=000,fmask=111 /dev/%k /mnt/usb%n", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[h-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /mnt/usb%n", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sd[h-z][0-9]", RUN+="/bin/umount -l /mnt/usb%n"
ACTION=="remove", KERNEL=="sd[h-z][0-9]", RUN+="/bin/rmdir /mnt/usb%n", OPTIONS="last_rule"
thanks in advance
solution = hal + dbus (actually running) + gnome-volume-manager + small script
Offline
Are drives wirte locked ? some have a small switch on then to protect against overwriting
What Window Manager are you using?
Mr Green
Offline
From man mount
uid=value and gid=value
Set the owner and group of all files. (Default: the uid and
gid of the current process.)
try these on your mount options
as Mr Green said, what wm are you using?
Offline
i'm using gnome, 2.16.1
they have no write protection on the drives themselves
kasa - that seemed to work to get me ownership. thanks, sometime i just overlooked a bunch of times, i had that issue with my external drive previously
now if only the links showed up on my desktop or somewhere i could quickly access them
you guys are a great help so far, thanks!
Offline
Do not know much about Gnome so it could be hal dbus volume manager thing ...
Mr Green
Offline
I have geil 2GB transfer rate 26MB/s
assuming that you are running KDE or Gnome there is no need to modify /mnt or create any extra folders. KDE and Gnome will handle removable devices automatically
conditions:
1) running dbus/hal
2) slight changes to /etc/fstab
usbfs /proc/bus/usb usbfs noauto 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
upon inserting usb key system will automatically mount it in
/media/sdbX
where X is connected device number (if you connect more than one at a time)
in case that you close window, go to system -> storage media -> your_usb_stick
3) user added to storage group
if you are using xfce or less then get ivman it is easy to configure and works very well.
hope this will help
Offline
If you use gnome, you should definitely try gnome-volume-manager, just be sure you have HAL and DBUS running, and gnome-volume-manager enabled in your gnome session. Also, if you want to try it, backup udev rules you created and disable them: I'm not sure, but they could conflict with HAL ones.
Hope this helps
Offline
I have geil 2GB transfer rate 26MB/s
assuming that you are running KDE or Gnome there is no need to modify /mnt or create any extra folders. KDE and Gnome will handle removable devices automaticallyconditions:
1) running dbus/hal
2) slight changes to /etc/fstab
usbfs /proc/bus/usb usbfs noauto 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0upon inserting usb key system will automatically mount it in
/media/sdbX
where X is connected device number (if you connect more than one at a time)in case that you close window, go to system -> storage media -> your_usb_stick
3) user added to storage group
if you are using xfce or less then get ivman it is easy to configure and works very well.
hope this will help
thanks, i will try it tonight, i had no power at my house last night due to a windstorm, hopefully this will work (i would ssh to my computer from here and set it up, but i guess i forgot to turn on ssh at home )
Offline
just want to say thanks for the help, i thought i had hal running, but forgot to add it to my daemons list. the problem is corrected now, but something else has been borked, kindof.
it auto mounts my actual storage drives now and puts them on my desktop, where i had links set up previously.. and i have them named (see screenshot in screenshot thread)
i have used the info from http://wiki.archlinux.org/index.php/HAL and it still automounts them. any help?
i only got to play with it for a few minutes last night and i will be going back to it tonight hopefully, but for now i am just looking for a toss in the right direction, i have inventory at work this weekend, and the wii campout/launch, so i won't be around a lot for trial and error.
nevermind, problem solved. thanks/. the wiki on hal did the trick, just took more than a restart of hal, i needed to restart x as well
Offline
Pages: 1