btcreate(8)btcreate(8)NAMEbtcreate - Builds a bootable Standalone System (SAS) kernel on tape
SYNOPSIS
/usr/sys/bin/btcreate [-a addlist_file[-d disk_tmp_space]] [-f] [-k
config_file] -mdisk_partition [-s fslist_file] [-t tape_device]
OPTIONS
Use the btcreate command to build a bootable Standalone System (SAS)
kernel on UFS and AdvFS file systems. The btcreate command supports
noninteractive and interactive modes. To run the command in noninter‐
active mode, specify at least the -f, -k, -m, -s, -t, and -d options on
the command line. To run the command in interactive mode, invoke it
without any options or with a subset of the preceding options. You are
then prompted to supply the minimum parameters and variables.
The following command options are available: Causes the btcreate com‐
mand to back up the files and directories specified in the
addlist_file. Files are backed up to the miniroot file system. This
miniroot file system is the minimum file system required to build the
SAS kernel. If you are using the btcreate command in noninteractive
mode, you must create the addlist_file file before invoking the com‐
mand. The addlist_file file name must be absolute pathname, such as
/usr/lib/sabt/etc/addlist.
The addlist_file file consists of one line for each entry. Each
entry has two fields separated by a space or tab character. The
first field specifies the absolute pathname of the file or
directory on the currently running system. If the file is not
found, the btcreate command exits. The second field specifies
the absolute pathname of the file or directory on the miniroot
file system.
A sample addlist_file follows:
/sbin/kill /sbin /usr/local/bin/mydir /usr/local/bin/mydir
/.kshrc /.kshrc /sbin/sort /sbin/sort
If the total size of all files and directories exceeds the size
limit of 360KB on the miniroot file system, the btcreatecommand
exits. Enables you to specify the location of temporary
workspace. If you do not use this option, the btcreate command
creates temporary files in the /usr files ystem and requires up
to 156000 blocks (512 byte blocks) of disk space. In the follow‐
ing example, the temporary files are created in the /mnt/bt_tmp
directory: # ./btcreate -d /mnt/bt_tmp Forces the newfs command
to create the miniroot file system without verifying whether or
not a file system exists on the partition. This option also
forces the btcreate command to be completely noninteractive,
whether or not you specify the mfs parameter or the disk parti‐
tion parameter with the -m option. Causes btcreate to use the
specified kernel configuration file located in the /usr/sys/conf
directory. The kernel configuration file defines the run-time
behavior of the kernel and is used to build the SAS kernel.
Most firmware versions on most platforms implement a limit on
the size of a bootable SAS kernel (slightly less than 32 MB).
In some cases, an SAS kernel made from a fully populated kernel
will exceed this limit. Therefore, in all cases where the
resulting SAS kernel exceeds the firmware size limit, btcreate
removes all options except CDFS and DVDFS, and re-creates the
SAS kernel. If this also exceeds the firmware size limit, btcre‐
ate builds the kernel with mandatory options only.
To build the kernel with all options, set the environment vari‐
able BTCREATE_MODE=VER-1-1 before running the btcreate command.
Doing this causes btcreate to overcome the firmware (32 MB) size
limitation. Causes the btcreate command to create the miniroot
file system on a memory file system (mfs) using the mfs command,
or on the specified disk partition (for example, dsk0h) using
the newfs command. The miniroot file system is the minimum file
system required to build the SAS kernel.
An mfs is a UFS file system which resides in virtual memory. By
creating the miniroot file system in virtual memory, you can
save disk space. The mfs command uses 21MB of memory using swap
space as the special device. The btcreate command mounts the mfs
on the /var/tmp/mfsmnt$$ mount point. If you specify the mfs
option, the btcreate command creates another memory file system
that is 20.5 MB which is mounted on the /var/tmp/procprod direc‐
tory.
If you have sufficient disk space, use the -m option with the
disk_partition variable to create the miniroot file system on
disk. Causes the btcreate command to back up the file systems
specified in the fslist_file file to tape. If you are using the
btcreatecommand in non-interactive mode, you must create this
file before invoking the utility. Specify an absolute pathname
such as/usr/lib/sabt/etc/fslist for the fslist_file file parame‐
ter.
The fslist_file file consists of one line for each file system
you want to back up. Each line contains three fields separated
by a space as follows: devname mountpoint type
In the previous example: Specifies the name of the disk device
where the file system resides. For example, /dev/disk/disk0a,
/dev/vol/rootdg/rootvol, and root_domain#root are valid device
names for UFS and AdvFS respectively. Specifies where the file
system is mounted. For example, the mount point may be the root
directory (/). Specifies the type of file system. Valid
entries are ufs for the UNIX File System or advfs for the
Advanced File System. Causes the btcreate command to use the
tape device specified (for example, tape0_d1).
DESCRIPTION
Use the btcreate command to build a bootable Standalone System (SAS)
kernel on tape. The SAS kernel has a built-in memory file system (mfs),
which contains the minimum commands, files, and directories needed to
restore the system image. This is referred to as the miniroot file
system. The btcreatecommand supports UFS and AdvFS file systems only.
You must have superuser privileges to use this command and you can
invoke only a single instance of the btcreate command.
Note
To execute, the btcreate command requires 20MB of disk space in the
/usr directory unless you use the -d option to specify alternate tempo‐
rary workspace.
Note
Verify the size of the file system to ensure that you have sufficient
tape volumes, depending on the maximum storage capacity of your tape
device. The btcreate command prompts you to load a new tape volume if
it runs out of storage space. Label the tapes in sequence.
To prepare to create a SAS kernel using the btcreate command, have the
following information available: Name of the configuration file in the
/usr/sys/conf directory. Name of the disk partition (for example,
dsk2e) where the miniroot file system is to reside. Minimum size
needed on the disk is 21 MB. This disk partition should not be mounted
when you issue the btcreate command.
Note
The btcreate command invokes the newfs command to create the
partition. If you do not specify the -f option, the newfs com‐
mand prompts you to confirm overwriting the partition. If you
specify the -f option, the newfs command overwrites this parti‐
tion without prompting you for confirmation. Name of the tape
device, for example tape0_d1, where the SAS kernel and file sys‐
tems are to reside. Device name, mount point, and type of each
file system (UFS, AdvFS ) that you want to back up to the tape
device. The following examples show valid UFS and AdvFS
entries:
UFS:
/dev/disk/dsk1a / ufs /dev/disk/dev/dsk1g /usr ufs
/dev/vol/rootdg/rootvol /ufs
AdvFS:
root_domain#root / advfs usr_domain#usr /usr advfs
If you do not specify the -s option, the btcreatecommand dis‐
plays a list of file systems to help you with your selection.
If you specify the -s option, you must create the file before
starting the btcreate utility. See the -s option for more infor‐
mation.
Note
Do not select swap partitions or volumes for file system back‐
ups. For UFS filesystems over LSM volumes use the vdump and vre‐
store commands to archive and extract file systems. An
addlist_file file, if you specify the -a option, which includes
files or directories on the miniroot file system. See the -a
option for more information. An fslist_file file, if you spec‐
ify the -s option, which specifies the file systems to back up.
See the -s option for more information. A
/usr/lib/sabt/sbin/custom_install.sh script, if you want to cus‐
tomize the restored system image. Both interactive and nonin‐
teractive users must create this file before invoking the btcre‐
ate utility. The file must be written in the Bourne shell lan‐
guage (sh1) as it is the only shell provided on the miniroot
file system.
The btcreatecommand copies the custom_install.sh file to tape
and places it in the sbin directory on the miniroot file system.
The btextractcommand invokes the custom_install.sh script before
exiting.
To create the SAS kernel, the btcreate command copies the
/usr/sys/conf/YOUR_SYSTEM_NAME configuration file to
/usr/sys/conf/YOUR_SYSTEM_NAME.BOOTABLE and modifies it as follows:
config vmunix root on md pseudo-device memd 38000
These modifications indicate that a memory file system of 38000 is con‐
figured. The memory file system and the disk partition where the mini‐
root file system reside are equivalent in size.
After modifying the configuration file, the btcreatecommand executes
the doconfig command and moves the bootable kernel, /usr/sys/YOUR_SYS‐
TEM_NAME.BOOTABLE/vmunix to the /usr/sys/bin directory.
You can optionally label disks using your own disklabel script. If a
customized disklabel script is not present, the btextract command
labels the disks in the usual manner. A customized disklabel script
has the following restrictions: It must be located in the
/usr/lib/sabt/etc directory. It must be named custom_disklabel_file.
Use the btextract command to boot a system from a bootable tape. Store
the following information with the tape, so that recovery is faster:
When btextract command starts, it prompts you for the following infor‐
mation: The device name of the tape drive (such as dev/tape/tape0_d1)
in which the bootable tape is loaded The compression density at which
the tape was created Whether a default or advanced (customized) restore
operation is required The type and layout of the disk from which the
bootable tape is created. You can obtain this information by using the
diskconfig GUI or the disklabel command.
To automate recovery, you can store restoration instructions in the
/usr/lib/sabt/etc/custom_prerestore file. See btextract(8) for more
information.
Note
Do not use the dxarchiver command to verify the tape. Use the mt and
restore commands as follows: # mt fsf 1 # restore -i <device>
Make sure that the bootable tapes you create with btcreate can be
booted. You can test this by trying to boot the tape using a manual
boot command from the SRM console prompt.
RETURN VALUES
Success An error occurred
EXAMPLES
The following examples demonstrate several methods of invoking the
btcreate command. In the following example, the btcreate command is
invoked without any options, placing you in interactive mode. The
btcreate command prompts you for all information needed to build the
SAS kernel. # /usr/sys/bin/btcreate In the following example, all
options are specified causing the btcreatecommand to build the SAS ker‐
nel in noninteractive mode. That is, the SAS kernel is built without
prompting you for information.
# /usr/sys/bin/btcreate -a /usr/lib/sabt/etc/addlist_file -f \
-k YOUR_SYSTEM_NAME -m mfs -t tape0_d1 -d /mnt/bt_tmp \ -s
/usr/lib/sabt/etc/fslist_file In the following example, the -a
option is excluded from the command line. The btcreatecommand
assumes you are not adding files or directories. The SAS kernel
is built without prompting you for information because you spec‐
ified the minimum options required to run in noninteractive
mode.
# /usr/sys/bin/btcreate -f-k GOOFY -m mfs -t tape0_d1 \ -s
/usr/local/bin/backup_file In the following example, the -k
option is excluded from the command line. The btcreatecommand
places you in interactive mode and prompts you for any options
that you did not specify.
# /usr/sys/bin/btcreate -a /usr/sys/bin/user_file -f \ -m dsk0h
-t tape0_d1 -s /usr/local/bin/backup_file
FILES
Provides a log of the btcreate process Specifies the customized shell
script used to perform system administrative tasks on the restored sys‐
tem image A custom disklabel file read by the btextract command A lock‐
ing file that prevents multiple instances of the btcreate command
RESTRICTIONS
The following restrictions apply: You cannot run multiple instances of
the btcreate command. The /usr/run/bttape.pid lock file is created when
the command runs and is removed when that instance of the command is
terminated. LSM support is provided only for root, swap and usr
filesystems. LSM support is provided on a system only if it is config‐
ured with LSM volumes at installation. LSM support is provided only in
unattended mode. Mirroring and striping are not supported options for
bootable tape.
SEE ALSO
Commands: df(1), btextract(8), disklabel(8), doconfig(8), dump(8),
newfs(8), mkfdmn(8), mkfset(8), pmerge(8), vdump(8)btcreate(8)