FORMAT命令的參數:( 二 )


用戶可以使用下列命令來將從/etc/format.da文件中預先設定的分區表讀入當前卷標 。
。select:從/etc/format.dat文件中選擇一個預先設定的分區表
。print:顯示選擇的分區表
。label:將選擇的分區表寫入磁盤的卷標
。verify:定位磁盤卷標和顯示新信息
。disk:選擇磁盤
。name:為改變了的分區表建立一個名字
。save:保存名字到./format.dat文件中
進行磁盤分區
按照下面的步驟為磁盤分區
1.Root用戶在提示符前輸入format并且回車
# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
/pci@1f,4000/scsi@3/sd@0,0
1. c0t1d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
/pci@1f,4000/scsi@3/sd@1,0
Specify disk (enter its number): 1
Format實用程序搜索所有已經綁定的磁盤,每個被找到的磁盤,format都顯示他的邏輯設備名,硬件名,物理參數和物理設備名 。
2.選擇在磁盤邏輯設備名左邊的編號選擇第二個磁盤 。
selecting c0t1d0
[disk formatted]
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd>- execute <cmd>, then return
quit
用于分割Slices的特定的菜單包括
。partition:顯示分區菜單
。label:將當前定義的分區寫入磁盤卷標
。verify:讀并且顯示磁盤卷標
。quit:退出format實用程序
3.在format提示符輸入partition
format>partition
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd>- execute <cmd>, then return
quit
partition菜單已經顯示了 。這個菜單使用戶可以執行下列功能
。0-7:指定8個分區的柱頭組和長度
。select:從/etc/format.dat中選擇之前定義的分區表
。modify:改變之前定義的分區表
。name:命名當前的分區表
。print:顯示當前的分區表
。label:將當前分區表寫入磁盤卷標
4.在partition提示符輸入print顯示在內存中的磁盤卷標的拷貝 。
partition>print
Current 分區名?partition table (original):
Total disk cylinders available: 4924 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wm 0 0 (0/0/0) 0
2 backup wm 0 - 4923 8.43GB (4924/0/0) 17682084
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 home wm 0 - 4923 8.43GB (4924/0/0) 17682084
分區的名字顯示在第一行的括號中
下面顯示每列的含義
。Part:磁盤的Slice編號
。Tag:之前定義的可選的標記符
。Flag:之前定義的可選的標志位
。Cylinders:Slice的起始柱頭和結束柱頭
。Size:Slice的容量
。Blocks:每個Slice的柱頭的總數和扇區的總數
5.輸入0選擇Slice 0
partition>0
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 400
partition>
6.當提示ID tag時,輸入問號可以列出所有的可選項
7.按回車鍵則使用默認的tag
8.當提示permission flags時,輸入問號可以列出所有的可選項
9.按回車則使用默認的flag
10.輸入回車可以設置起始的柱頭
11.為Slice 0輸入新的容量
12.輸入print,顯示改變后的當前Slice 0
13.輸入1選擇Slice 1
14.按回車選擇默認的tag和flags
15.輸入Slice 1的新起始柱頭
16.輸入Slice 1的新容量
17.輸入print顯示改變后的Slice

推薦閱讀