Mount USB (FAT) in Gentoo

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

Asked By: phunehehe


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.

Answered By: andcoz

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…

Answered By: pbm

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
Answered By: Killinks
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.