格式化與分區

格式化與分區
hd--IDE設備sd--SCSI設備
fdisk-l/dev/sda查看第一塊硬盤分區情況
fdisk/dev/sdb給第二塊硬盤分區
commandacton(mforhelp):m#顯示命令列表
a-設置可引導標誌;b-設置卷標;d-刪除一個分區;n-新建分區
p-顯示分區信息;v-校驗分區表;q-不存盤退出;w-存盤退出;t-改變分區類型
commandacton(mforhelp):n新建分區
commandaction
eextended#擴展分區
pprimarypartition(1-4)#主分區
p#創建主分區
partitionnumber(1-4):1#創建第一個主分區
firstcylinder(1-522,default1):1#起始柱面(第一個分區始終爲1)
lastcylinderor+sizeor+sizeMor+siezK(1-522,default522):10#截止柱面(若522則整個硬盤分給了一個區)此分區大小是系統按照柱面大小自動計算出來的
commandacton(mforhelp):n
commandaction
eextended
pprimarypartition(1-4)
p
partitionnumber(1-4):2#創建第二個主分區
firstcylinder(11-522,default11):11
lastcylinder...(11-522,default522):+100M#自定義分區大小
commandacton(mforhelp):n
commandaction
eextended
pprimarypartition(1-4)
e#創建擴展分區,注意一個磁盤只能創建一個擴展區
partitionnumber(1-4):3
firstcylinder(28-522,default28):28
lastcylinder...(28-522,default522):522#將剩餘空間全部分給擴展分區
擴展分區是不能直接使用的,必須在其上創建邏輯分區!
commandacton(mforhelp):n
commandaction
llogical(5orover)#邏輯分區
pprimarypartition(1-4)
l
firstsylinder(28-255,default28):28#在擴展分區裏建邏輯分區
lastcylinder...(28-522,default522):522#柱面用盡,等於說只建一個邏輯分區
commandacton(mforhelp):w#保存退出
轉換分區類型:
commandacton(mforhelp):t#轉換分區類型
partitionnumber(1-4):2#選擇第二個主分區
hexcode(typeLtolistcodes):82#按L可列出分區類型所對應的編碼
格式化與掛載:(掛載目錄可以自行創建也可指定存在的空目錄)
mksf.ext3/dev/sdb1把第二塊硬盤的第一個主分區格式化爲ext3
mkswap/dev/sdb2初始化swap區,此區不可格式化。
mount/dev/sdb1/mnt/d#將第一個分區掛載到d這個目錄
重啓後自動掛載:vi/etc/fstab
添加:/dev/sdb1/mnt/dext3default00

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章