Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-27-2005, 03:36 PM
|
#1
|
Member
Registered: Apr 2004
Posts: 734
Rep:
|
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
|
|
|
11-27-2005, 05:06 PM
|
#2
|
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:
|
Whats the output of the command ' /sbin/fdisk -l ' with the thumbdrive plugged in. Note you need root access to run.
Brian1
|
|
|
11-27-2005, 05:27 PM
|
#3
|
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:
|
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.
|
|
|
11-27-2005, 06:12 PM
|
#4
|
Member
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250
Rep:
|
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...
|
|
|
11-27-2005, 06:26 PM
|
#5
|
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:
|
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
|
|
|
11-27-2005, 07:21 PM
|
#6
|
LQ Newbie
Registered: Nov 2005
Distribution: Gentoo
Posts: 1
Rep:
|
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.
|
|
|
11-27-2005, 07:52 PM
|
#7
|
Member
Registered: Jan 2005
Location: Puerto Rico
Distribution: Slackware 13
Posts: 146
Rep:
|
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
|
|
|
11-29-2005, 09:16 AM
|
#8
|
Member
Registered: Apr 2004
Posts: 734
Original Poster
Rep:
|
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?
|
|
|
11-29-2005, 10:33 AM
|
#9
|
Member
Registered: Jan 2005
Location: Puerto Rico
Distribution: Slackware 13
Posts: 146
Rep:
|
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
|
|
|
11-29-2005, 10:40 AM
|
#10
|
Member
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250
Rep:
|
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 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.
|
|
|
11-29-2005, 01:56 PM
|
#11
|
Member
Registered: Apr 2004
Posts: 734
Original Poster
Rep:
|
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
|
|
|
11-29-2005, 02:24 PM
|
#12
|
Member
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250
Rep:
|
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.
|
|
|
11-29-2005, 04:00 PM
|
#13
|
Member
Registered: Apr 2004
Posts: 734
Original Poster
Rep:
|
I got it to work. I don't know how. It just started working.
# mount -t /dev/sda1 /media/usbdrive
Thanks for the input.
|
|
|
11-29-2005, 04:03 PM
|
#14
|
Member
Registered: Nov 2005
Location: Houston Texas
Distribution: Debian Sid
Posts: 379
Rep:
|
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
|
|
|
03-18-2006, 12:53 PM
|
#15
|
LQ Newbie
Registered: Mar 2006
Posts: 2
Rep:
|
how do you mount a jump drive under mandrake 7.2
|
|
|
All times are GMT -5. The time now is 02:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|