LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-22-2013, 03:27 AM   #1
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 5,955

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
USB Disk Mount oddness Slackware-14.0


I have 2 usb disks in /etc/fstab with the user option, so I can mount them as user
Code:
/dev/sdb1        /mnt/zip	  auto        noatime,diratime,user     0   0
/dev/sdc1	 /mnt/hd	  auto	      noatime,diratime,user     0   0
If I plug one in, and try as user to mount it, it's not seen. I have to run 'fdisk -l' as root, and then the system sees it. WM is XFCE. What's the deal? It will remount, however. There will be a quick lazy tweak out there somewhere to fix this nonsense, and I'd love to hear it.

Even dmesg |tail doesn't show the complete dialog. (Dmesg has to be sudo dmesg - who got all paranoid over in slackware ?. It stops short of announcing the partitions, so the partitions 'don't exist' until I run the fdisk. Of course, XFCE's automounter is also snagged in permissions.
 
Old 01-22-2013, 09:25 AM   #2
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 145Reputation: 145
Quote:
Originally Posted by business_kid View Post
... and try as user to mount it, it's not seen. ...
Could you retell this in plain text, i.e. something like this:

I issued the command "mount /dev/sdc1 /mnt", and got a message "mount: only root can do that"
 
Old 01-22-2013, 10:42 AM   #3
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,656

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
I'd try to add the noauto option. Also look at dmesg's output when you plug in the usb disk.
 
Old 01-22-2013, 12:28 PM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 5,955

Original Poster
Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Thanks for the reply, and Didier for the 'noauto' idea - that's going in.

Quote:
Originally Posted by guanx View Post
Could you retell this in plain text, i.e. something like this:

I issued the command "mount /dev/sdc1 /mnt", and got a message "mount: only root can do that"

Explaining anything in simple English is usually beyond me. Great minds run in great circles :-)
The error is/was
Code:
special device /dev/sdc1 does not exist
fdisk -l as root finds it, the partition table is read; I can mount it thereafter


Despite a reboot, the same thing isn't happening today, and my hardware is flaky, so I'll mark this solved without solving it. The USB port on my camera is knackered; I have 2xSD-->micro sd adapters, and one of them is disassembling itself:-/. It throws out a $2 sd card reader 100% of the time, though it's happy with it other days. It continually recognizes my usb key - it seems to have taken note of it somewhere. When/if I get the problem back the problem, and believe in my hardware, I'll start a new thread.

Last edited by business_kid; 01-23-2013 at 02:32 AM.
 
Old 01-22-2013, 12:52 PM   #5
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,656

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
As you have two usb devices, the first one which is plugged in after booting gets the hdb1 interface name, whatever it be.

To avoid that, simply name them in /etc/fstab by their UUID (which will never change as it is an attribute of the physical device) not by the interface name in use at a point of time.

For that, plug one of them in, type "blkid" as root, and use the info given to feed a line for that device in /etc/fstab.

Here is an example:
Code:
su
/dev/sda1: LABEL="RM-CM-)servM-CM-) au systM-CM-(me" UUID="9A185F24185EFF27" TYPE="ntfs" 
/dev/sda2: UUID="78D46329D462E938" TYPE="ntfs" 
/dev/sda3: UUID="56d1b80a-c999-496a-b906-a13221e7890e" TYPE="ext4" 
/dev/sda5: UUID="4b7861c6-bcc7-4ba0-931b-d0f4597e52dd" TYPE="ext4" 
/dev/sda6: UUID="be30390a-f2d5-4fdc-96db-94c2b70e4955" TYPE="swap" 
/dev/sdb1: UUID="cd2b0100-ec15-483e-9016-2b192d8d126a" TYPE="vfat"
Here let's say the last line if for a partition in an USB key, I would append following line for it /etc/fstab:
Code:
UUID=cd2b0100-ec15-483e-9016-2b192d8d126a   /mnt/usbkey   vfat   noauto,user   0   0

Last edited by Didier Spaier; 01-22-2013 at 12:53 PM.
 
Old 01-23-2013, 02:37 AM   #6
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 5,955

Original Poster
Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Thanks Didier, but I have a personal loathing for uuids. Purely personal - I don't ask anyone else to loathe them. And with the exception of my usb key, there's a pile of usb disks get plugged in from time to tme - GPS, son's gear, phone, sd card reader, etc. The medium term cure is to set up automount in XFCE, but it's a permissions hack and I have to web search it each time.
 
Old 01-23-2013, 04:34 AM   #7
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,656

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Quote:
Originally Posted by business_kid View Post
Thanks Didier, but I have a personal loathing for uuids. Purely personal - I don't ask anyone else to loathe them. And with the exception of my usb key, there's a pile of usb disks get plugged in from time to tme - GPS, son's gear, phone, sd card reader, etc. The medium term cure is to set up automount in XFCE, but it's a permissions hack and I have to web search it each time.
(1) if you don't like uuids, you could use labels instead -- just kidding, I assume that you loathe labels as well :^)
(2) I just launched XFCE for the first time ever in Slackware-14.0 (I'm a fluxboxer) and didn't have to set up anything to get automount of an USB HD (two partitions) plus an USB key. i just had to right click on the icon displayed for each partition and choose "open".
Code:
bash-4.2$ cat /proc/partitions
major minor  #blocks  name

   8        0  156290904 sda
   8        1     102400 sda1
   8        2   36467712 sda2
   8        3   97281607 sda3
   8        4          1 sda4
   8        5   18239488 sda5
   8        6    4192933 sda6
  11        0    1048575 sr0
   8       16  976759808 sdb
   8       17  911467590 sdb1
   8       18   28107776 sdb2
   8       19    3144704 sdb3
   8       20   34037760 sdb4
   8       32     126464 sdc
   8       33     126433 sdc1
bash-4.2$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3        92G   55G   32G  64% /
/dev/sda5        18G  9,2G  7,2G  57% /current
tmpfs           1,5G     0  1,5G   0% /dev/shm
/dev/sda2        35G   30G  5,3G  85% /windows
/dev/sdc1       122M   43M   80M  35% /run/media/didier/USBSLACKINS
/dev/sdb4        33G   30G  2,8G  92% /run/media/didier/05CA0CD90B63ADB5
/dev/sdb2        27G  6,9G   19G  28% /run/media/didier/0c698508-4662-4d53-b18f-064aa97d1301
/dev/sda1       100M   25M   76M  25% /run/media/didier/Réservé au système
bash-4.2$
PS But please note that I have no entries in /etc/fstab for sdb2, sdb4 and sdc1.
Amazingly /dev/sdb1 which has one is not auto mounted.
So I guess that for XFCE to automount your partitions you should remove corresponding lines in /etc/fstab.
Maybe there is a setting you can use in XFCE to choose yourself the mount points - but hey, I guess that in that case you would need to identify the partitions either by UUID or by LABEL. Oh, well...

Oh, and /dev/sdb3 is a swap partition, so it's pretty normal that it be not mounted.

Last edited by Didier Spaier; 01-23-2013 at 04:48 AM. Reason: PS appended and edited
 
Old 01-24-2013, 04:54 AM   #8
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 5,955

Original Poster
Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
It works here too - I have been using XFCE for 2-3 releases, but I don't know it yet. I never gave it any time. It works once as you said off the desktop; Thunar(file manager - I've learned that much) hasn't a clue about it, and if I unmount it, the icon vanishes :-/. Then pull it and push it back somewhere else, and thunar automounts it :-///.

/retires to a home for the bewildered :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount an USB disk in redhat? karthikit Linux - General 1 10-24-2007 06:09 AM
usb flash drive / ext2 oddness slimjim Linux - Hardware 3 01-03-2007 05:20 PM
installing slackware to usb harddrive...no /dev/sda2 on disk to mount for cfdisk surfbass Slackware 7 05-09-2006 07:37 AM
Mount USB disk with permissions EcceVery Debian 4 06-05-2005 12:18 PM
How to mount my usb hard disk? raoqn Fedora 1 04-01-2004 05:21 AM


All times are GMT -5. The time now is 04:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration