[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 3

mkboot Command

Purpose

Creates the boot image, the boot record, and the service record. This command is NOT a user-level command and is NOT supported in AIX Version 4.2 or later.

Syntax

mkboot -d Device -b ] [ -D ] [ -c ] [ -h ] [ -i ] [ -I ] [ -l LVDev ] { -k Kernel -e Expander } [-L] [ -s ] [ -r ] [ -p Offset ] [ -w ] -f FileSystem

Description

The mkboot command combines a kernel and file system into a boot image. The resulting image is written to standard out. It is copied to a boot device with the appropriate boot record information. The boot image can be made compressed or uncompressed and with or without a boot record at the beginning of the image. An image created for a tape is compressed with the boot record at the start of the image file. A disk boot image may be created without compression and has no boot record. The boot record is written to the first sector of the disk. The record contains information about the size and location of the image after it is written to the boot logical volume on that disk.

If the boot logical volume is mirrored, the mkboot command not only writes the boot image to each copy of the boot logical volume but also writes a boot record to each physical disk comprising the mirror. As long as the mkboot command is able to update at least one of the copies of a mirrored boot logical volume, no error is returned. To enable booting from each copy of a mirrored boot logical volume, each of the physical disks must be specified using the bootlist command. For more information regarding mirrored logical volumes, see "Logical Volume Storage Overview in AIX Version 4.3 System Management Guide: Operating System and Devices."

The mkboot command is usually called by the bosboot command. However, you can run the mkboot command a second time to put expand code at the beginning of a compressed boot image.

Flags

-b Zeros out save-base fields. This flag is optional.
-d Device Specifies the device required for the IPL record. This flag is required.
-c Zeros out the boot record on the device. This flag is optional.
-D Loads the low-level debugger at boot time.
-e Expander Specifies kernel expansion code to create a compressed boot image file. Either the -e flag or the -k flag must be specified.
-f FileSystem Specifies the boot file system. This flag is required.
-h Prevents the mkboot command from updating the boot header. This flag is optional.
-i Writes the normal portion of the boot record.
-I (uppercase i) Invokes the low-level debugger at boot time.
-k Kernel Specifies the kernel in the boot image. Either the -k flag or the -e flag must be specified.
-l (lowercase L) LVDev Specifies the logical volume device that contains the loadable boot code.
-L Enables lock instrumentation for MP systems. This flag has no effect on systems that are not using the MP kernel.
-p Offset Specifies the address to use as boot_pr_start field in the boot record. This flag is used in creating the CD-ROM boot image. This flag is optional.
-r Creates an image that is read-only storage (ROS) emulation code.
-s Writes the service portion of the boot record.
-w Outputs first two blocks of boot logical volume before the boot image. This flag is applicable to disk boot image only.

Security

Access Control: Only the root user can read and execute this command.

Examples

  1. To create an uncompressed boot image, using the kernel /usr/lib/boot/unix and the /tmp/bootfs file system for the device /dev/hdisk0, enter
    mkboot -d /dev/hdisk0 -k /usr/lib/boot/unix -f /tmp/bootfs \
    -b -i -s > /tmp/boot.image
  2. To clear the boot record but leave the PVID for disk hdisk0, enter:
    mkboot -d /dev/hdisk0 -c
  3. Although the mkboot command combines a kernel and a random access memory (RAM) file system to create one boot image, you can run the mkboot command a second time to put expand code at the beginning of a compressed boot image. For example, enter:
    mkboot -b -d /dev/rmt0 -k unix -f ramfs | compress > /tmp/image
    mkboot -b -i -s -d /dev/rmt0 -k bootexpand -f /tmp/image \
    > bootfile
    for a bootable tape where:
    unix Specifies the kernel.
    ramfs Specifies the RAM disk file system.
    compress Specifies the compression or compact routine.
    bootexpand Specifies the expansion or kernel uncompact routine.

Files

/usr/include/sys/bootrecord.h Specifies the structure of the boot record.

Related Information

The bosboot command, and lockstat command.

Understanding the Boot Process in AIX Version 4.3 System Management Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]