Announcement

Collapse
No announcement yet.

Problem Mounting USB Disk Drives

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem Mounting USB Disk Drives

    System: kubuntu hardy on a Centrino Duo notebook.

    I'm having some difficulty mounting my USB disk drive as a user. It has
    a Windoze partition and a Linux partition on it (/dev/sdb1, /dev/sdb2 is
    how it usually shows up, but I use UUIDs in fstab in case that changes).

    So far, what I am doing is mounting the drives manually and that's what
    the rest of this post is about.

    But, what I'd really like is to have the drives auto mount whenever
    they're plugged in. I can't just set them to auto in fstab because
    then, Linux would jump up and down during boot up if they're not plugged
    in. I also have another usb disk drive that I want to have work the
    same way (with different mount points) once I get this to work.

    Almost everything is right except what appears to be a permissions problem.

    As illustrated below, mount and pmount work when issued by my user.

    What doesn't work is using the icons that appear on my desktop when the
    drive is plugged in or another drive like a thumbdrive is plugged in
    (the icons don't show up if the drive was already plugged in at boot time).

    To debug this, I tried using mount specifying the device as well as the
    mount point (from konsole) and that fails as well. Maybe it has
    something to do with /dev/sdb1 and sdb2 belonging to the "disk" group.
    Or maybe it is a conflict between using UUIDs in fstab and using the
    device name in the mount command - which is what it looks like the
    desktop icons may be doing.

    The following (from konsole) illustrates what's wrong:

    bigbird@sananda:/media$ pmount /media/joelinusb2
    bigbird@sananda:/media$ pumount /media/joelinusb2
    bigbird@sananda:/media$ mount /media/joelinusb2
    bigbird@sananda:/media$ umount /media/joelinusb2
    bigbird@sananda:/media$ mount /dev/sdb2 /media/joelinusb2
    mount: only root can do that
    bigbird@sananda:/media$ mount /dev/sdb1 /media/joewinusb
    mount: only root can do that
    bigbird@sananda:/media$ ls -l /dev/sdb1
    brw-rw---- 1 root disk 8, 17 2008-11-24 13:26 /dev/sdb1
    bigbird@sananda:/media$ ls -l /dev/sdb2
    brw-rw---- 1 root disk 8, 18 2008-11-24 13:26 /dev/sdb2
    bigbird@sananda:/media$

    The mount points are in /media
    drwxr-xr-x 2 root usbdrives 4096 2008-11-24 02:50 joelinusb2
    drwxr-xr-x 2 root usbdrives 4096 2008-04-18 02:21 joewinusb

    My user is a member of the usbdrives group (gid=1002).

    The entries in /etc/fstab (that I manually added) are

    #Entry for /dev/sdb2 - joelinusb2 usb Linux partition
    UUID=290fdbe2-4535-4b43-a035-7805062cb069 /media/joelinusb2 ext3
    user,async,atime,noauto,rw,dev,exec,suid 0 0
    # Entry for /dev/sdb1 - joewinusb usb drive Windows partition
    UUID=0BDD76C77F0F8CEE /media/joewinusb ntfs-3g
    user,noauto,rw,gid=1002,umask=0002,locale=en_US.ut f8 0 0

    I have verified the UUIDs. I guess they have to be right or pmount
    wouldn't work.

    Any ideas on how to fix this or do it right would be appreciated.

    Joe



    kubuntu Xenial - Toshiba i3 and Toshiba i7 Notebooks

    #2
    Re: Problem Mounting USB Disk Drives

    You need sudo if you wish to mount the drives. You'll note that only the owner, "root" has the right to read or write the drives. The clue is in the error message "only root can do that". Also, on the KISS principle, I would simply use "defaults" instead of the complicated fstab entries you've got, less room for mistakes.

    Comment


      #3
      Re: Problem Mounting USB Disk Drives

      That's not correct. The "user" switch of mount/fstab is for that. And as my post clearly shows, mount and pmount work fine wiithout sudo, etc. and mouting my thumbdrives works fine too.

      The issue is that the desktop icons don't work. And my attempt to emulate what they're doing from the command line by also specifying /dev/sdb2 doesn't work when the mount command without it works fine.
      kubuntu Xenial - Toshiba i3 and Toshiba i7 Notebooks

      Comment


        #4
        Re: Problem Mounting USB Disk Drives

        Please see this post. I'm sorry, I forgot about umask=0 !

        Comment

        Working...
        X