位置于:首页>>操作系统>>Linux>>正文
 Linux创建文件及挂载文件系统流程详解

设备比如是一个硬盘的分区,软盘,光驱等.. ...

在格式化分区之前,您得懂得如何查看硬盘分区情况,并有针对性的格式化;比如用 fdisk -l 来查看;

比如我想格式化一个移动U盘中的一个分区;全景应该是:

[root@localhost beinan]# fdisk -l

Disk /dev/hda: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/hda1 * 1 765 6144831 7 HPFS/NTFS

/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)

/dev/hda3 2806 9729 55617030 5 Extended

/dev/hda5 2806 3825 8193118+ 83 Linux

/dev/hda6 3826 5100 10241406 83 Linux

/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris

/dev/hda8 5199 6657 11719386 83 Linux

/dev/hda9 6658 7751 8787523+ 83 Linux

/dev/hda10 7752 9729 15888253+ 83 Linux

Disk /dev/sda: 1035 MB, 1035730944 bytes

256 heads, 63 sectors/track, 125 cylinders

Units = cylinders of 16128 * 512 = 8257536 bytes

Device Boot Start End Blocks Id System

/dev/sda1 1 25 201568+ 83 Linux

/dev/sda2 26 125 806400 5 Extended

/dev/sda5 26 50 201568+ 83 Linux

/dev/sda6 51 76 200781 83 Linux

我们可以看到有sda这个设备,所以可以用 fdisk -l /dev/sda专门来显示他的分区情况;比如我想格式化 /dev/sda6 分区为 ext3文件系统,则为:

[root@localhost beinan]# mkfs -t ext3 /dev/sda6

mke2fs 1.37 (21-Mar-2005)

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

50200 inodes, 200780 blocks

10039 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=67371008

25 block groups

8192 blocks per group, 8192 fragments per group

2008 inodes per group

Superblock backups stored on blocks:

8193, 24577, 40961, 57345, 73729

Writing inode tables: done

Creating journal (4096 blocks): done

Writing superblocks and filesystem accounting information: 注:在这里直接回车;

done

This filesystem will be automatically checked every 26 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

本新闻共4页,当前在第2页  1  2  3  4  

本新闻共4页,当前在第2页  1  2  3  4  

内部:http://xp163.com/
 Linux创建文件及挂载文件系统流程详解站内说明
 最新站点内更新

 

 书籍教程站内推荐信息
 书籍教程网站地图