Become superuser or assume an equivalent role.
Add a new system disk to the system where the root (/) and /usr file systems will be restored.
For a detailed description about adding a system disk, refer to SPARC: How to Connect a System Disk and Boot or x86: How to Connect a System Disk.
Mount the new file system on a temporary mount point.
# mount /dev/dsk/device-name /mnt |
Change to the /mnt directory.
# cd /mnt |
(Optional) Write-protect the tapes for safety.
Create the links for the tape device.
# tapes |
Restore the root (/) file system.
# ufsrestore rvf /dev/rmt/n |
The dump level 0 tape is restored.
Remove the tape and load the next level tape in the drive.
Always restore tapes starting with dump level 0 and continuing from the lowest to highest dump level.
Continue restoring as needed.
# ufsrestore rvf /dev/rmt/n |
The next level tape is restored.
Verify that the file system has been restored.
# ls |
Remove the restoresymtable file.
# rm restoresymtable |
The restoresymtable file that is created and used by the ufsrestore command to check-point the restore is removed.
Change to the root (/) directory.
# cd / |
Unmount the newly created file system.
# umount /mnt |
Check the new file system.
# fsck /dev/rdsk/device-name |
The restored file system is checked for consistency.
Create the boot blocks on the root partition.
On a SPARC system:
# installboot /usr/platform/`uname-i`/lib/fs/ufs/bootblk /dev/rdsk/device-name |
For more information, see the installboot(1M) man page.
For an example of using the installboot command on a SPARC based system, see Example 26–6.
On an x86 system:
# /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/cwtxdysz |
For more information, see installgrub(1M).
For an example of using the installgrub command on an x86 based system, see Example 26–7.
Insert a new tape in the tape drive.
Back up the new file system.
# ufsdump 0uf /dev/rmt/n /dev/rdsk/device-name |
A dump level 0 backup is performed. Always immediately do a full backup of a newly created file system because the ufsrestore command repositions the files and changes the inode allocation.
Repeat steps 5 through 16 for the /usr file system, if necessary.
Reboot the system.
# init 6 |
The system is rebooted.
This example shows how to restore the root (/) file system on a SPARC system. This example assumes that the system is booted from a local Solaris DVD or from the network.
# mount /dev/dsk/c0t3d0s0 /mnt # cd /mnt # tapes # ufsrestore rvf /dev/rmt/0 # ls # rm restoresymtable # cd / # umount /mnt # fsck /dev/rdsk/c0t3d0s0 # installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0 # ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t3d0s0 # init 6 |
This example shows how to restore the root (/) file system on an x86 system. This example assumes that the system is booted from a GRUB failsafe boot session, local Solaris DVD, or from the network.
# mount /dev/dsk/c0t3d0s0 /mnt # cd /mnt # tapes # ufsrestore rvf /dev/rmt/0 # ls # rm restoresymtable # cd / # umount /mnt # fsck /dev/rdsk/c0t3d0s0 # /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t3d0s0 stage1 written to partition 0 sector 0 (abs 2016) stage2 written to to partition 0, 227 sectors starting 50 (abs 2066) # ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t3d0s0 # init 6 |