刚创建的分区,试图把这分区挂载到 /tmp/ 目录下,但是发生错误!
# ls /dev/ramblock*
/dev/ramblock /dev/ramblock1 /dev/ramblock2
# ls /dev/ramblock* -l
brw-rw---- 1 0 0 254, 0 Jan 1 00:07 /dev/ramblock (表示整个磁盘)
brw-rw---- 1 0 0 254, 1 Jan 1 00:07 /dev/ramblock1 (第一个主分区)
brw-rw---- 1 0 0 254, 2 Jan 1 00:07 /dev/ramblock2 (第二个主分区)
# mount /dev/ramblock1 /tmp/
attempt to access beyond end of device
ramblock1: rw=0, want=1252, limit=640
attempt to access beyond end of device
ramblock1: rw=0, want=1028, limit=640
UDF-fs: No partition found (1)
yaffs: dev is 266338305 name is "ramblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 254.1, "ramblock1"
yaffs: dev is 266338305 name is "ramblock1"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 254.1, "ramblock1"
mount: mounting /dev/ramblock1 on /tmp/ failed: Invalid argument
--------------------------------------------------------------------------------------------------------
解决方案: 格式化新建的分区 /dev/ramblock1 和 /dev/ramblock2
# mkdosfs /dev/ramblock2
mkdosfs 2.11 (12 Mar 2005)
# mkdosfs /dev/ramblock1
mkdosfs 2.11 (12 Mar 2005)
再试图挂载一次,
# mount /dev/ramblock1 /tmp/
#
挂载成功 !