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

推荐阅读