Can't use removable storage media with Salix 14.0

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Can't use removable storage media with Salix 14.0

Post by zAchAry »

After I have installed VirtualBox-4.2.6-82870-Linux_x86.run Thunar (also Caja) fail to display removable storage media.

The things I am able to do and when:
  • I can use USB keyboard, mouse, scanner with Salix OS.
  • I can access to storage media only via VirtualBox.
Last edited by zAchAry on 8. Jan 2013, 19:21, edited 2 times in total.
Image
Help to make Slackware easier Donate to Salix
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: Can't use removable storage media after installing VBox

Post by zAchAry »

More information: I have executed VirtualBox from terminal as root, by mistake.

Please help.
Image
Help to make Slackware easier Donate to Salix
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Can't use removable storage media after installing VBox

Post by laprjns »

zAchAry wrote:More information: I have executed VirtualBox from terminal as root, by mistake.
This shouldn't be the root cause of the problem, but you going to have to provide a lot more information before anyone can even attempt to help.
Can the host system access the devices when VB is not running? What are you trying to do when this happens. We need as much information as you can provide.
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: Can't use removable storage media after installing VBox

Post by zAchAry »

I do not know where to start.
laprjns wrote:Can the host system access the devices when VB is not running?
No.
laprjns wrote:What are you trying to do when this happens. We need as much information as you can provide.
I am expecting to see a removable device in file manager sidebar.

I can always see all USB devices (Scanners, Mouse, Keyboard and also removable storage devices) with:

Code: Select all

$ lsusb
I suspect it is a permission issue. The directory file:///media/disk is inaccessible to non-root users.
Image
Help to make Slackware easier Donate to Salix
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Can't use removable storage media after installing VBox

Post by mimosa »

If I remember correctly, VB (or some aspect of it) gets started on boot as a service, even if you're not actually running it as such.

Code: Select all

service list
If it is indeed so, you could try stopping the service (and maybe rebooting for good measure) and see if there is any change.

Code: Select all

service stop virtualbox
Another thought - anything untoward in /etc/fstab?
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: Can't use removable storage media after installing VBox

Post by zAchAry »

mimosa wrote:If I remember correctly, VB (or some aspect of it) gets started on boot as a service, even if you're not actually running it as such.

Code: Select all

service list
If it is indeed so, you could try stopping the service (and maybe rebooting for good measure) and see if there is any change.

Code: Select all

service stop virtualbox

Code: Select all

# service stop vboxautostart-service
Stopping the vboxautostart-service service
# service stop vboxballoonctrl-service
Stopping the vboxballoonctrl-service service
# service stop vboxdrv
Stopping the vboxdrv service
Stopping VirtualBox kernel modules ...done.
# service stop vboxweb-service
Stopping the vboxweb-service service
I will report after I will reboot.
mimosa wrote:Another thought - anything untoward in /etc/fstab?

Code: Select all

/dev/sda2        swap             swap        defaults         0   0
/dev/sda1        /                ext4        defaults,noatime 1   1
/dev/sda3        /home            ext4        defaults,noatime 1   2
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0

Image
Help to make Slackware easier Donate to Salix
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Can't use removable storage media after installing VBox

Post by laprjns »

zAchAry wrote: The directory file:///media/disk is inaccessible to non-root users.
14.0 mounts removable drives on:
/run/media/{user}

If you still are having problems after you reboot, then plug in a usb stick and post the output of mount. For reference, here's the output of mount on my labtop with a usb stick plugged:
root[rich]# mount

Code: Select all

/dev/sda3 on / type xfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /vista type fuseblk (rw,allow_other,blksize=4096,default_permissions)
gvfs-fuse-daemon on /home/rich/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=rich)
/dev/sdb1 on /run/media/rich/3226-E9D9 type vfat (rw,nosuid,nodev,uid=1000,gid=100,shortname=mixed,dmask=0077,utf8=1,showexec,uhelper=udisks2)
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: Can't use removable storage media after installing VBox

Post by zAchAry »

laprjns wrote:
zAchAry wrote: The directory file:///media/disk is inaccessible to non-root users.
14.0 mounts removable drives on:
/run/media/{user}
I do not have a media directory.

Code: Select all

$ ls /run
mount  udev
Image
Help to make Slackware easier Donate to Salix
djemos
Salix Warrior
Posts: 1465
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Can't use removable storage media after installing VBox

Post by djemos »

VirtualBox at installation time creates a description file for udev, if that is present, which makes the USB accesible to all users in the vboxusers group.

Code: Select all

ls -l /etc/udev/rules.d/10-vboxdrv.rules 
-rw-r--r-- 1 root root 573 Σεπ   8 14:05 /etc/udev/rules.d/10-vboxdrv.rules
here is the file

Code: Select all

cat /etc/udev/rules.d/10-vboxdrv.rules 
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
check if vboxusers group exist

Code: Select all

cat /etc/group | grep vboxusers
after installation you need to put every user which should be able to access USB devices from virtualBox guests in the group vboxusers, either through the GUI user management tools or by running the following command as root:

Code: Select all

usermod -a -G vboxusers username
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: Can't use removable storage media after installing VBox

Post by zAchAry »

laprjns wrote:If you still are having problems after you reboot, then plug in a usb stick and post the output of mount. For reference, here's the output of mount on my labtop with a usb stick plugged:
root[rich]# mount

Code: Select all

/dev/sda3 on / type xfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /vista type fuseblk (rw,allow_other,blksize=4096,default_permissions)
gvfs-fuse-daemon on /home/rich/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=rich)
/dev/sdb1 on /run/media/rich/3226-E9D9 type vfat (rw,nosuid,nodev,uid=1000,gid=100,shortname=mixed,dmask=0077,utf8=1,showexec,uhelper=udisks2)
Still inaccessible:

Code: Select all

# mount
/dev/sda1 on / type ext4 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda3 on /home type ext4 (rw,noatime)
tmpfs on /dev/shm type tmpfs (rw)
gvfs-fuse-daemon on /home/zack/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=zack)
djemos wrote:VirtualBox at installation time creates a description file for udev, if that is present, which makes the USB accesible to all users in the vboxusers group.

Code: Select all

ls -l /etc/udev/rules.d/10-vboxdrv.rules 
-rw-r--r-- 1 root root 573 Σεπ   8 14:05 /etc/udev/rules.d/10-vboxdrv.rules
here is the file

Code: Select all

$ cat /etc/udev/rules.d/10-vboxdrv.rules 
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root", GROUP="root", MODE="0600"
SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"

check vboxusers group exist

Code: Select all

cat /etc/group | grep vboxusers

Code: Select all

$ cat /etc/group | grep vboxusers
vboxusers:x:1000:zack

djemos wrote:after installation you need to put every user which should be able to access USB devices from virtualBox guests in the group vboxusers, either through the GUI user management tools or by running the following command as root:

Code: Select all

usermod -a -G vboxusers username
(no comment, yet)
Image
Help to make Slackware easier Donate to Salix
Post Reply