root@3xpl4b:/home/xi4oyu# dd if=/dev/sda of=test bs=1M count=1 在上面建立文件系统,ext2就够了 root@3xpl4b:/home/xi4oyu# mkfs.ext2 test
mke2fs 1.41.11 (14-Mar-2010) test is not a block special device. 无论如何也要继续? (y,n) y 文件系统标签= 操作系统:Linux
块大小=1024 (log=0) 分块大小=1024 (log=0) Stride=0 blocks, Stripe width=0 blocks 16 inodes, 100 blocks 5 blocks (5.00%) reserved for the super user 第一个数据块=1 1 block group 8192 blocks per group, 8192 fragments per group 16 inodes per group 正在写入inode表: 完成 Writing superblocks and filesystem accounting information: 完成 This filesystem will be automatically checked every 22 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
root@3xpl4b:/home/xi4oyu# file test test: Linux rev 1.0 ext2 filesystem data, UUID=8a78c1f7-8c38-47cf-b579-0f19b4803b79
挂载它 root@3xpl4b:/home/xi4oyu# mount -o loop ./test /mnt 注意-o 参数 root@3xpl4b:/home/xi4oyu# cd /mnt 注意-o loop参数。