bosboot 명령어 (AIX 5.3·6.1)

핵심 정리

  • 부트 이미지(커널 + RAM 디스크 파일 시스템)를 만들어 부트 논리 볼륨(보통 hd5)에 씁니다: bosboot -ad /dev/hdisk0.
  • rootvg 미러, 디스크 교체, migratepv로 hd5를 옮긴 뒤, 커널 매개변수나 부팅 관련 장치 구성을 바꾼 뒤 실행합니다. 그 뒤 bootlist로 부트 순서도 맞춥니다.
  • 실패하면서 재부팅하지 말라는 메시지가 나오면 원인을 고쳐 성공할 때까지 재부팅하지 않습니다.
  • /tmp와 대상 파일 시스템에 여유 공간이 필요합니다. bosboot -qad /dev/hdisk0로 필요한 공간만 확인할 수 있습니다.
  • root만 실행할 수 있습니다. NVRAM의 부트 목록은 바꾸지 않습니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 -v(검증만)와 교체 디스크 참고가 더해지고, -M 값이 Norm·Serv·Both에서 primary·standby·both로 바뀜)
원문 IBM Commands Reference — 5.3 Volume 1, 6.1 Volume 1
파일 /usr/sbin/bosboot, /usr/lib/boot/*.proto
관련 명령어 bootlist, mkboot, lsvg, mirrorvg, savebase

목적

부트 이미지를 만듭니다.

영어 원문

Creates boot image.

구문

text
bosboot -Action [ -d Device ] [ -Options ... ]
bosboot { -a | -v } [ -d Device ] [ -p Proto ] [ -k Kernel ] [ -I | -D ] [ -l LVdev ] [ -L ] [ -M { primary | standby | both } ] [ -T Type ] [ -b FileName ] [ -q ]

첫째 형식은 일반 사용, 둘째 형식은 장치 부트 이미지를 만들 때입니다. 5.3의 둘째 형식은 -a만 있고 -M { Norm | Serv | Both }입니다.

설명

bosboot 명령은 시스템의 부트 ROS(Read-Only Storage) EPROM과 맞물리는 부트 이미지를 만듭니다.

RAM 디스크 파일 시스템과 커널로 부트 파일(부트 이미지)을 만들고, ROS 부트 코드가 알아보는 매체로 옮깁니다. 시스템 전원을 켜거나 재부팅하면 ROS 부트 코드가 매체에서 부트 이미지를 메모리로 읽고, 읽은 이미지의 커널로 제어를 넘깁니다.

RAM 디스크 파일 시스템에는 시스템의 장치와 파일 시스템을 쓸 수 있게 하는 장치 구성 루틴이 들어 있으며, 부트 장치에 따라 구성 파일이 다릅니다. 장치 유형마다 mkfs 프로토타입 파일이 있습니다(참고 6). 지금 지원하는 장치는 CD-ROM, 디스크, 테이프, 네트워크입니다. 네트워크 장치는 LAN의 네트워크 부트 서버에서 부팅하는 데 쓰는 토큰 링, 이더넷, FDDI입니다.

부트 이미지는 부팅하는 장치 유형마다 다르며, 일부 매체에 맞추고 실제 메모리 요구를 줄이려고 압축합니다. 부트 논리 볼륨은 부트 이미지를 담을 만큼 커야 합니다.

부트 이미지를 만드는 것 말고도 디스크의 장치 구성 데이터를 늘 저장합니다. NVRAM의 부트 장치 목록은 바꾸지 않으며, 그 목록은 bootlist로 바꿉니다.

bosboot는 보통 기본 운영 체제를 설치할 때와 운영 체제를 올릴 때 updatep가 부릅니다.

참고:

  1. root 권한이 있어야 합니다.

  2. 부트 디스크를 만드는 중 bosboot가 실패하면서 재부팅하지 말라는 메시지가 나오면 재부팅하지 않습니다. 문제를 고쳐 bosboot를 성공적으로 끝내야 합니다.

  3. /tmp 파일 시스템과, 대상 이미지가 있다면 그 이미지가 있을 파일 시스템에 공간이 필요합니다.

  4. 지정한 물리 디스크에 부트 논리 볼륨이 있어야 합니다. 어느 디스크를 줄지는 lsvg -M rootvg로 모든 논리 볼륨의 배치를 보고 정합니다. 기본 부트 논리 볼륨은 hd5이며, 그것이 있는 디스크를 씁니다.

  5. -d로 장치를 주지 않으면 시스템이 부팅한 디스크를 기본 장치로 봅니다. 그러나 -p로 프로토타입 파일을 주면 -d로 장치도 줘야 합니다.

  6. RAM 디스크 파일 시스템을 만들 때 쓰는 프로토타입 파일은 부트 장치와, 부트 이미지가 실행될 시스템의 하드웨어 플랫폼(sys0) 유형에 따라 다릅니다. 하드웨어 플랫폼 유형은 프로세서 수나 I/O 버스 구조 같은 기본 구성 특성으로 시스템을 묶는 추상 개념이며, 유형이 다르면 부팅할 때 장치를 동적으로 구성하는 방식이 근본적으로 다릅니다. AIX 5.1까지 rs6k는 Micro Channel 단일 프로세서 모델, rs6ksmp는 Micro Channel 대칭 다중 프로세서 모델, rspc는 ISA 버스 모델에 해당했습니다. 새 모델은 이 가운데 하나이거나, 구성 차이가 크면 새 유형이 정의됩니다. 같은 부트 장치라도 플랫폼 유형이 다르면 부트 이미지가 보통 다릅니다.

    프로토타입 파일은 플랫폼 유형과 부트 장치의 기본 프로토타입 파일(예: /usr/lib/boot/chrp.disk.proto)을 복사해 시작합니다. 다음으로 그 플랫폼 유형의 pcfg 파일(예: /usr/lib/boot/protoext/chrp.pcfg)을 봅니다. pcfg 파일에는 /usr/lib/boot/protoext 디렉터리에서 프로토 확장 파일을 찾을 템플릿 항목이 들어 있습니다. 예를 들어 플랫폼이 chrp, 부트 장치가 디스크이고 pcfg 파일에 scsi., chrp., chrp_lpar., fcp., graphics., ide., isa_sio., pci., ssa., sys.pci., tty., usbif.가 있으면, chrp.disk.proto에서 시작해 disk.proto.ext.scsi.*에 맞는 파일 내용을 더하고, pcfg 파일의 모든 줄을 처리할 때까지 이어 갑니다. 완성된 프로토타입 파일을 mkfs에 넘겨 RAM 디스크 파일 시스템을 만듭니다.

  7. 부트 이미지를 만들 때 쓰는 프로토타입 파일은 부트 장치와, 이미지를 만들 시스템의 시스템 장치 유형(sys0)에 따라 다르며, 파일 이름에 드러납니다: /usr/lib/boot/chrp.disk.proto, chrp.cd.proto, chrp.tape.proto, /usr/lib/boot/network/chrp.ent.proto, chrp.tok.proto, chrp.atm.proto, chrp.fddi.proto. 시스템 장치는 시스템 노드에서 가장 높은 수준의 장치로, 시스템의 모든 물리 장치로 이루어집니다. 기본으로 명령을 실행하는 시스템의 장치 유형에 맞는 프로토타입 파일을 쓰며, -p로 다른 것을 지정할 수 있습니다.

  8. (6.1) 실행 중인 시스템에서 부트 디스크를 떼어 내 교체 사본 디스크로 운영 중이면 bosboot가 "부트 논리 볼륨이 디스크에 없다"는 오류를 낼 수 있습니다. -d 없이 부르면 가장 최근에 부팅한 디스크를 기본으로 쓰는데 그 디스크가 없기 때문입니다. 이때는 -d로 부트 논리 볼륨이 지금 있는 디스크를 지정합니다.

영어 원문

The bosboot command creates the boot image that interfaces with the machine boot ROS (Read-Only Storage) EPROM (Erasable Programmable Read-Only Memory).

The bosboot command creates a boot file (boot image) from a RAM (Random Access Memory) disk file system and a kernel. This boot image is transferred to a particular media that the ROS boot code recognizes. When the machine is powered on or rebooted, the ROS boot code loads the boot image from the media into memory. ROS then transfers control to the loaded images kernel.

The associated RAM disk file system contains device configuration routines that make the machine's devices and file systems available. The RAM disk file system contains differing configuration files depending upon the boot device. A mkfs prototype file is supplied for each type of device. (See note 6 below.) Currently supported devices are:

  • CD-ROM

  • Disk

  • Tape

  • Network

A network device may be a token ring, Ethernet, or Fiber-Distributed Data Interface (FDDI) used to boot from a network boot server over a local area network (LAN).

The boot image varies for each type of device booted and is compressed to fit on certain media and to lessen real memory requirements. The boot logical volume must be large enough for the boot image.

In addition to creating a boot image, the bosboot command always saves device configuration data for disk. It does not update the list of boot devices in the NVRAM (nonvolatile random access memory). You can modify the list with the bootlist command.

The bosboot command is usually called during the Base Operating System installation and by the updatep command when the operating system is upgraded.

Note:

  1. You must have root user authority to use the bosboot command.

  2. Do not reboot the machine if the bosboot command is unsuccessful with a message not to do so while creating a boot disk. The problem should be resolved and the bosboot command run to successful completion.

  3. The bosboot command requires some space in the /tmp file system and the file system where the target image is to reside, if there is such an image.

  4. The bosboot command requires that the specified physical disk contain the boot logical volume. To determine which disk device to specify, issue the following command:

lsvg -M rootvg

This command displays a map of all logical volumes. The default boot logical volume is hd5. Use the disk device that contains the boot logical volume.

  1. When the device is not specified with the -d flag, the bosboot command assumes the default device is the disk the system is booted from. However, if the prototype file is specified with a -p flag, the device must also be specified with a -d flag.

  2. The prototype file used by the bosboot command to build the RAM disk file system depends on the boot device and the hardware platform (sys0) type of the machine the boot image will run on. The hardware platform type is an abstraction which allows machines to be grouped according to fundamental configuration characteristics such as number of processors or I/O bus structure or both. Machines with different hardware platform types will have basic differences in the way their devices are dynamically configured at boot time. The hardware platform type rs6k in AIX 5.1 and earlier applies to all Micro Channel-based uni-processor models through AIX 5.1 only. The type rs6ksmp applies to all Micro Channel-based symmetric multi-processor models through AIX 5.1 only. The type rspc in AIX 5.1 and earlier applies to all ISA-bus models. As new models are developed, their hardware platform types will either be one of the aforementioned types or, if fundamental configuration differences exist, new types will be defined. Boot images for a given boot device type will generally be different for machines with different hardware platform types. "The prototype file used by bosboot is constructed by starting with a copy of the base prototype file for the platform type and boot device (for example, /usr/lib/boot/chrp.disk.proto). Next the bosboot command looks at the pcfg file for the platform type being used (for example, /usr/lib/boot/ chrp.pcfg). The pcfg file contains entries which bosboot uses in a template to search for proto extension files. These files, located in the directory /usr/lib/boot/protoext, provide extensions to the prototype file under construction. For example, if the platform type is chrp and the boot device is disk, and the file /usr/lib/boot/protoext/chrp.pcfg contains the following: scsi. chrp. chrp_lpar. fcp. graphics. ide. isa_sio. pci. ssa. sys.pci. tty. usbif.

The bosboot command will start with the base prototype file /usr/lib/boot/chrp.disk.proto, and search the directory /usr/lib/boot/protoext for any files that match the template disk.proto.ext.scsi.*. The contents of these files are added to the prototype file under construction. Next, the contents of files matching the template /usr/lib/boot/protoext/disk.proto.ext.scsi.* are added to the prototype file under construction. This continues until all lines in the pcfg file have been processed. At this point the prototype file under construction is complete. The bosboot command passes this prototype file to the mkfs command which builds the RAM disk file system.

  1. The prototype files used by the BOSBOOT command to build boot images are dependent on the boot device. In addition, the prototype files are dependent on the system device type (sys0) of the machine for which the boot image is built. This is reflected in the names of these prototype files: /usr/lib/boot/chrp.disk.proto /usr/lib/boot/chrp.cd.proto /usr/lib/boot/chrp.tape.proto /usr/lib/boot/network/chrp.ent.proto /usr/lib/boot/network/chrp.tok.proto /usr/lib/boot/network/chrp.atm.proto /usr/lib/boot/network/chrp.fddi.proto The system device type is an abstraction that allows machines to be grouped according to fundamental configuration characteristics, such as number of processors and I/O bus structure. The system device is the highest-level device in the system node, which consists of all physical devices in the system.

Machines with different system device types have basic differences in the way their devices are dynamically configured at boot time. The bosboot command, by default, uses the prototype file that matches the system device type of the machine executing the command. The -p option allows you to specify the system device type of the prototype file.

  1. If the boot disk is removed from a running system, thus leaving the system operating from a replacement copy of that disk, you may experience an error message when you run the bosboot command. The error message states that the boot logical volume does not exist on the disk. This happens because the bosboot command, when called without the -d argument, defaults to the disk that the system most recently booted from. In this scenario, since that disk is no longer available, you will need to call the bosboot command with the -d argument, and the name of the disk on which the boot logical volume now resides. This provides the bosboot command with the information that is needed for identifying the new location of the boot image.

플래그

플래그 설명
-d Device 부트 장치. 하드 디스크면 생략할 수 있습니다.

동작 플래그(하나만 반드시 지정):

플래그 설명
-a 완전한 부트 이미지와 장치를 만듭니다.
-v (6.1) 검증만 하고 부트 이미지는 만들지 않습니다.

옵션 플래그(모두 선택):

플래그 설명
-b FileName 지정한 파일 이름을 부트 이미지 이름으로 씁니다.
-D 저수준 디버거를 읽어 들입니다.
-I (대문자 i) 저수준 디버거를 읽어 들이고 실행합니다.
-k Kernel 부트 이미지에 쓸 커널 파일. 기본 /unix.
-L MP 시스템의 잠금 계측(lock instrumentation)을 켭니다. MP 커널이 아니면 효과가 없습니다.
-l LVDev (소문자 L) 부트 이미지를 쓸 대상 부트 논리 볼륨.
-M { primary, standby, both } 갱신할 부트 포인터 테이블 항목. primary는 가장 최근에 쓴 항목, standby는 최근에 쓰지 않은 항목, both는 둘 다. 5.3은 -M { Norm, Serv, Both }로 부트 모드(일반, 서비스, 둘 다)를 정했습니다.
-p Proto RAM 디스크 파일 시스템에 쓸 프로토타입 파일.
-q 부트 이미지를 만드는 데 어느 파일 시스템에 얼마의 공간이 필요한지 알려 주며, 이미지는 만들지 않습니다.
-T Type 하드웨어 플랫폼 유형(참고 6). 지정한 유형용 부트 이미지를 만들며, 없으면 지금 시스템의 유형을 씁니다.
영어 원문
  • -d device — Specifies the boot device. This flag is optional for hard disk.

The following flags are action flags. One and only one flag must be specified.

  • -a — Creates complete boot image and device.
  • -v — Verify, but do not build boot image.

The following flags are option flags:

  • -b FileName — Uses specified file name as the boot image name. This flag is optional.
  • -D — Loads the low level debugger. This flag is optional.
  • -I (upper case i) — Loads and invokes the low-level debugger. This flag is optional.
  • -k Kernel — Uses the specified kernel file for the boot image. This flag is optional, and if not specified, /unix is the default.
  • -L — Enables lock instrumentation for MP systems. This flag has no effect on systems that are not using the MP kernel.
  • -l (lower case L) LVDev — Uses target boot logical volume for boot image. This flag is optional.
  • -M primary|standby|both — Specifies which boot pointer table entry to update. The options are: primary Specifies the table entry that was most recently used. standby Specifies the table entry that was not most recently used. both Specifies both boot pointer table entries.
  • -p Proto — Uses the specified prototype file for the RAM disk file system. This flag is optional.
  • -q — Determines how much disk space is required in which file system to create the boot image. Boot image is not created. This flag is optional.
  • -T Type — Specifies the hardware platform type (see note 6). This causes the bosboot command to create a boot image for the hardware platform type specified. If the type is not specified, the bosboot command creates a boot image whose hardware platform type matches that of the currently running machine. This flag is optional.

보안

접근 제어: root만 읽고 실행할 수 있습니다.

영어 원문

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

예제

명령 하는 일
bosboot -a 시스템이 부팅한 디스크의 기본 부트 논리 볼륨에 부트 이미지를 만듦
bosboot -ad /dev/rmt0 -b /tmp/tape.bootimage 테이프 장치용 부팅 가능 이미지 /tmp/tape.bootimage를 만듦
bosboot -ad /dev/ent0 이더넷 부팅용 부트 이미지 파일을 만듦
bosboot -ad /dev/tok -T chrp chrp 시스템에서 chrp 시스템용 토큰 링 부트 이미지를 만듦

자주 쓰는 형태:

bash
lsvg -M rootvg | grep hd5          # 부트 LV가 있는 디스크
bosboot -ad /dev/hdisk0
bosboot -ad /dev/hdisk1            # 미러 디스크도
bootlist -m normal hdisk0 hdisk1
영어 원문
  1. To create a boot image on the default boot logical volume on the fixed disk from which the system is booted, type: bosboot -a

  2. To create a bootable image called /tmp/tape.bootimage for a tape device, type: bosboot -ad /dev/rmt0 -b /tmp/tape.bootimage

  3. To create a boot image file for an Ethernet boot, type: bosboot -ad /dev/ent0

  4. To create a token ring boot image for a machine whose hardware platform type is chrp while you are running on a machine whose hardware platform type is chrp, type: bosboot -ad /dev/tok -T chrp

파일

파일 설명
/usr/sbin/mkboot 부트 생성 루틴
/usr/lib/boot/chrp.disk.proto 디스크 RAM 파일 시스템 템플릿
/usr/lib/boot/chrp.cd.proto CD-ROM RAM 파일 시스템 템플릿
/usr/lib/boot/chrp.tape.proto 테이프 RAM 파일 시스템 템플릿
/usr/lib/boot/network/chrp.ent.proto 이더넷 RAM 파일 시스템 템플릿
/usr/lib/boot/network/chrp.tok.proto 토큰 링 RAM 파일 시스템 템플릿
/usr/lib/boot/network/chrp.atm.proto ATM 파일 시스템 템플릿
/usr/lib/boot/network/chrp.fddi.proto FDDI RAM 파일 시스템 템플릿
영어 원문
  • /usr/sbin/mkboot — Specifies boot creation routine.
  • /usr/lib/boot/chrp.disk.proto — Specifies the disk RAM file system template.
  • /usr/lib/boot/chrp.cd.proto — Specifies the CD-ROM RAM file system template.
  • /usr/lib/boot/chrp.tape.proto — Specifies the tape RAM file system template.
  • /usr/lib/boot/network/chrp.ent.proto — Specifies the Ethernet RAM file system template.
  • /usr/lib/boot/network/chrp.tok.proto — Specifies the token-ring RAM file system template.
  • /usr/lib/boot/network/chrp.atm.proto — Specifies the ATM file system template.
  • /usr/lib/boot/network/chrp.fddi.proto — Specifies the FDDI RAM file system template.

Related information:

  • mkboot command
  • locktrace command
  • Boot process

리눅스(GNU)와 다른 점

리눅스에서 부트 이미지는 dracut·mkinitramfs로 만드는 initramfs와 GRUB 설정(grub2-mkconfig, grub2-install)이고, 부팅 순서는 UEFI의 efibootmgr로 바꿉니다. 종료와 재시작은 shutdown -h now, shutdown -r now, systemctl poweroff, systemctl reboot입니다. bosboot에 해당하는 것은 dracut -f(initramfs 다시 만들기)와 grub2-install /dev/sda(부트 로더 설치)입니다.