|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Devices and File Systems Oracle Solaris 10 1/13 Information Library|
The following task map identifies the procedures for setting up a disk for a UFS root file system or a disk for a UFS file system on an x86 based system.
A disk can contain the UFS root (/) and /usr file systems, user or data file systems, or a combination of file systems. If the disk contains the UFS root (/) or /usr file systems, you have two ways to recover:
You can reinstall the entire Oracle Solaris OS.
Or, you can replace the disk and restore your Oracle Solaris OS file systems from a backup medium.
You can use this procedure to replace a disk that contained the UFS root or /usr file system. Refer to your hardware installation guide for information on replacing a disk.
Create an fdisk partition, if necessary. Go to x86: How to Create a Solaris fdisk Partition.
If you are adding a disk with an EFI disk label, see EFI (GPT) Disk Label for more information.
Generally, most modern bus types support hot-plugging. This means you can insert a disk in an empty slot and the system recognizes it. For more information about hot-plugging devices, see Chapter 4, Dynamically Configuring Devices (Tasks).
Refer to the disk's hardware installation guide for details.
After the disk is connected, create an fdisk partition. Go to x86: How to Create a Solaris fdisk Partition.
For information about creating or changing a Solaris fdisk partition, see Creating and Changing Solaris fdisk Partitions.
A numbered list of disks is displayed.
Specify disk (enter its number): disk-number
where disk-number is the number of the disk that you want to repartition.
Choose base (enter number) ? 1
For more information about the free hog slice, see Using the Free Hog Slice.
Do you wish to continue creating a new partition table based on above table[yes]? yes
When adding a system disk, you must set up slices for the following:
root (slice 0) and swap (slice 1) and/or
/usr (slice 6)
After you identify the slices, the new partition table is displayed.
Okay to make this the current partition table[yes]? yes
If you don't want the current partition table and you want to change it, answer no and go to Step 7.
Enter table name (remember quotes): "partition-name"
where partition-name is the name for the new partition table.
Ready to label disk, continue? yes
After you create disk slices and label the disk, you can create file systems on the disk. Go to x86: How to Create a UFS File System.
# newfs /dev/rdsk/cwtxdysz
where /dev/rdsk/cwtxdysz is the raw device for the file system to be created.
For more information about the newfs command, see Chapter 15, Creating and Mounting File Systems (Tasks) or newfs(1M).
# mount /dev/dsk/cwtxdysz /mnt # ls /mnt lost+found
Disk for a UFS root file system – You need to restore the root (/) and /usr file systems on the disk.
After the root (/) and /usr file systems are restored, install the boot block. Go to x86: How to Install Boot Blocks for a UFS Root File System.
Disk for a UFS file system – You might need to restore file systems on the new disk. Go to Restoring UFS Files and File System Backups (Task Map). If you are not restoring file systems on the new disk, you are finished adding a secondary disk.
For information on making the file systems available to users, see Mounting and Unmounting Oracle Solaris File Systems.
# /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/cwtxdysz
For more information, see installgrub(1M).
# init 6
Example 11-1 x86: Installing Boot Blocks for a UFS Root File System
The following example shows how to install the boot blocks for a UFS root file system on an x86 system.
# /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1d0s0 stage1 written to partition 0 sector 0 (abs 2016) stage2 written to to partition 0, 227 sectors starting 50 (abs 2066)