LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-27-2005, 03:36 PM   #1
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Rep: Reputation: 46
can not mount usb flashdrive


I have a directory called /media/usbdrive

I have a 64mb usb flashdirve. I'm not sure if the file system is msdos or vfat, but neither works.

Also not sure if I should try to mount /dev/sda or /dev/sda1, or something else.

The flashdrive works great on windows, no problems at all.

Here are some examples of what I've tried:

# mount -t msdos /dev/sda /media/usbdrive
mount: wrong fs type, bad option, bad superblock on /dev/sda,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so


# mount -t vfat /dev/sda /media/usbdrive
mount: wrong fs type, bad option, bad superblock on /dev/sda,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

# mount -t auto /dev/sda /media/usbdrive
mount: you must specify the filesystem type



# mount -t msdos /dev/sda1 /media/usbdrive
mount: /dev/sda1 is not a valid block device

# mount -t vfat /dev/sda1 /media/usbdrive
mount: /dev/sda1 is not a valid block device

# mount -t auto /dev/sda1 /media/usbdrive
mount: /dev/sda1 is not a valid block device
 
Old 11-27-2005, 05:06 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Whats the output of the command ' /sbin/fdisk -l ' with the thumbdrive plugged in. Note you need root access to run.

Brian1
 
Old 11-27-2005, 05:27 PM   #3
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
I'm not the originator, but have the same problem. My (apparently pertinant) output from the command you suggested is:

Code:
Disk /dev/sda: 129 MB, 129499136 bytes
33 heads, 32 sectors/track, 239 cylinders
Units = cylinders of 1056 * 512 = 540672 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         240      126448    b  W95 FAT32
Partition 1 has different physical/logical endings:
     phys=(249, 32, 32) logical=(239, 16, 32)

Last edited by rickh; 11-27-2005 at 05:29 PM.
 
Old 11-27-2005, 06:12 PM   #4
dastrike
Member
 
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
First:
Code:
apt-get install sg3-utils
modprobe sg
Then:
Code:
sg_scan -i
sg_map -i
What's the output?

And: If one is using debian testing/unstable, make sure hotplug is uninstalled AND purged, and that udev is installed. hotplug being installed on testing/unstable can screw up quite a bit regarding detecting USB storage devices...
 
Old 11-27-2005, 06:26 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Does seem odd, Using root access it should mount as ' mount -t vfat /dev/sda1 /media/usbdrive '.
Only other idea is add a line to /etc/fstab and see if that works.
Code:
/dev/sda1               /media/usbdrive              auto    umask=000,users,noauto,owner,rw,dirsync   0 0
Hope this might help.
Brian
 
Old 11-27-2005, 07:21 PM   #6
suriv
LQ Newbie
 
Registered: Nov 2005
Distribution: Gentoo
Posts: 1

Rep: Reputation: 0
from http://gentoo-wiki.com/HOWTO_USB_Mas...roubleshooting:

If you have a vfat device and mount says "wrong fs type, bad superblock, etc" and dmesg shows errors like "FAT: cpage437 not found", you need to make a few changes in your kernel. Go into menuconfig and then open up filesystems, Natural Language Support and turn on "Codepage 437 (United States, Canada)" and "NLS ISO 8859-1 (Latin 1: Western European Languages)". Now either load these modules or reboot (depending on how you configured them) and the device should mount.

(nothing gentoo-specific here... it should work in debian)

Last edited by suriv; 11-27-2005 at 07:24 PM.
 
Old 11-27-2005, 07:52 PM   #7
mokele
Member
 
Registered: Jan 2005
Location: Puerto Rico
Distribution: Slackware 13
Posts: 146

Rep: Reputation: 15
Hi. I run slackware 10.2

I had the same problem. I tried everything sugested here and a few more
howtos. No luck. Finally I read somewhere that `SCSI disk support' has to be
enabled as built-in in the kernel. Done. Problem solved. After recompiling
the kernel it even installed sg3-utils-1.17 at the root dir.

then I added this line to /etc/fstab
Code:
/dev/sdb1       /mnt/usb2           vfat          users,rw         0   0
You might need to run:

tail -f /var/log/messages

when pluggin in your flash-drive just to make sure the special device `sdx'
id number hasn't change. In which case you'll have to change the id in
the fstab file too.

Good luck!

-West
 
Old 11-29-2005, 09:16 AM   #8
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
My output from sg_scan and sg_map:

# sg_scan -i
/dev/sg0: scsi0 channel=0 id=0 lun=0 [em]
USB Disk 1.16 [rmb=1 cmdq=0 pqual=0 pdev=0x0]

# sg_map -i
/dev/sg0 /dev/sda USB Disk 1.16


Is that helpful?
 
Old 11-29-2005, 10:33 AM   #9
mokele
Member
 
Registered: Jan 2005
Location: Puerto Rico
Distribution: Slackware 13
Posts: 146

Rep: Reputation: 15
No.

While you have sg0, meaning you have SCSI generic enabled into
the kernel. You have to enable `SCSI disk support', that will enable
your system to recognize `Special Devices'

I compile my kernels using the readme at:

/usr/src/linux-2.x.x/README

Search your distro documentation for the kernel configuration and
compilation. Whilst you have only SCSI generic enabled it won't work

Another change you should implement is enabling:

`Probe all LUNs on each SCSI device' This is helpful when you have
a multiple cardreader. If this option is not enabled only one `Logical
Unit Number' (LUN) will be detected.

Remember; try your distro's documentation for kernel compiling.

-West
 
Old 11-29-2005, 10:40 AM   #10
dastrike
Member
 
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
mokele, take a closer look at the output, you'll see that /dev/sg0 is mapped to /dev/sda just like it is supposed to.


walterbyrd, /dev/sda is the device that your USB flash drive gets. And typically it is the first partition on such a device that one wants to mount, /dev/sda1.
To verify that this is the case, execute
Code:
fdisk -l /dev/sda
and the partitions on the device will be listed.

If it is the first partition and you cannot mount /dev/sda1, then there must be some other pecuilar issues going on, which I cannot really at the give an answer to what they are.
 
Old 11-29-2005, 01:56 PM   #11
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
here is what I get:

# fdisk -l /dev/sda

Disk /dev/sda: 65 MB, 65011712 bytes
8 heads, 32 sectors/track, 496 cylinders
Units = cylinders of 256 * 512 = 131072 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 495 63344 6 FAT16
 
Old 11-29-2005, 02:24 PM   #12
dastrike
Member
 
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
Then the following should reasonably do it, assuming the mount point exists:
Code:
mount -t vfat -o dmask=000,fmask=111 /dev/sda1 /media/usbdrive
If it doesn't - then I don't know quite why... Take a look at the output on the end of dmesg to see if anything interesting is there.
Code:
dmesg | tail
 
Old 11-29-2005, 04:00 PM   #13
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
I got it to work. I don't know how. It just started working.

# mount -t /dev/sda1 /media/usbdrive

Thanks for the input.
 
Old 11-29-2005, 04:03 PM   #14
BillyGalbreath
Member
 
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379

Rep: Reputation: 31
Quote:
Originally posted by walterbyrd
I got it to work. I don't know how. It just started working.
I love when that happens! You work for hours and hours and hours and nothing works, so you run the command one more time just for shits and giggles, and what do ya know... It works. XD
 
Old 03-18-2006, 12:53 PM   #15
john38562
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
how do you mount a jump drive under mandrake 7.2
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount a thumbdrive/flashdrive theMayor Linux - Newbie 6 04-04-2005 11:21 AM
still more USB flashdrive problems... Lord Zoltar Linux - Hardware 8 01-22-2005 12:38 PM
USB flashdrive problems endfx Linux - Hardware 11 01-01-2005 05:40 PM
USB FlashDrive -- Again kadalz Linux - Newbie 1 10-12-2003 11:20 AM
USB Flashdrive disto cli_man General 7 02-23-2003 04:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration