sd卡在windows下格式化,只能格式化爲FAT文件系統格式的,但是FAT文件系統在linux下不支持軟鏈接。所以又必要將其格式化成linux下的文件系統格式,例如EXT2。
使用嵌入式linux中自帶的工具命令mkfs.ext2。
root@target:~# mkfs.ext2 /dev/mmcblk0
mke2fs 1.41.5 (23-Apr-2009)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
31360 inodes, 125440 blocks
6272 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
16 block groups
8192 blocks per group, 8192 fragments per group
1960 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729
Writing inode tables: 0/16 1/16 2/16 3/16 4/16 5/16 6/16 7/16 8/16 9/1610/1611/1612/1613/1614/1615/16done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@target:~#
掛載sd卡
root@target:~# mount -t ext2 /dev/mmcblk0 /media/mmc1/
進入sd卡,出現“lost+found”表示已經掛載成功
root@target:~# cd /media/mmc1/
root@target:/media/mmc1# ls
lost+found