Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Mounting a usb (problem)


    I have Windows (/dev/sda1) and Slackware(/dev/sda2). I have a problem, when I try to mount a usb stick to my computer when I am using slackware. I do the following:
    login as root ->
    -> cd mnt, -> mkdir usbkey
    -> mount /dev/sda2 /mnt/usbkey

    When I list now /mnt/usbkey, I see in usbkey all files, which are under root: /bin, /dev, /home, ..... etc. I expect in /mnt/usbkey to be the files, which are on my usb stick (they should be there, shouldn't they?).

    Then, I unmount the devide (umount /mnt/usbkey), and add in /etc/fstab this line: /dev/sda2 /mnt/usbkey vfat noauto, users, rw, umask=000. When I leave root, and go to my user directory, I try to mount the key: mount /mnt/usbkey, and I get the message:
    mount: /dev/sda2 already mounted or /mnt/usbkey busy
    mount: according to mtab, /dev/sda2 is already mounted on /mnt/usbkey.

    But I cannot see the content of the usb stick. What should I do?

  2. #2
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    The Netherlands
    Welcome to the forums!

    /dev/sda2 is your Slackware partition. When you mount it under /mnt/usbkey, you will have your Slackware partition mounted twice.

    What you need to do is mount your USB-stick. For that you need the device name. Try this:

    Plug in the USB, wait a few seconds and type:
    You'll get output similar to:
    sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00
    sd 6:0:0:0: [sdb] Assuming drive cache: write through
    sd 6:0:0:0: [sdb] 3987456 512-byte hardware sectors (2042 MB)
    sd 6:0:0:0: [sdb] Write Protect is off
    sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00
    sd 6:0:0:0: [sdb] Assuming drive cache: write through
     sdb: sdb1
    sd 6:0:0:0: [sdb] Attached SCSI removable disk
    sd 6:0:0:0: Attached scsi generic sg1 type 0
    usb-storage: device scan complete
    What you see here is that the kernel recognizes a sd device, and calls it sdb1. It's this line that is most interesting for your purpose:
     sdb: sdb1
    I expect your machine to give a similar name to the USB. So now
    mount /dev/sdb1 /mnt/usbkey
    Et voila!

    The same can be automated by adding your username to the plugdev group.
    Can't tell an OS by it's GUI

  3. #3

    I have also faced similar problems. The problem, as stated before, is that your usb cannot be /dev/sda2. /dev/sda2 is your slackware partition. Your usb should be something like /dev/sd*. * could be almost anything but a, because sda is used by the harddisk. So using dmesg you can figure out the device that is used by your usb.
    And then change your fstab accordingly.

    Ex. of Fstab.

    /dev/sdf1 /mnt/usb noauto, users, rw 0 0 <--- something like that.

    Note: If you have slackware 12.1 and the utils-linux-ng* pkg, you can comment that line in your fstab. because, as far as i am concerned hal takes care of that. Although, I am pretty sure that you need to have your usb device mounted properly.

    Happy Slacking

  4. $spacer_open
  5. #4
    Hi Freston and limac,

    I've managed to mount the stick. The device used by the usb was sdb1. Thanks a lot for the replies!

  6. #5
    Just Joined!
    Join Date
    Apr 2009

    mounting usb key

    from what you wrote (slackware installed in /dev/sda2)
    your usb key is definitely not in /dev/sda2
    If your internal hard drive is scssi or sata, the external drive is
    defintitely not /dev/sda

    what I usually do when I want to mount an external usb drive
    is list the partitions by typing this

    cat /proc/partitions

    then look at all the lines that look like


    If you have only your internal hard drive and inserted a single
    usb key with just one partition on it, chances are that it's /dev/sdb1
    but if you inserted more than one, then the first one is /dev/sdb1
    the second /dev/sdc1
    Let's suppose it's /dev/sdb1, then
    first make sure the mount point exists:

    mkdir -p /mnt/sdb1

    then, mount the key

    mount /dev/sdb1 /mnt/sdb1

    now, you should be able to see the contents

    ls /mnt/sdb1

    in slackware, by default only root can mount
    but you can change some settings so that an ordinary
    user can mount usb disks and cd/dvds
    also use a simpler command

    mount /mnt/sdb1

    If you don't know how to do it, I can tell you next time

    Also, by default, when you're in kde and you insert a usb key
    or a cd it's mounted automatically and an icon should appear
    on the desktop

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts