What filesystems are supported for SD cards plugged into the SDIO port of a SheevaPlug?
I've had a plug for several months serving light duty as a Linux machine for experimentation, with the Ubuntu 9.04 image. It has worked well, so I recently got another. For the new one I installed Debian, using file from:
http://www.plugcomputer.org/index.php/us/resources/downloads?func=select&id=5Submitted On: 10 Sep 2009
Submitted By: Jeff Lagman (jlagman)
File Date: 08 Sep 2009
File Version: 1.0.0
sheevaplug-installer-v1.0.tar.gz [MD5: 2ab9f45091232f7d998f0278bef2b751]
I couldn't get the "installer-debian-lenny" image to apply, so I tried "installer-debian-squeeze", and it finished with no problem. After updating:
- apt-get update
- apt-get upgrade
the plug OS is (mostly) up to date.
debian:~# uname -r
2.6.30.2
Next I go buy an 8GB SD card:
SanDisk - 8GB Secure Digital High Capacity Memory Card
After inserting it in the SD port, I note the filesystem entry corresponding to the card.
debian:~# ls -la /dev/mmcblk0
brw-rw---- 1 root floppy 179, 0 Jun 9 04:28 /dev/mmcblk0
From the various forum discussions, I gather that the card needs to be formatted and mounted.
debian:~# mkfs.
mkfs.bfs mkfs.ext3 mkfs.jffs2 mkfs.ubifs
mkfs.cramfs mkfs.ext4 mkfs.minix mkfs.vfat
mkfs.ext2 mkfs.ext4dev mkfs.msdos
Lots of file system options, so I look around to see what filesystem is appropriate. It seems many recommend ubifs for its flash orientation. So I attempt to create the filesystem. After a few tries, and various problems, I use fdisk to split the card into an extended partition with two 4 GB volumes. After some trial and error, I arrive at:
debian:~# mkfs.ubifs -v -m 2048 -e 126976 -c 4096 -x zlib /dev/mmcblk0p1
mkfs.ubifs
root: (null)
min_io_size: 2048
leb_size: 126976
max_leb_cnt: 4096
output: /dev/mmcblk0p1
jrn_size: 8388608
reserved: 0
compr: zlib
keyhash: r5
fanout: 8
orph_lebs: 1
super lebs: 1
master lebs: 2
log_lebs: 5
lpt_lebs: 2
orph_lebs: 1
main_lebs: 3
gc lebs: 1
index lebs: 1
leb_cnt: 14
UUID: C1DE8EC1-6892-448A-A5B0-9C51F034E5A3
Success!
debian:~#
Next, I try to mount the filesystem:
debian:~# mount -t ubifs /dev/mmcblk0p1 /mnt/sdcard1/
UBIFS error (pid 4586): ubifs_get_sb: cannot open "/dev/mmcblk0p1", error -22
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
After some more looking around, I work out that ubifs is not expected to work with SD flash, as ubifs expects to talk to raw flash, while SD uses FTL (Flash Translation Layer). Same deal with jffs2. While both of these filesystems work fine on the plug's internal flash, they're not intended for use with SD.
Next I try to take a step back, and try vfat:
mkfs.vfat /dev/mmcblk0p2
mount -t vfat /dev/mmcblk0p2 /mnt/sdcard2
debian:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 256876 0 256876 0% /lib/init/rw
udev 10240 120 10120 2% /dev
tmpfs 256876 4 256872 1% /dev/shm
rootfs 472968 197820 270312 43% /
/dev/mmcblk0p2 3873376 4 3873372 1% /mnt/sdcard2
debian:~#
So, vfat seems to work.
Next I try ext2 and ext3.
debian:~# mkfs -t ext3 /dev/mmcblk0p1
mkfs.ext3: /lib/libblkid.so.1: version `BLKID_2.17' not found (required by mkfs.ext3)
debian:~# mkfs -t ext2 /dev/mmcblk0p1
mkfs.ext2: /lib/libblkid.so.1: version `BLKID_2.17' not found (required by mkfs.ext2)
debian:~#
Long story short, it would be nice to use a journaling filesystem. I don't seem to have the updated library to use ext<n>. What are my options?
Thanks for any insight / recommendations.