Google
 

11/6/06

mount usb drives.

I have such problem:
#:> mount -t vfat /dev/sda1 /usb

mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or other error
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)
In some cases useful info is found in syslog - try
dmesg | tail or so

I want to check what are the partitions on sda. do the following:
#:> fsck -l /dev/sda
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 2 19457 156280320 f W95 Ext'd (LBA)
/dev/sda5 2 19457 156280288+ b W95 FAT32

So it is obvious that /dev/sda1 has some problems. Instead should use:
#:> mount -t vfat /dev/sda5 /usb
Now it works.

To check the status of usb storage, use:
#:> dmesg|grep usb
sometimes it is necessary to check the log files
#:> more /var/log/messages |grep usb

No comments: