1、linuxfdisk分区、格式化、挂载!fdisk分区格式化自动挂载!ext3格式化,ext4格式化及挂载关于硬盘分区:主分区(包含扩展分区)、逻辑分区,主分区最多有4个(包含扩展分区)。因此我们在对硬盘分区时最好划分主分区连续,比如说:主分区一、主分区二、扩展分区。此文章以fdisk工具为例,对一个硬盘划分。1、fdisk -l 查看系统上的硬盘,找到需要分区的硬盘后比如说:/dev/sdb.然后,fdisk /dev/sdb进入该设备。此时出现:Command (m for help):查看帮助信息:输入m,看到如下信息
2、Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition 注:这是删除一个分区的动作; l list known partition types 注:l是列出分区类型,以供我们设置相应分区的类型; m print this menu 注:m 是列出帮助信息; n
3、 add a new partition 注:添加一个分区; o create a new empty DOS partition table p print the partition table 注:p列出分区表; q quit without saving changes 注:不保存退出; s create a new empty Sun disklabel t change a partition's system id 注:t 改变分区类型;
4、 u change display/entry units v verify the partition table w write table to disk and exit 注:把分区表写入硬盘并退出; x extra functionality (experts only) 注:扩展应用,专家功能;具体每个参数的含义,请仔细阅读。常用的就是:d l m p q t w2、列出当前操作硬盘的分区情况,用pCommand (m for help):pDisk /dev/sd
5、a: 1035 MB, 1035730944 bytes256 heads, 63 sectors/track, 125 cylindersUnits = cylinders of 16128 * 512 = 8257536 bytes Device Boot Start End Blocks Id System/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)/dev/sd