Become superuser.
# format |
A list of available disks is displayed.
Enter the number of the disk that you want to repartition from the list displayed on your screen.
Specify disk (enter its number): disk-number |
disk-number |
Is the number of the disk that you want to repartition. |
Go into the partition menu (which lets you set up the slices).
format> partition |
Display the current partition (slice) table.
partition> print |
Start the modification process.
partition> modify |
Set the disk to all free hog.
Choose base (enter number) [0]? 1 |
See "Using the Free Hog Slice" for more information about the free hog slice.
Create a new partition table by answering y when prompted to continue.
Do you wish to continue creating a new partition table based on above table[yes]?y |
Identify the free hog partition (slice) and the sizes of the slices when prompted.
When adding a system disk, you must set up slices for:
root (slice 0) and swap (slice 1) and/or
/usr (slice 6)
After you identify the slices, the new partition table is displayed.
Make the displayed partition table the current partition table by answering y when asked.
Okay to make this the current partition table[yes]? y |
If you don't want the current partition table and you want to change it, answer no and go to Step 6.
Name the partition table.
Enter table name (remember quotes): "partition-name" |
partition-name |
Is the name for the new partition table. |
Label the disk with the new partition table when you have finished allocating slices on the new disk.
Ready to label disk, continue? yes |
Quit the partition menu.
partition> q |
Verify the disk label using the verify command.
format> verify |
Quit the format menu.
format> q |
The following example uses the format utility to divide a 200-Mbyte disk into two slices: one for the root (/) file system and one for the swap area.
# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t2d0 <SUN0207 cyl 1254 alt 2 hd 9 sec 36> /sbus@1,f8000000/esp@0,800000/sd@2,0 1. c0t3d0 <SUN0424 cyl 1151 alt 2 hd 9 sec 80> /sbus@1,f8000000/esp@0,800000/sd@3,0 Specify disk (enter its number): 0 selecting c0t2d0 [disk formatted] format> partition partition> print partition> modify Select partitioning base: 0. Current partition table (original) 1. All Free Hog Choose base (enter number) [0]? 1 Part Tag Flag Cylinders Size Blocks 0 root wm 0 0 (0/0/0) 1 swap wu 0 0 (0/0/0) 2 backup wu 0 - 1253 198.39MB (1254/0/0) 3 unassigned wm 0 0 (0/0/0) 4 unassigned wm 0 0 (0/0/0) 5 unassigned wm 0 0 (0/0/0) 6 usr wm 0 0 (0/0/0) 7 unassigned wm 0 0 (0/0/0) |
Do you wish to continue creating a new partition table based on above table[yes]? yes Free Hog partition[6]? 5 Enter size of partition `0' [0b, 0c, 0.00mb]: 100mb Enter size of partition `1' [0b, 0c, 0.00mb]: 98mb Enter size of partition `3' [0b, 0c, 0.00mb]: Enter size of partition `4' [0b, 0c, 0.00mb]: Enter size of partition `6' [0b, 0c, 0.00mb]: Enter size of partition `7' [0b, 0c, 0.00mb]: Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 632 100.14MB (633/0/0) 1 swap wu 633 - 1233 95.08MB (601/0/0) 2 backup wu 0 - 1253 198.39MB (1254/0/0) 3 unassigned wm 0 0 (0/0/0) 4 unassigned wm 0 0 (0/0/0) 5 unassigned wm 1234 - 1253 3.16MB (20/0/0) 6 usr wm 0 0 (0/0/0) 7 unassigned wm 0 0 (0/0/0) Okay to make this the current partition table[yes]? yes Enter table name (remember quotes): "disk2" Ready to label disk, continue? yes partition> quit format> verify format> quit |
The following example uses the format utility to divide a 200-Mbyte disk into one slice for the /export/home1 file system.
# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t2d0 <SUN0207 cyl 1254 alt 2 hd 9 sec 36> /sbus@1,f8000000/esp@0,800000/sd@2,0 1. c0t3d0 <SUN0424 cyl 1151 alt 2 hd 9 sec 80> /sbus@1,f8000000/esp@0,800000/sd@3,0 Specify disk (enter its number): 0 selecting c0t2d0 [disk formatted] format> partition partition> print partition> modify Select partitioning base: 0. Current partition table (original) 1. All Free Hog Choose base (enter number) [0]? 1 Part Tag Flag Cylinders Size Blocks 0 root wm 0 0 (0/0/0) 1 swap wu 0 0 (0/0/0) 2 backup wu 0 - 1253 198.39MB (1254/0/0) 3 unassigned wm 0 0 (0/0/0) 4 unassigned wm 0 0 (0/0/0) 5 unassigned wm 0 0 (0/0/0) 6 usr wm 0 0 (0/0/0) 7 unassigned wm 0 0 (0/0/0) Do you wish to continue creating a new partition table based on above table[yes]? y Free Hog partition[6]? 5 Enter size of partition `0' [0b, 0c, 0.00mb]: Enter size of partition `1' [0b, 0c, 0.00mb]: Enter size of partition `3' [0b, 0c, 0.00mb]: Enter size of partition `4' [0b, 0c, 0.00mb]: 198mb Enter size of partition `6' [0b, 0c, 0.00mb]: Enter size of partition `7' [0b, 0c, 0.00mb]: |
Part Tag Flag Cylinders Size Blocks 0 root wm 0 0 (0/0/0) 1 swap wu 0 0 (0/0/0) 2 backup wu 0 - 1253 198.39MB (1254/0/0) 3 unassigned wm 0 0 (0/0/0) 4 unassigned wm 0 - 1251 198.07MB (1252/0/0) 5 unassigned wm 1252 - 1253 0.32MB (2/0/0) 6 usr wm 0 0 (0/0/0) 7 unassigned wm 0 0 (0/0/0) Okay to make this the current partition table[yes]? yes Enter table name (remember quotes): "home1" Ready to label disk, continue? y partition> q format> verify format> q # |
After you create disk slices and label the disk, you can create file systems on the disk. Go to "SPARC: How to Create File Systems".