Unable to mount FAT SD-card

Device: NANO
Type: Bug
Status: Closed

Mounting of a brand-new sd-card fails, seemingly due to a missing codepage:

root@pineapple:~# mount /dev/sda1 /mnt/
mount: mounting /dev/sda1 on /mnt/ failed: Invalid argument
root@pineapple:~# dmesg |tail -1
[13135.330000] FAT-fs (sda1): codepage cp437 not found

# fdisk -l /dev/sda

Disk /dev/sda: 16.0 GB, 16003891200 bytes
255 heads, 63 sectors/track, 1945 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 1946 15624704 c Win95 FAT32 (LBA)

root@pineapple:~# dmesg |grep sda
[ 8.570000] sd 0:0:0:0: [sda] 31257600 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 8.790000] sd 0:0:0:0: [sda] Write Protect is off
[ 8.790000] sd 0:0:0:0: [sda] Mode Sense: 21 00 00 00
[ 8.790000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 8.810000] sda: sda1
[ 8.810000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 18.980000] scsi 0:0:0:0: [sda] killing request
[ 18.990000] scsi 0:0:0:0: [sda]
[ 19.000000] scsi 0:0:0:0: [sda] CDB:
[ 19.010000] blk_update_request: I/O error, dev sda, sector 0
[ 19.020000] Buffer I/O error on dev sda, logical block 0, async page read
[ 24.060000] sd 1:0:0:0: [sda] 31257600 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 24.080000] sd 1:0:0:0: [sda] Write Protect is off
[ 24.080000] sd 1:0:0:0: [sda] Mode Sense: 21 00 00 00
[ 24.080000] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 24.110000] sda: sda1
[ 24.120000] sd 1:0:0:0: [sda] Attached SCSI removable disk
[ 6336.460000] FAT-fs (sda1): codepage cp437 not found
[13135.330000] FAT-fs (sda1): codepage cp437 not found


2016/01/06 15:14
So I tried installing kmod-nls-cp437, this results in a mismatch of kernel versions. The opkg update fetches the chaos calmer repository (but the login motd banner says attitude adjustment...)

However one package source fails:

# opkg update
Downloading https://www.wifipineapple.com/nano/packages/Packages.gz.
wget: error getting response: Connection reset by peer

Downloading the same link from a web browser works however.
2016/01/06 15:43
Moving from https to http in /etc/opkg.conf made the opkg update work (so there's something to fix on the server side I guess).
However there's still inconsitent kernel version and module version.

Oh and BTW, there's some 12.09 legacy still left in your redirector:

http://www.wifipineapple.com/nano/packages/ redirects to http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/packages/
2016/01/06 22:12
Hi Sa,

The OPKG configuration is correct - we simply have not made our package feed public yet.

In regards to supporting FAT, you can ignore the kernel missmatch errors with a --force-depends flag. They appear because they were compiled for the same kernel, but the kernel's checksum does not match that of the OpenWRT one.

I'll add FAT support to our firmware in the future, we just prefer using ext4.

Best Regards,
2016/01/19 21:40
Hello again. I upgraded to 1.0.3 and tried again. The kernel mismatch causes a segfault when loading the module (indeed, the kernel is 3.18.19, but the module is 3.18.20... -> not the same kernel?)

From a fresh 1.0.3 upgrade:

root@Pineapple:~# opkg update
... [completes without error] ...

root@Pineapple:~# opkg install kmod-nls-cp437
Installing kmod-nls-cp437 (3.18.20-1) to root...
Downloading https://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/base/kmod-nls-cp437_3.18.20-1_ar71xx.ipk.
Multiple packages (kmod-nls-base and kmod-nls-base) providing same name marked HOLD or PREFER. Using latest.
Configuring kmod-nls-cp437.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-nls-cp437:
* kernel (= 3.18.20-1-7bed08fa9c06eb8089e82c200340ec66) *
If the above errors were only about a kernel version missmatch, please ignore them. The package was installed successfully.
root@Pineapple:~# find /lib/modules/ | grep 437
root@Pineapple:~# uname -a
Linux Pineapple 3.18.19 #21 Tue Jan 12 16:39:43 CET 2016 mips GNU/Linux
root@Pineapple:~# insmod /lib/modules/3.18.20/nls_cp437.ko
Segmentation fault
root@Pineapple:~# dmesg |tail
[ 938.410000] c085a4f4 800bf348 0055d058 00001748 0055d008 77e5ddc0 7fbf37b8 00000000
[ 938.410000] ...
[ 938.410000] Call Trace:
[ 938.410000] [<800bef44>] load_module+0x17d8/0x1b88
[ 938.410000] [<800bf3a8>] SyS_init_module+0xb4/0xe0
[ 938.410000] [<80062b5c>] handle_sys+0x11c/0x140
root@Pineapple:~# du -sk /lib/modules/3.18.*
4107 /lib/modules/3.18.19
6 /lib/modules/3.18.20

(I'll go with ext4 formatting for now, but it would anyway be good to have matching kernel and module versions)

Add Comment:

Please log in to comment.