1 回答

TA貢獻(xiàn)1848條經(jīng)驗(yàn) 獲得超2個(gè)贊
Linux下常用的分區(qū)工具:
fdisk/sfdisk:命令行工具,各種版本和環(huán)境都能使用,包含在軟件包util-linux中
diskdruid:圖形化分區(qū)工具,只能在安裝REDHAT系統(tǒng)時(shí)使用。
第一步:fdisk
[root@novice ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 254 MB, 254017536 bytes
8 heads, 61 sectors/track, 1016 cylinders, total 496128 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 identifier: 0x00000000
Device Boot Start End Blocks Id System
[root@novice ~]# fdisk /dev/sdb
Command (m for help): #在輸入上面的命令后會(huì)出現(xiàn)左邊的提示,輸入m就會(huì)得到一個(gè)幫助菜單,如下:
Command (m for help): m
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
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
#help雖然是英文的,可都很簡(jiǎn)單,在這里不再解釋。
#現(xiàn)在,我們正式開始分區(qū)的操作:
Command (m for help): n #新建分區(qū)
Command action
e extended
p primary partition (1-4)
#e/p分別對(duì)應(yīng)擴(kuò)展分區(qū) /主分區(qū);我們先分四個(gè)主分區(qū),每個(gè)50M;然后再來(lái)增加主分區(qū)或擴(kuò)展分區(qū),看會(huì)出現(xiàn)怎樣的狀況,嘿嘿。
p #分區(qū)類型為主分區(qū)
Partition number (1-4, default 1): 1 #分區(qū)號(hào),在這里我們依次選擇1、2、3、4
First sector (2048-496127, default 2048): #指定分區(qū)的起始扇區(qū),一般默認(rèn),按enter鍵即可。
Last sector, +sectors or +size{K,M,G} (2048-496127, default 496127): +50M #指定分區(qū)的終止扇區(qū),根據(jù)前面的提示我們可以做出相應(yīng)的選擇+sectors 或 +size{K,M,G}
Command (m for help): p #用p打印出已建好的分區(qū)列表
Disk /dev/sdb: 254 MB, 254017536 bytes
8 heads, 61 sectors/track, 1016 cylinders, total 496128 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 identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 2048 104447 51200 83 Linux
#剩下的三個(gè)分區(qū)的建立操作同上
#分好四個(gè)主分區(qū)后的情況如下
Command (m for help): p
添加回答
舉報(bào)