You are not logged in.

#1 2010-03-25 12:59:43

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Mounting issues, particularly usb

Hi all,
I am having a great time using Arch Linux.  I am currently running a pretty minimal install with Openbox as my desktop manager.

I have had a few issues getting my drives to mount.

Here is my fstab

# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

/dev/cdrom             /media/cdrom   auto    ro,user,noauto,unhide   0      0
/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0

#/dev/fd0               /media/fl   auto    user,noauto             0      0

/dev/sda1 / ext3 defaults,noatime 0 1
/dev/sda2 /var reiserfs defaults,noatime,notail 0 2
/dev/sda3 swap swap defaults 0 0
/dev/sda4 /home ext3 defaults,noatime 0 2

#for usb
/dev/sdb1 /mnt/sdb1  vfat   user,noauto,unhide   0      0

So to try and get things to automount I followed the autofs instructions http://wiki.archlinux.org/index.php/Autofs

In my autofs.master I put

# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).

/media /etc/autofs/auto.misc

and in auto.misc

# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

cdrom -fstype=auto,ro,nodev,nosuid :/dev/cdrom
dvd -fstype=auto,ro,user,noauto,unhide :/dev/dvd
#floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl
usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sdb1

This now seems to have got cds automounting and unmounting.

However no such luck with usb sticks. I think the problem might be that my usb sticks/drives do not live at /dev/sdb1, however I am not sure how to find where they do live.

I tried following the information on the udev page http://wiki.archlinux.org/index.php/Udev but that also didn't seem to help.

Thanks for your time, ask for any more output you need!

Offline

#2 2010-03-25 13:59:34

jimburnettva
Member
From: Virginia, USA
Registered: 2010-02-12
Posts: 48
Website

Re: Mounting issues, particularly usb

1. Plug in a USB stick.
2. Open a command line terminal (shell, prompt whatever you wana call it )
3. Type     dmesg
4. Check output.

Towards the bottom of the output (hopefully) you should see some USB related stuff.
Here is my output:

Initializing USB Mass Storage driver...
scsi6 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 6:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
sd 6:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
sd 6:0:0:0: [sdb] 7936000 512-byte logical blocks: (4.06 GB/3.78 GiB)
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
sd 6:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 6:0:0:0: [sdb] Assuming drive cache: write through
sd 6:0:0:0: [sdb] Attached SCSI removable disk

sdb would be my device and sdb1 is my partition. sdb2 would be the second partition if there is one etc etc...

FYI: Sometimes though for some reason some USB sticks come up as sdc.


My Linux & Progamming Blog - Jimmy Burnett

Offline

#3 2010-03-25 14:06:31

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Re: Mounting issues, particularly usb

Here is the bottom of my output

usb-storage: device scan complete
sd 4:0:0:0: [sdb] 4145664 512-byte logical blocks: (2.12 GB/1.97 GiB)
sd 4:0:0:0: [sdb] Write Protect is off
sd 4:0:0:0: [sdb] Mode Sense: 0b 00 00 08
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] Assuming drive cache: write through
 sdb:
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] Attached SCSI removable disk

with nothing after sdb: ????

Offline

#4 2010-03-25 14:08:56

jimburnettva
Member
From: Virginia, USA
Registered: 2010-02-12
Posts: 48
Website

Re: Mounting issues, particularly usb

Type   fdisk /dev/sdb

then once in fdisk   type     p    to print your partitions.

See if a USB partition is even there.


My Linux & Progamming Blog - Jimmy Burnett

Offline

#5 2010-03-25 14:10:25

jimburnettva
Member
From: Virginia, USA
Registered: 2010-02-12
Posts: 48
Website

Re: Mounting issues, particularly usb

as a test I removed my partition and re-pluggd in my USB stick and got this:


sd 7:0:0:0: [sdb] 7936000 512-byte logical blocks: (4.06 GB/3.78 GiB)
sd 7:0:0:0: [sdb] Write Protect is off
sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 7:0:0:0: [sdb] Assuming drive cache: write through
sd 7:0:0:0: [sdb] Assuming drive cache: write through
sdb:
sd 7:0:0:0: [sdb] Assuming drive cache: write through
sd 7:0:0:0: [sdb] Attached SCSI removable disk


Same thing as you.


My Linux & Progamming Blog - Jimmy Burnett

Offline

#6 2010-03-25 14:18:53

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Re: Mounting issues, particularly usb

ok I get

Command (m for help): p   

Disk /dev/sdb: 2122 MB, 2122579968 bytes
66 heads, 62 sectors/track, 1013 cylinders
Units = cylinders of 4092 * 512 = 2095104 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   ?      190161      469122   570754815+  72  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(357, 116, 40) logical=(190160, 19, 11)
Partition 1 has different physical/logical endings:
     phys=(357, 32, 45) logical=(469121, 38, 51)
Partition 1 does not end on cylinder boundary.
/dev/sdb2   ?       41225      514350   968014120   65  Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(288, 115, 43) logical=(41224, 14, 47)
Partition 2 has different physical/logical endings:
     phys=(367, 114, 50) logical=(514349, 26, 42)
Partition 2 does not end on cylinder boundary.
/dev/sdb3   ?      456961      930086   968014096   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(366, 32, 33) logical=(456960, 18, 30)
Partition 3 has different physical/logical endings:
     phys=(357, 32, 43) logical=(930085, 29, 39)
Partition 3 does not end on cylinder boundary.
/dev/sdb4   ?      705201      705215       27749+   d  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(372, 97, 50) logical=(705200, 44, 25)
Partition 4 has different physical/logical endings:
     phys=(0, 10, 0) logical=(705214, 15, 33)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

This is with the usb drive in, thanks for the suggestions

Offline

#7 2010-03-25 14:26:14

jimburnettva
Member
From: Virginia, USA
Registered: 2010-02-12
Posts: 48
Website

Re: Mounting issues, particularly usb

No problem. You all set now? Looks like you got a bunch of partitions on there!


My Linux & Progamming Blog - Jimmy Burnett

Offline

#8 2010-03-25 14:30:15

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Re: Mounting issues, particularly usb

so what do I do to access the usb drive.
If I go to /mnt/sdb1 there is nothing there ie it hasn't automounted

If I try
sudo mount /dev/sdb1 /mnt/sdb1
I get
mount: you must specify the filesystem type

If I then try
sudo mount -t auto /dev/sdb1 /mnt/sdb1
I get the same error message

If I try
sudo mount -t vfat /dev/sdb1 /mnt/sdb1
I get
mount: special device /dev/sdb1 does not exist

??

Offline

#9 2010-03-25 14:33:33

jimburnettva
Member
From: Virginia, USA
Registered: 2010-02-12
Posts: 48
Website

Re: Mounting issues, particularly usb

It looks like your partition table is messed up. Does this work in Windows or any other OS? What kind of stick is this?


My Linux & Progamming Blog - Jimmy Burnett

Offline

#10 2010-03-25 14:37:45

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Re: Mounting issues, particularly usb

I have tried two sticks, one of which was definitely working on my colleagues windows computer 30 seconds before I tried it.

Just to check, as it is would you be expecting my usb stick to be automounting?

If not what command should I be running?

Does the one line in my fstab cover all my usb ports?

[edit] how do I list my partition table?[/edit]

Last edited by sidewinder (2010-03-25 14:48:43)

Offline

#11 2010-03-25 14:59:22

jimburnettva
Member
From: Virginia, USA
Registered: 2010-02-12
Posts: 48
Website

Re: Mounting issues, particularly usb

Well the partition you are trying to mount could be ntfs and not vfat so making sure ntfs is built into your kernel would be something to check.

when you hit p inside fdisk that shows your partition layout. Normally I don't see see that much info there.

This is what I have when I hit  p  in fdisk.

Command (m for help): p

Disk /dev/sdb: 4063 MB, 4063232000 bytes
125 heads, 62 sectors/track, 1024 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1024     3967969    b  W95 FAT32



What is the exact fdisk command you ran?


My Linux & Progamming Blog - Jimmy Burnett

Offline

#12 2010-03-25 15:07:12

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Re: Mounting issues, particularly usb

jimburnettva wrote:

Well the partition you are trying to mount could be ntfs and not vfat so making sure ntfs is built into your kernel would be something

I just used the defualt kernel so surely this shouldn't be an issue?

I have also changed the usb entry in fstab to auto from vfat.


The fdisk command and output was

$ fdisk /dev/sdb

then

Command (m for help): p

Disk /dev/sdb: 1010 MB, 1010827264 bytes
32 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 1952 * 512 = 999424 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   ?      398636      983425   570754815+  72  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(357, 116, 40) logical=(398635, 6, 23)
Partition 1 has different physical/logical endings:
     phys=(357, 32, 45) logical=(983424, 30, 61)
Partition 1 does not end on cylinder boundary.
/dev/sdb2   ?       86419     1078237   968014120   65  Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(288, 115, 43) logical=(86418, 26, 1)
Partition 2 has different physical/logical endings:
     phys=(367, 114, 50) logical=(1078236, 17, 53)
Partition 2 does not end on cylinder boundary.
/dev/sdb3   ?      957932     1949749   968014096   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(366, 32, 33) logical=(957931, 2, 32)
Partition 3 has different physical/logical endings:
     phys=(357, 32, 43) logical=(1949748, 25, 36)
Partition 3 does not end on cylinder boundary.
/dev/sdb4   ?           1     1863334  1818613248    d  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(372, 97, 50) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
     phys=(0, 10, 0) logical=(1863333, 7, 53)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Offline

#13 2010-03-25 15:13:42

jimburnettva
Member
From: Virginia, USA
Registered: 2010-02-12
Posts: 48
Website

Re: Mounting issues, particularly usb

Yeah that USB stick is showing 4 partitions of various types.

Novell Netware? non-Linux......

Possibly a place holder partition for the USB stick firmware. 

If you google some of those messages you can see there are somethign fishy going on with those parts.

http://www.google.com/search?hl=en&sour … =&gs_rfai=


My Linux & Progamming Blog - Jimmy Burnett

Offline

#14 2010-03-25 15:18:13

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Re: Mounting issues, particularly usb

So you are saying it is just a problem with the usb sticks I have tried?  Or the partition table on my computer?

Should I be doing something like (from http://ubuntuforums.org/archive/index.php/t-14273.html)

fdisk /dev/hda
use option : x (expert mode)
use option : f (fix partition order)
use option : r (return)
use option : p (to print)
use option : v to verify partition
if it is ok
then you can do
option : w ( to write table to disk)
option : q to quit

Offline

#15 2010-03-25 15:39:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,785

Re: Mounting issues, particularly usb

Any chance that it does not have a valid partition scheme?  Fdisk seems to be warning you about that.

It is possible that the entire drive is one big vfat volume. 

What if you just try mounting it as /dev/sdb  ??


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#16 2010-03-25 15:46:17

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Re: Mounting issues, particularly usb

Thank you ewaller!
Changed my fstab to be
/dev/sdb /mnt/sdb auto   user,noauto,unhide   0      0

Then ran
sudo mount /dev/sdb /mnt/sdb

and it works!

If I connect more than one usb drive what happens then?  How do I mount them.

Last edited by sidewinder (2010-03-25 15:49:00)

Offline

#17 2010-03-25 17:37:15

mdicotomia
Member
Registered: 2010-03-17
Posts: 5

Re: Mounting issues, particularly usb

Type dmesg again and see output message.
Propably it should stay at next free parittion. That case in /dev/sdc1.

Offline

#18 2010-03-29 08:44:46

sidewinder
Member
Registered: 2009-12-14
Posts: 15

Re: Mounting issues, particularly usb

So I need to make sure my fstab contains a load of entries for every possible mount point of a usb drive?

Offline

Board footer

Powered by FluxBB