btextract - Extracts the file systems from tape in single-user mode in memory
The btextract utility is a shell script that restores file systems from tapes that contain the bootable Standalone System (SAS) kernel. The SAS kernel is created using the btcreate utility. You can perform a DEFAULT restore or an ADVANCED restore operation.
A DEFAULT restore is used by system administrators who want to duplicate the customized system on more than one machine of the same hardware platform type. When you perform a DEFAULT restore, you cannot specify which disk partitions to use for the restore operation. Instead, the btextract utility restores file systems using the disk partition information gathered during the btcreate session; all existing information is overwritten.
To perform a DEFAULT restore, the disk configuration of the system you backed up must be the same as the system you are restoring.
During an ADVANCED restore, you are prompted to enter the name of the disk partition where the file systems are to be restored.
During an ADVANCED restore, the btextract utility assigns the b partition of the root disk as the swap partition.
A file system which is more than 100% full cannot be restored in a partition of the same size as the original partition. During the restore of the UFS file system, the /sbin/restore command adds a new file named restoresymtable. The presence of this restoresymtable file can make the restored file system larger than the source partition size listed in the /sbin/disklabel output.
For example, on the source system, the disklabel shows the target h partition to be: h: 86758 1212416 4.2BSD And the ufs file system is as follows: Filesystem 512-blocks Used Available Capacity Mounted on /dev/rz8h 83812 83786 0 112% /bootable The file system is 112% full. This file system cannot be restored on the target file system of 86758 (512-blocks), as the following file is created by the /sbin/restore command. -rw-r--r-- 1 root system 27368 Jul 2 09:33 restoresymtable The command /sbin/restore creates a restoresymtable file that exceeds the 112% range. The solution is to use a partition of about 86996 (512-blocks), about 3.8% larger than the actual file size.
To use the btextract utility, place the system in a halt state, initialize the system, then boot from the tape as follows: >>> init >>> show dev >>> boot -fl "nc" MKA500 In the previous example, the show dev command provides the device name under BOOTDEV and MKA500 is the BOOTDEV.
Once the initial boot is complete, the shell invokes the btextract utility. If you created a /usr/lib/sabt/sbin/custom_install.sh script during the btcreate session, the btextract utility invokes the custom_install.sh script before exiting. See the btcreate reference page for more information.
After the btextract utility completes, you must shut down the system, then reboot the system from the restored disk as follows: # shutdown -h now >>> boot DKA100 In the previous example, DKA100 is the BOOTDEV.
The btextract utility returns zero (0) on success and a number greater than zero (0) on error.
Log of the btextract process in memory Copy of the btextract process on the restored root file system Script used to customize the restored image
Utilities: addvol(8), btcreate(8), df(1), disklabel(8), lmf(8), mkfdmn(8), mkfset(8), newfs(8), restore(8), sh(1), vrestore(8) delim off