Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
05-13-2014, 09:24 PM
|
#1
|
Member
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583
|
Unable to make XFCE "automount" a particular external hard drive.
Greetings!
Enjoy the colors as my attempt to liven up a dull topic!
I " need" to have Xfce automatically mount and be rw for user when I hook up this USB external HDD.
I can mount it fine manually as root with:
Code:
mount -t exfat /dev/sdb1 /media/WDMyPassport/
...at which point the user can read and write ! It even appears in Thunar as an ejectable storage location !
I just want to not have to manually mount as root, as my user is a pointy-clicky-4-life and possibly harmful at the command prompt!
Slackware 14.1 32bit (sans KDE) vs. WD My Passport (1TB external HDD).
Code:
root@fruitbomb:~# fdisk -l /dev/sdb
Disk /dev/sdb: 1000.2 GB, 1000170586112 bytes
255 heads, 63 sectors/track, 121597 cylinders, total 1953458176 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfecfd94e
Device Boot Start End Blocks Id System
/dev/sdb1 * 2 1953458175 976729087 7 HPFS/NTFS/exFAT
I have installed:
Code:
exfat-utils-0.9.6-i486-1_SBo
fuse-exfat-0.9.6-i486-1_SBo
ntfs-3g-2013.1.13-i486-1
I have spent at least 20 hours on the net looking at various methods, none of which
have panned out.... I can't even get it to tell me its UUID for some reason. I suspect
if I knew the UUID, I could make an fstab entry that would help?
I have actually gotten it to appear in Thunar when plugged in by using fstab rules,
but in that case Thunar says "mount: only root can mount /dev/sdb1 on /media/WDMyPassport."
I even tried setting /bin/ntfs-3g and /sbin/mount.exfat-fuse SUID,
but I'm not sure I did it properly...
Code:
root@fruitbomb:~# ls -lsh /bin/ntfs-3g
128K -rws--x--x 1 root root 125K Jun 11 2013 /bin/ntfs-3g*
root@fruitbomb:~# ls -lsh /sbin/mount.exfat-fuse
48K -rwsr-xr-x 1 rosario users 45K May 8 18:19 /sbin/mount.exfat-fuse*
Sincere gratitude !
|
|
|
05-13-2014, 09:48 PM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,590
|
If you want a partition to automount, do not expect the desktop environment to do it for you. Put it in your /etc/fstab ( file system table) with the correct switches.
http://www.howtogeek.com/howto/38125...-does-it-work/
If you want to make sure it always mounts to the same mountpoint, use the UUID in fstab.
http://www.cyberciti.biz/faq/linux-f...-update-fstab/
Here's an example from the fstab file I'm using on this computer right now. Both these entries point to partitions on an external USB drive; the entries that are remarked out with # are the entries that I replaced when I started using UUIDs:
Code:
# /dev/sdb1 /media/sdb1 ext3 rw,user,auto 0 1
UUID=1655a198-15a7-471f-9e99-e3fc9fd92ca0 /media/sdb1 ext3 rw,user,auto 0 1
# /dev/sdb5 /media/sdb5 ext3 rw,user,auto 0 1
UUID=7900ade7-de36-41e5-88b5-2d7aaa8adcd4 /media/sdb5 ext3 rw,user,auto 0 1
Last edited by frankbell; 05-13-2014 at 09:52 PM.
|
|
|
05-14-2014, 11:04 PM
|
#3
|
Member
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583
Original Poster
|
Sorry, I suppose a more apt title would have been:
"Unable to make Slackware "automount" a particular external hard drive"
Code:
root@fruitbomb:~# mount -t exfat /dev/sdb1 /media/WDMyPassport/
FUSE exfat 0.9.6
root@fruitbomb:~# mount
/dev/mapper/bomfunk-root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/mapper/bomfunk-home on /home type ext4 (rw)
/dev/sda1 on /boot type ext4 (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sdb1 on /media/WDMyPassport type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
root@fruitbomb:~# blkid
/dev/sda1: UUID="9f4afaa6-d603-4567-81e9-58e1c6687868" TYPE="ext4"
/dev/sda2: UUID="5df43021-bfa7-4c42-a8dc-69280d583948" TYPE="crypto_LUKS"
/dev/mapper/lukssda2: UUID="MjXooJ-Pdos-EZYd-2spf-501s-CBcX-Q3G6Y2" TYPE="LVM2_member"
/dev/mapper/bomfunk-root: UUID="5c3684f2-27e7-487b-8fb5-5c18aca2113d" TYPE="ext4"
/dev/mapper/bomfunk-swap: UUID="a9ba6577-1273-44c8-8810-a230831edc27" TYPE="swap"
/dev/mapper/bomfunk-home: UUID="f5d0bc36-ad67-4db9-b365-d2ebd8faddcc" TYPE="ext4"
I have tried at least a dozen well-crafted fstab entries. None allowed user read/write.
And for some reason, I can't see this bugger's UUID.
|
|
|
05-15-2014, 03:30 AM
|
#4
|
Member
Registered: Sep 2012
Distribution: Slackware
Posts: 185
Rep:
|
Quote:
And for some reason, I can't see this bugger's UUID.
|
What do you see if you do:
Code:
ls /dev/disk/by-id
ls /dev/disk/by-uuid
|
|
|
05-15-2014, 03:49 AM
|
#5
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,184
Rep:
|
Code:
lsblk -o NAME,KNAME,FSTYPE,UUID,OWNER,GROUP,MODE,RO,RM,MODEL
or for all block devices
Code:
lsblk -ao NAME,KNAME,FSTYPE,UUID,OWNER,GROUP,MODE,RO,RM,MODEL
Last edited by Didier Spaier; 05-15-2014 at 04:21 AM.
Reason: option -a added in second command
|
|
|
05-15-2014, 10:06 PM
|
#6
|
Member
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583
Original Poster
|
@Loomx
Code:
root@fruitbomb:~# ls /dev/disk/by-id
ata-FUJITSU_MJA2160BH_G2_K950T9726862@
ata-FUJITSU_MJA2160BH_G2_K950T9726862-part1@
ata-FUJITSU_MJA2160BH_G2_K950T9726862-part2@
ata-MATSHITADVD-RAM_UJ-862_HE25_045929@
dm-name-bomfunk-home@
dm-name-bomfunk-root@
dm-name-bomfunk-swap@
dm-name-lukssda2@
dm-uuid-CRYPT-LUKS1-5df43021bfa74c42a8dc69280d583948-lukssda2@
dm-uuid-LVM-enICCXLmmOmMj7cd50gv1I3KyMG93n0SV7IVsaY96x4gSCDwFFAEehzl6g0jnu0U@
dm-uuid-LVM-enICCXLmmOmMj7cd50gv1I3KyMG93n0SmRyDld4LzJ6DyBiAtjvOzypT5AqEKwdZ@
dm-uuid-LVM-enICCXLmmOmMj7cd50gv1I3KyMG93n0SqstYG63bZHej1KLdgyWJLqm7c45uarUX@
usb-WD_My_Passport_0748_5758423145363253535A3630-0:0@
usb-WD_My_Passport_0748_5758423145363253535A3630-0:0-part1@
wwn-0x500000e043be10b9@
wwn-0x500000e043be10b9-part1@
wwn-0x500000e043be10b9-part2@
root@fruitbomb:~# ls /dev/disk/by-uuid
5c3684f2-27e7-487b-8fb5-5c18aca2113d@ 9f4afaa6-d603-4567-81e9-58e1c6687868@ f5d0bc36-ad67-4db9-b365-d2ebd8faddcc@
5df43021-bfa7-4c42-a8dc-69280d583948@ a9ba6577-1273-44c8-8810-a230831edc27@
@Didier Spaier
Code:
root@fruitbomb:~# lsblk -o NAME,KNAME,FSTYPE,UUID,OWNER,GROUP,MODE,RO,RM,MODEL
NAME KNAME FSTYPE UUID OWNER GROUP MODE RO RM MODEL
sda sda root disk brw-rw---- 0 0 FUJITSU MJA2160B
├─sda1 sda1 ext4 9f4afaa6-d603-4567-81e9-58e1c6687868 root disk brw-rw---- 0 0
└─sda2 sda2 crypto_LUKS 5df43021-bfa7-4c42-a8dc-69280d583948 root disk brw-rw---- 0 0
└─lukssda2 (dm-0) dm-0 LVM2_member MjXooJ-Pdos-EZYd-2spf-501s-CBcX-Q3G6Y2 root disk brw-rw---- 0 0
├─bomfunk-root (dm-1)
dm-1 ext4 5c3684f2-27e7-487b-8fb5-5c18aca2113d root disk brw-rw---- 0 0
├─bomfunk-swap (dm-2)
dm-2 swap a9ba6577-1273-44c8-8810-a230831edc27 root disk brw-rw---- 0 0
└─bomfunk-home (dm-3)
dm-3 ext4 f5d0bc36-ad67-4db9-b365-d2ebd8faddcc root disk brw-rw---- 0 0
sdb sdb root disk brw-rw---- 0 0 My Passport 0748
└─sdb1 sdb1 root disk brw-rw---- 0 0
sr0 sr0 root cdrom brw-rw---- 0 1 DVD-RAM UJ-862
root@fruitbomb:~# lsblk -ao NAME,KNAME,FSTYPE,UUID,OWNER,GROUP,MODE,RO,RM,MODEL
NAME KNAME FSTYPE UUID OWNER GROUP MODE RO RM MODEL
sda sda root disk brw-rw---- 0 0 FUJITSU MJA2160B
├─sda1 sda1 ext4 9f4afaa6-d603-4567-81e9-58e1c6687868 root disk brw-rw---- 0 0
└─sda2 sda2 crypto_LUKS 5df43021-bfa7-4c42-a8dc-69280d583948 root disk brw-rw---- 0 0
└─lukssda2 (dm-0) dm-0 LVM2_member MjXooJ-Pdos-EZYd-2spf-501s-CBcX-Q3G6Y2 root disk brw-rw---- 0 0
├─bomfunk-root (dm-1)
dm-1 ext4 5c3684f2-27e7-487b-8fb5-5c18aca2113d root disk brw-rw---- 0 0
├─bomfunk-swap (dm-2)
dm-2 swap a9ba6577-1273-44c8-8810-a230831edc27 root disk brw-rw---- 0 0
└─bomfunk-home (dm-3)
dm-3 ext4 f5d0bc36-ad67-4db9-b365-d2ebd8faddcc root disk brw-rw---- 0 0
sdb sdb root disk brw-rw---- 0 0 My Passport 0748
└─sdb1 sdb1 root disk brw-rw---- 0 0
sr0 sr0 root cdrom brw-rw---- 0 1 DVD-RAM UJ-862
ram0 ram0 root disk brw-rw---- 0 0
ram1 ram1 root disk brw-rw---- 0 0
ram2 ram2 root disk brw-rw---- 0 0
ram3 ram3 root disk brw-rw---- 0 0
ram4 ram4 root disk brw-rw---- 0 0
ram5 ram5 root disk brw-rw---- 0 0
ram6 ram6 root disk brw-rw---- 0 0
ram7 ram7 root disk brw-rw---- 0 0
ram8 ram8 root disk brw-rw---- 0 0
ram9 ram9 root disk brw-rw---- 0 0
loop0 loop0 root disk brw-rw---- 0 0
loop1 loop1 root disk brw-rw---- 0 0
loop2 loop2 root disk brw-rw---- 0 0
loop3 loop3 root disk brw-rw---- 0 0
loop4 loop4 root disk brw-rw---- 0 0
loop5 loop5 root disk brw-rw---- 0 0
loop6 loop6 root disk brw-rw---- 0 0
loop7 loop7 root disk brw-rw---- 0 0
ram10 ram10 root disk brw-rw---- 0 0
ram11 ram11 root disk brw-rw---- 0 0
ram12 ram12 root disk brw-rw---- 0 0
ram13 ram13 root disk brw-rw---- 0 0
ram14 ram14 root disk brw-rw---- 0 0
ram15 ram15 root disk brw-rw---- 0 0
(EDIT: I made a grevious error which is now fixed in the text)
It does not appear to report it's UUID, though it is mounted (by root) and read/write works for user....Maybe I'll have to make her learn some command prompt :cries inside:
Last edited by STDOUBT; 05-15-2014 at 11:07 PM.
Reason: Greivous error in text which is now fixed. Once more...all fixed now I swear to it!
|
|
|
05-15-2014, 10:26 PM
|
#7
|
Member
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Rep:
|
You could put the commands in a shell script, and use a desktop file to run the script.
Something like the following:
mount-ext-drive.sh
Code:
#!/bin/bash
# Script to mount an external drive as root
if [ -e /dev/sdb1 ] && [ -d /media/WDMyPassport ]; then
mount -t exfat /dev/sdb1 /media/WDMyPassport/
else
exit 1
fi
mount-ext-drive.desktop
Code:
[Desktop Entry]
Name=Mount External Drive
GenericName=Mount External Drive
Icon=thunar
Exec=pkexec <path-to-script>
Type=Application
Categories=System;
Encoding=UTF-8
Terminal=true
StartupNotify=false
I have not tested it, so cant say if it works or not; used this concept before though.
|
|
|
05-15-2014, 11:30 PM
|
#8
|
Member
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583
Original Poster
|
@aaditya,
That is a good thought. Some kind of scripting.
Though I was hoping to make the OS do the work ;-).
FWIW:
Code:
root@fruitbomb:~# file /dev/disk/by-uuid/5c3684f2-27e7-487b-8fb5-5c18aca2113d
/dev/disk/by-uuid/5c3684f2-27e7-487b-8fb5-5c18aca2113d: symbolic link to `../../dm-1'
root@fruitbomb:~# file /dev/disk/by-uuid/5df43021-bfa7-4c42-a8dc-69280d583948
/dev/disk/by-uuid/5df43021-bfa7-4c42-a8dc-69280d583948: symbolic link to `../../sda2'
root@fruitbomb:~# file /dev/disk/by-uuid/9f4afaa6-d603-4567-81e9-58e1c6687868
/dev/disk/by-uuid/9f4afaa6-d603-4567-81e9-58e1c6687868: symbolic link to `../../sda1'
root@fruitbomb:~# file /dev/disk/by-uuid/a9ba6577-1273-44c8-8810-a230831edc27
/dev/disk/by-uuid/a9ba6577-1273-44c8-8810-a230831edc27: symbolic link to `../../dm-2'
root@fruitbomb:~# file /dev/disk/by-uuid/f5d0bc36-ad67-4db9-b365-d2ebd8faddcc
/dev/disk/by-uuid/f5d0bc36-ad67-4db9-b365-d2ebd8faddcc: symbolic link to `../../dm-3'
|
|
|
05-15-2014, 11:37 PM
|
#9
|
Member
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Rep:
|
Ok, when I want to find the UUID of a device / partition, I simply type
And another thing, I think Thunar allows auto mounting of removable drives; you can look at Settings -> Removable Drives and see if there's something that could help you.
Edit-
You could also look at Settings -> Session and Startup and see whether Thunar-volman is being auto started or not.
Also you could clear your Xfce session and reboot to see if it makes a difference.
Last edited by aaditya; 05-15-2014 at 11:39 PM.
|
|
|
05-16-2014, 11:18 AM
|
#10
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
Thunar won't actually mount the drive, but it will show an icon in the panel with all the other partitions that will perform the mount if you click on it. There's an eject button too.
aaditya's suggestion to see if the Thunar-volman is being started is a very good one; that's what provides the icon to click.
|
|
|
05-16-2014, 08:33 PM
|
#11
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,590
|
Quote:
I have tried at least a dozen well-crafted fstab entries. None allowed user read/write.
And for some reason, I can't see this bugger's UUID.
|
Could you share some of those entries you've tried?
blkid is the command I tend to prefer to find out UUIDs. I don't have any rationale for that except that it's easy to remember.
Code:
$ /sbin/blkid
/dev/sda1: UUID="ad52eed9-c80c-41fe-81a6-e8a9a71e6f19" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="35f7217b-f73b-4cd1-b513-571bd0482a18"
/dev/sdb1: UUID="1655a198-15a7-471f-9e99-e3fc9fd92ca0" TYPE="ext3"
/dev/sdb5: UUID="7900ade7-de36-41e5-88b5-2d7aaa8adcd4" TYPE="ext3"
|
|
|
05-17-2014, 01:00 AM
|
#12
|
Member
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583
Original Poster
|
@ Richard Cranium
I found that Thunar-volman was not running. I had glanced at the "Session and Startup" and saw
"XFCE Volume Daemon", and by mistake, I thought that was the volume manager for hotplug devices.
I made sure thunar-volman (/usr/bin/thunar-volman) was running, rebooted, then looked at "Session and Startup" again to make sure it was still running. It shows as running in "Session and Startup" ( the tick-box is checked), BUT I can't find thunar-volman by running ps.
@frankbell
If I uncomment this line in fstab, the icon appears immediately in Thunar.
Code:
/dev/sdb1 /media/WDMyPassport exfat defaults 0 0
Clicking on said icon results in:
"mount: only root can mount /dev/sdb1 on /media/WDMyPassport."
Using the line below results in exactly the same behavior:
Code:
/dev/sdb1 /media/WDMyPassport fuseblk rw,nosuid,nodev,allow_other,blksize=4096 0 0
Code:
root@fruitbomb:~# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ext4 9f4afaa6-d603-4567-81e9-58e1c6687868 /boot
└─sda2 crypto_LUKS 5df43021-bfa7-4c42-a8dc-69280d583948
└─lukssda2 (dm-0) LVM2_member MjXooJ-Pdos-EZYd-2spf-501s-CBcX-Q3G6Y2
├─bomfunk-root (dm-1) ext4 5c3684f2-27e7-487b-8fb5-5c18aca2113d /
├─bomfunk-swap (dm-2) swap a9ba6577-1273-44c8-8810-a230831edc27 [SWAP]
└─bomfunk-home (dm-3) ext4 f5d0bc36-ad67-4db9-b365-d2ebd8faddcc /home
It's just not reporting...I'm beginning to suspect a firmware limitation with this mutant HDD.
|
|
|
05-17-2014, 08:14 PM
|
#13
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,590
|
Code:
/dev/sdb1 /media/WDMyPassport exfat defaults 0 0
Try replacing defaults with rw,user,auto as shown, without any spaces.
rw= "read/write"; user="user can mount/access"; auto="automount" Those settings work on my system.
|
|
|
05-17-2014, 11:53 PM
|
#14
|
LQ Guru
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
|
Slackware includes udisks2 which should auto-detect and auto-assign a mount point in Thunar. I would check and see if udisks2 is properly working. You should also have fstab's comment on the NTFS-3G partition commented out so udisks2 can work properly with NTFS-3G, udev, and FUSE.
Normally most people recommend a fixed mount point, but you should only do a fixed mount point for local disks, not removable ones.
|
|
|
05-18-2014, 08:30 PM
|
#15
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,590
|
Quote:
Normally most people recommend a fixed mount point, but you should only do a fixed mount point for local disks, not removable ones.
|
Does this statement include "removable drives" that are never removed?
|
|
|
All times are GMT -5. The time now is 10:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|