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 Chapter 30, SPARC: Adding a Disk (Tasks) or Chapter 31, IA: Adding a Disk (Tasks).
Mount the new file system on a temporary mount point.
# mount /dev/dsk/device-name /mnt |
Change to the /mnt directory.
# cd /mnt |
Write-protect the tapes.
Use the ufsrestore command to restore the root file system.
# ufsrestore rvf /dev/rmt/n |
The level 0 tape is restored.
Remove the tape and load the next level tape in the drive.
Always restore tapes starting with 0 and continuing from lowest to highest level.
Continue to use the ufsrestore command as needed.
# ufsrestore rvf /dev/rmt/n |
The next level tape is restored.
Verify the file system is restored.
# ls |
Remove the restoresymtable file.
# rm restoresymtable |
Removes the restoresymtable file that is created and used by ufsrestore to check-point the restore.
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 by using the installboot(1M) command.
# installboot /usr/platform/`uname-i`/lib/fs/ufs/bootblk /dev/rdsk/devicename |
See "SPARC: Example--Restoring the root (/) File System" for an example of using the installboot command on a SPARC based system or "IA: Example--Restoring the root (/) File System" for an example of using the installboot command on an IA based system.
Insert a new tape in the tape drive.
Back up the new file system.
# ufsdump 0uf /dev/rmt/n /dev/rdsk/device-name |
A level 0 backup is performed. Always do an immediate backup of a newly created file system because ufsrestore repositions the files and changes the inode allocation.
Repeat steps 5 through 18 for the /usr file system, if necessary.
Reboot the system.
# init 6 |
The system is rebooted.
# 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/sun4m/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0 # ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t3d0s0 # init 6 |
# 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/`uname -i`/lib/fs/ufs/pboot /usr/platform/`uname -i`/lib/fs/ ufs/bootblk /dev/rdsk/c0t3d0s0 # ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t3d0s0 # init 6 |