Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
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.
for the past while I've been having problems mounting usb storage devices in KDE.
Whenever I plug in a usb pen, KDE comes up with a dialog asking me whether I want to mount it or do nothing. If I choose to mount it, it takes me to system:/media/sdb1 and returns
Quote:
mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error. In some cases useful info is found in syslog - try dmesg | tail or so.
Alright. dmesg has the following information, which looks fine to me:
Code:
usb 3-6: new high speed USB device using ehci_hcd and address 4
usb 3-6: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi4 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
scsi 4:0:0:0: Direct-Access LEXAR JUMPDRIVE PRO 0 PQ: 0 ANSI: 2
sd 4:0:0:0: [sdb] 503808 512-byte hardware sectors (258 MB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 6b 00 00 00
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] 503808 512-byte hardware sectors (258 MB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 6b 00 00 00
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 4:0:0:0: [sdb] Attached SCSI removable disk
sd 4:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
If from system:/media/sdb1 I move up one level to system:/media/ I get the error
Quote:
The process for the media protocol died unexpectedly.
However, I manage to mount the usb pen, as root, without errors with
Code:
mount -t vfat /dev/sdb1 /media/folder/
I googled this and found little bits of information here and there. I reinstalled pmount, kdebase-kio-plugins, and udev but nothing changed. My user is in the plugdev group.
My laptop also has a card reader, and if I stick an SD card in it, KDE manages to mount it flawlessly.
In this case it would seem there are some mistakes in /etc/fstab. Please post your fstab file, which holds all data to what is beeing booted, and with what permissions, and such.
I had forgotten about the last line!
When I saw it I wanted to test whether I can mount usb pens when that external HD is plugged in (and seen as sdb1). It didn't work.
Just as before, system:/media/sdb1 comes up and is empty. If I go one level up, the media protocol _won't_ crash, but if I click on the external HD icon, it will return the mount error "mount: wrong fs type, bad option, ...".
The problem here might be the filesystem you want it to use for your USB stick. Your usb stick probably isn't formatted as NTFS. What fstab is trying to do at the moment is mounting a NTFS filesystem, which is not possible as your USB stick is formatted as fat.
I'd try changing the file type either to vfat, but then you'll have to change it if back to ntfs again each time u want to mount your external HD. So i'd try "auto" as file system.
True. The USB pens are formatted with various FAT filesystems, while the external HD is ntfs.
If I specify the fs for sdb1 as auto, I don't think it would recognise and mount the ntfs HD, since it has to use ntfsmount from ntfsprogs instead of mount to mount it.
That was the reason why I originally put that line in the file. :/
How can I go about still managing to mount usb pens as a user from KDE and also easily mounting the ntfs HD?
Use "UUID=<UUID#>" in the /etc/fstab entry instead. AFAIK, if you want KDE to automount a pendrive, there shouldn't be an entry for it in fstab. This is true for SuSE at least. A kernel message will say that HAL refuses to mount it.
Also, try mounting the pendrive manually. Is it properly formatted? I saw /dev/sdb but not /dev/sdb1 in the kernel messages. Was the entire filesystem formatted?
Here I mounted a 2GB pen drive:
Code:
1 Mar 15 13:55:20 qosmio kernel: usb 5-1: reset high speed USB device using ehci_hcd and address 2
2 Mar 15 13:55:20 qosmio kernel: usb 5-1.4: new high speed USB device using ehci_hcd and address 4
3 Mar 15 13:55:20 qosmio kernel: usb 5-1.4: configuration #1 chosen from 1 choice
4 Mar 15 13:55:20 qosmio kernel: usb 5-1.4: New USB device found, idVendor=0930, idProduct=6544
5 Mar 15 13:55:20 qosmio kernel: usb 5-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
6 Mar 15 13:55:20 qosmio kernel: usb 5-1.4: Product: USB Flash Memory
7 Mar 15 13:55:20 qosmio kernel: usb 5-1.4: Manufacturer:
8 Mar 15 13:55:20 qosmio kernel: usb 5-1.4: SerialNumber: 0802212145123
9 Mar 15 13:55:21 qosmio kernel: Initializing USB Mass Storage driver...
10 Mar 15 13:55:21 qosmio kernel: scsi6 : SCSI emulation for USB Mass Storage devices
11 Mar 15 13:55:21 qosmio kernel: usbcore: registered new interface driver usb-storage
12 Mar 15 13:55:21 qosmio kernel: USB Mass Storage support registered.
13 Mar 15 13:55:21 qosmio kernel: usb-storage: device found at 4
14 Mar 15 13:55:21 qosmio kernel: usb-storage: waiting for device to settle before scanning
15 Mar 15 13:55:22 qosmio kernel: scsi 6:0:0:0: Direct-Access USB Flash Memory 1.00 PQ: 0 ANSI: 2
16 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] 3946367 512-byte hardware sectors: (2.02GB/1.88GiB)
17 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] Write Protect is off
18 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] Mode Sense: 0b 00 00 08
19 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
20 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] 3946367 512-byte hardware sectors: (2.02GB/1.88GiB)
21 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] Write Protect is off
22 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] Mode Sense: 0b 00 00 08
23 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
24 Mar 15 13:55:22 qosmio kernel: sdc: sdc1
25 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: [sdc] Attached SCSI removable disk
26 Mar 15 13:55:22 qosmio kernel: sd 6:0:0:0: Attached scsi generic sg3 type 0
27 Mar 15 13:55:22 qosmio kernel: usb-storage: device scan complete
28 Mar 15 13:55:23 qosmio hald: mounted /dev/sdc1 on behalf of uid 1000
Note lines 24-28.
Here is one way to determine the UUID of your NTFS partition:
Use this technique for all external partitions. You might consider it for others as well. That way, if you repartition your internal hard drive, and the device nodes change as a result, the /etc/fstab entries will still be valid.
You can check the pendrive with fdisk & file:
sudo /sbin/fdisk -l /dev/sdb
sudo file -s /dev/sdb
sudo file -s /dev/sdb1
Now, whenever I try to mount the external HD with KDE (in system:/media/) I get a "Permission denied" error. I thought I had the right options in fstab, am I right?
With ntfsmount from command line I can mount the HD as user.
Last edited by LordFrancis; 03-15-2009 at 03:26 PM.
Reason: update
Don't use the /media/ directory for manually mounted partitions. /media is for auto mounted media if your system uses HAL. Is the NTFS drive external or internal. If it is internal, then remove the "noauto" option and it will be mounted when you boot up.
If it is an internal disk, then you can comment out the /etc/fstab entry and rely on automounting to mount it. Or (supposing you change /media/tb to /mnt/tb) you can enter: "mount /mnt/tb" as a regular user.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.