7

Can somebody show me how to make Gentoo mount my USB? This is what I got when trying mount /dev/sdb1 /mnt:

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

dmesg says:

FAT: codepage cp437 not found

phunehehe
  • 20,240

3 Answers3

6

You need to set codepage and charset in kernel options:

make menuconfig -> File systems:
-> Native language support:
<*>   Codepage 437 (United States, Canada)
<*>   NLS ISO 8859-1  (Latin 1; Western European Languages)

-> DOS/FAT/NT Filesystems
(437) Default codepage for FAT
(iso8859-1) Default iocharset for FAT

and then recompile kernel...

pbm
  • 25,387
5

It seems that you do not have the "codepage cp437" support in the kernel.

Try to Look inside your /proc/config.gz file and search for a line like CONFIG_NLS_CODEPAGE_437=m or CONFIG_NLS_CODEPAGE_437=y. If you do not find it, you'll have to recompile the kernel to add the needed module.

andcoz
  • 17,130
  • some progress, right now it's saying FAT: IO charset iso8859-1 not found – phunehehe Nov 13 '10 at 15:17
  • you have to add also "NLS ISO 8859-1" support to your kernel. :-/ Probably, 437 is your default codepage and 8859-1 is the real usb-stick encoding (so you need both). – andcoz Nov 16 '10 at 15:17
-1

First, make the mountpoint:

$ mkdir /mnt/udisk

Then, mount the USB drive, specifying the filesystem:

$ mount -t vfat -o defaults,utf8 /dev/sdb1 /mnt/udisk

If it were NTFS, you could use:

$ mount -t ntfs-3g -o defaults,utf8 /dev/sdb1 /mnt/udisk

Or for ISOs:

$ mount -o loop diskimage.iso /mnt/iso
Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233