Chinaunix

标题: 为什么我格式化没成功? [打印本页]

作者: shaohui973    时间: 2013-12-31 11:48
标题: 为什么我格式化没成功?
使用linux格式化命令mkfs.ext2,但是格式化后查看发现是tmpfs
root@p2041rdb:/dev# mkfs -t ext2 /dev/mtdblock0      /* 格式化命令 */
mke2fs 1.42.1 (17-Feb-2012)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
32768 inodes, 131072 blocks
6553 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
2048 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Allocating group tables: done                           
Writing inode tables: done                           
Writing superblocks and filesystem accounting information: 9   
done

root@p2041rdb:/dev#  
root@p2041rdb:/dev# df -T
Filesystem     Type   1K-blocks   Used Available Use% Mounted on
rootfs         rootfs     96877  73163     18791  80% /
/dev/root      ext2       96877  73163     18791  80% /
none           tmpfs    2003216    120   2003096   1% /dev  /* 文件系统类型为tmpfs */
/dev/sda       ext2   480721640 662860 455639452   1% /media/sda
tmpfs          tmpfs    2003216    112   2003104   1% /var/volatile
tmpfs          tmpfs    2003216      0   2003216   0% /media/ram
root@p2041rdb:/dev# fdisk -l

Disk /dev/mtdblock0: 134 MB, 134217728 bytes
255 heads, 63 sectors/track, 16 cylinders, total 262144 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mtdblock0 doesn't contain a valid partition table

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/sda doesn't contain a valid partition table
root@p2041rdb:/dev#
root@p2041rdb:/dev# df -a /dev/mtdblock0
Filesystem     1K-blocks  Used Available Use% Mounted on
none             2003216   120   2003096   1% /dev          /*  设备挂载点 /dev */
root@p2041rdb:/dev#
作者: jeppeter    时间: 2013-12-31 15:58
回复 1# shaohui973


    你没有理解LINUX下面设备的真实概念,你成不成功。要用mount -t ext2 /dev/mtdblock0 /mnt/ 这样来看。如果成功了。说明你是成功了。如果不成功,那还要努力。
作者: shaohui973    时间: 2013-12-31 16:03
回复 2# jeppeter


    df -hT 命令是可以看到设备是什么文件系统类型的。
作者: arm-linux-gcc    时间: 2014-01-04 17:14
mtdblock不能直接mkfs吧,需要使用ftl吧




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2