慕尼黑5688855
Linux下常用的分区工具:fdisk/sfdisk:命令行工具,各种版本和环境都能使用,包含在软件包util-linux中diskdruid:图形化分区工具,只能在安装REDHAT系统时使用。第一步:fdisk[root@novice ~]# fdisk -l /dev/sdbDisk /dev/sdb: 254 MB, 254017536 bytes8 heads, 61 sectors/track, 1016 cylinders, total 496128 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000Device Boot Start End Blocks Id System[root@novice ~]# fdisk /dev/sdbCommand (m for help): #在输入上面的命令后会出现左边的提示,输入m就会得到一个帮助菜单,如下:Command (m for help): mCommand actiona toggle a bootable flagb edit bsd disklabelc toggle the dos compatibility flagd delete a partitionl list known partition typesm print this menun add a new partitiono create a new empty DOS partition tablep print the partition tableq quit without saving changess create a new empty Sun disklabelt change a partition's system idu change display/entry unitsv verify the partition tablew write table to disk and exitx extra functionality (experts only)#help虽然是英文的,可都很简单,在这里不再解释。#现在,我们正式开始分区的操作:Command (m for help): n #新建分区Command actione extendedp primary partition (1-4)#e/p分别对应扩展分区 /主分区;我们先分四个主分区,每个50M;然后再来增加主分区或扩展分区,看会出现怎样的状况,嘿嘿。p #分区类型为主分区Partition number (1-4, default 1): 1 #分区号,在这里我们依次选择1、2、3、4First sector (2048-496127, default 2048): #指定分区的起始扇区,一般默认,按enter键即可。Last sector, +sectors or +size{K,M,G} (2048-496127, default 496127): +50M #指定分区的终止扇区,根据前面的提示我们可以做出相应的选择+sectors 或 +size{K,M,G}Command (m for help): p #用p打印出已建好的分区列表Disk /dev/sdb: 254 MB, 254017536 bytes8 heads, 61 sectors/track, 1016 cylinders, total 496128 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000Device Boot Start End Blocks Id System/dev/sdb1 2048 104447 51200 83 Linux#剩下的三个分区的建立操作同上#分好四个主分区后的情况如下Command (m for help): p