LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   mounting usb-stick manually (https://www.linuxquestions.org/questions/debian-26/mounting-usb-stick-manually-763217/)

j1alu 10-20-2009 11:12 AM

mounting usb-stick manually
 
Solved.

when i try to mount a stick i get this:
Code:

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

Code:

# dmesg | tail
[ 2852.066714] scsi 2:0:0:0: Direct-Access    USB_DISK USB_DISK        1.00 PQ: 0 ANSI: 0
[ 2852.068812] sd 2:0:0:0: [sdb] 2009088 512-byte hardware sectors: (1.02 GB/981 MiB)
[ 2852.069312] sd 2:0:0:0: [sdb] Write Protect is off
[ 2852.069318] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 2852.069321] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 2852.071185] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 2852.071193]  sdb: sdb1
[ 2852.072746] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[ 2882.202526] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 2882.240087] FAT: codepage cp437 not found

so: do i a) miss a tool to mount it (like msdos-tools or such) or b) did i miss something when compiling the kernel.

thank you

repo 10-20-2009 11:15 AM

try
Code:

mount -t vfat /dev/sdb1 /media/disk

j1alu 10-20-2009 11:39 AM

Quote:

Originally Posted by repo (Post 3726146)
try
Code:

mount -t vfat /dev/sdb1 /media/disk

thanks, the result is the same.
apt-cache search vfat only gave me the msdostools, and they are installed. as said: i compiled the kernel on my own, without knowing exactly what i did (just for fun)...oh my. i wouldnt know how to get to know if that is the problem.

repo 10-20-2009 11:44 AM

What filesystem is on the drive?
If it is ntfs, you need to compile it in the kernel

Code:

mount -t ntfs /dev/sdb1 /media/disk

j1alu 10-20-2009 12:10 PM

Quote:

Originally Posted by repo (Post 3726173)
What filesystem is on the drive?
If it is ntfs, you need to compile it in the kernel

Code:

mount -t ntfs /dev/sdb1 /media/disk

that is difficult to answer for me. fdisk -l gives me this:
/dev/sdb1 1 1994 1004287+ 6 FAT16
so, as far i understand, it aint a ntfs-system. or better: mounting it with -t ntfs tells me so.
on my other installation i may mount it with a simple
Quote:

mount /dev/sdb1 /media/disk
but its a different kernel.
thanks

the trooper 10-20-2009 01:50 PM

Here's another option to try:

Code:

mount -t auto /dev/sdb1 /media
This works for me with a vfat formatted usb flash drive.

j1alu 10-21-2009 02:46 AM

ok, i booted into a lenny-backorts kernel and had no problems mounting the same stick.
how may i figure out whats missing in the other kernel? thanks

i yet gotta try the mount -a way trooper has mentioned, but, to be honest, i aint got much hope it will work (well: i will see).

greetings

repo 10-21-2009 04:23 AM

Make sure you have the module
Quote:

nls_cp437
installed

Code:

modprobe -l | grep nls_cp437

j1alu 10-21-2009 04:58 AM

Quote:

Originally Posted by repo (Post 3727012)
Make sure you have the module

installed

Code:

modprobe -l | grep nls_cp437

awsome !
so: youre right, the mentioned module is installed in the backports-kernel (which mounts the stick) and aint installed on mine (under /lib/modules/2.6.30-mt1/kernel/fs/nls i cant find it)

just to be sure: i got to re-configure the kernel and run the compilation again, correct?
thanks a lot

cola 10-21-2009 12:09 PM

Quote:

Originally Posted by j1alu (Post 3727044)
awsome !
so: youre right, the mentioned module is installed in the backports-kernel (which mounts the stick) and aint installed on mine (under /lib/modules/2.6.30-mt1/kernel/fs/nls i cant find it)

just to be sure: i got to re-configure the kernel and run the compilation again, correct?
thanks a lot

Can you post:
Code:

uname -a
sudo fdisk -l


j1alu 10-21-2009 12:45 PM

SOLVED ( i dont know how to edit the first post, sorry)
repo wrote:
Code:

nls_cp437
which was correct. i ran the make menuconfig and the compilation again and added it under:
filesystems -> native language support -> codepage 437 (UnitedStates, Canada).
Not that i would understand it, but im happy it works again.



cola wrote:
Quote:

Can you post:
Code:

uname -a
sudo fdisk -l
though the problem seems to be solved, sure:
Code:

$ uname -a
Linux desktop-lenny 2.6.30-mt2 #1 Wed Oct 21 18:37:45 CEST 2009 i686 GNU/Linux

Code:

root@desktop-lenny# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xec31ec31

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        851    6835626  83  Linux
/dev/sda2            852      19457  149452695    5  Extended
/dev/sda5            852        1181    2650693+  82  Linux swap / Solaris
/dev/sda6            1182      15509  115089628+  83  Linux
/dev/sda7  *      15510      19457    31712278+  83  Linux

Disk /dev/sdb: 1028 MB, 1028653056 bytes
16 heads, 63 sectors/track, 1993 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0x49e2a461

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        1994    1004287+  6  FAT16


thanks for all the help.
greetings


All times are GMT -5. The time now is 06:22 AM.