DebianThis 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.
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.
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
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...
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
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)
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.