# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 1302 alt 2 hd 255 sec 63> /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
Specify disk (enter its number): ^C
# 掃描新裝置
devfsadm
# 再次確認
format
AVAILABLE DISK SELECTIONS:
0. c0d0 ...
1. c0d1 <DEFAULT cyl 1303 alt 2 hd 255 sec 63> /pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0 ← 新磁碟
Specify disk (enter its number): 1
devfsadm 會掃描硬體總線並建立 /devices、/dev 節點。若無效可嘗試 drvconfig; disks 或重啟。
format> fdisk
No fdisk table exists. The default partition for the disk is:
a 100% "SOLARIS System" partition
Type "y" to accept the default partition, otherwise type "n" to edit the partition table.
y
接受預設將整顆磁碟劃為單一 Solaris 分區 (ID 191)。
format> label
Ready to label disk, continue? y
format> p # 進入 partition 選單
partition> print # 顯示預設分區表
Current partition table (original):
Total disk cylinders available: 1302 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 0
1 unassigned wm 0 0 0
2 backup wu 0 - 1301 9.97GB 20916630 ← 整盤備份分區,勿動
3 unassigned wm 0 0 0
...
partition> 0 # 設定 slice 0 (通常為 / 或 /export/home)
Enter partition id tag[root]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 3 # 保留 cyl 0-2 給 boot/alternates
Enter partition size[0b, 0c, 0.00mb, 0.00gb]: 25427808b # 全部剩餘空間
partition> label # 再次寫入標籤生效
partition> quit
format> quit
# 建立 UFS 檔案系統 (以 slice 0 為例)
newfs /dev/rdsk/c0d1s0
# 建立掛載點並掛載
mkdir /data1
mount /dev/dsk/c0d1s0 /data1
# 設定開機自動掛載 (/etc/vfstab)
/dev/dsk/c0d1s0 /dev/rdsk/c0d1s0 /data1 ufs 1 yes -
fdisk 建立 Solaris 分區,再進行 Slice 切割;SPARC 平台無此步驟。label 寫入 VTOC,否則不生效。