bootlist 명령어 (AIX 5.3·6.1)

핵심 정리

  • 부팅할 장치 순서를 NVRAM에 정합니다. 확인은 bootlist -m normal -o, 바꾸기는 bootlist -m normal hdisk0 hdisk1.
  • rootvg를 미러한 뒤에는 두 디스크를 모두 넣어야 한 디스크가 고장 나도 부팅합니다. 디스크를 교체하거나 migratepv로 부트 LV를 옮겼으면 bosboot 뒤 다시 정합니다.
  • 모드는 normal(일반 부팅), service(유지 보수 부팅), both(둘 다), prevboot(직전 부팅 장치, -i로 무효화만 가능)입니다.
  • 한 디스크에 AIX가 여럿이면 blv=hd5처럼 부트 LV를, 다중 경로면 (6.1) pathid=0,1을 지정합니다.
  • 실행 중에 전원을 끄거나 재설정하면 목록이 깨질 수 있고, 부팅할 수 없는 장치만 남으면 다음 재부팅이 실패합니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (6.1에서 pathid, vlan_tag, vlan_pri 속성이 더해짐)
원문 IBM Commands Reference — 5.3 Volume 1, 6.1 Volume 1
파일 /usr/bin/bootlist
관련 명령어 bosboot, nvram, lsvg, ipl_varyon, shutdown

목적

시스템이 쓸 수 있는 부트 장치 목록을 보여 주고 바꿉니다.

영어 원문

Displays and alters the list of boot devices available to the system.

구문

text
bootlist [ { -m Mode } [ -r ] [ -o ] [ [ -i ] [ -V ] [ -F ] | [ [ -f File ] [ Device [ Attr=Value ... ] ... ] ] ] [ -v ]

설명

bootlist 명령은 시스템이 부팅할 수 있는 장치 목록을 보여 주고 바꿉니다. 시스템은 부팅할 때 목록의 장치를 차례로 살펴 부트 이미지가 있는 첫 장치에서 부팅하려 합니다. 다음을 바꿀 수 있습니다.

  • 일반(normal) 부트 목록: 일반 모드로 부팅할 때 쓸 장치.
  • 서비스(service) 부트 목록: 서비스 모드로 부팅할 때 쓸 장치. 서비스 모드로 부팅하는 방법은 하드웨어 플랫폼마다 다릅니다. 키 스위치를 Service로 돌리거나, 부팅 중에 특정 기능 키를 누르는 등의 방법이 있습니다.
  • 직전 부트 장치 항목: 시스템이 마지막으로 부팅한 장치. 일부 플랫폼은 다른 목록을 보기 전에 이 장치로 먼저 부팅하려 합니다.

부트 목록 지원은 플랫폼마다 다릅니다. 플랫폼이 지원하는 목록만 보거나 바꿀 수 있으며, 어떤 목록도 지원하지 않는 플랫폼도 있을 수 있습니다.

부트 장치를 찾을 때 목록의 첫 장치를 골라 부팅할 수 있는지 보고, 부트 파일 시스템이 없으면 다음 장치로 넘어갑니다. 그래서 장치 순서가 아주 중요합니다.

부트 후보로 특정 장치뿐 아니라 일반 장치 유형도 지정할 수 있습니다. 장치 이름은 명령줄이나 파일에 적으며, 부트 목록에는 적은 순서대로 들어갑니다.

장치를 파일에 적어 두면 참고하거나 나중에 고칠 수 있는 기록이 됩니다. -f를 쓰면 File의 장치 목록을 파일에 적힌 순서대로 부트 목록에 넣습니다.

주의: 부트 장치는 신중하게 지정해야 합니다. 목록의 장치가 부팅할 수 없게 되면 다음 재부팅이 실패할 수 있습니다. bootlist가 실행되는 동안 전원을 끄거나 재설정하면 안 됩니다. 중요한 시점에 재설정되거나 전원이 나가면 부트 목록이 깨지거나 사라질 수 있습니다.

보거나 바꿀 목록은 -m으로 고르며, service, normal, both, prevboot 가운데 하나입니다. both면 일반·서비스 목록을 함께 보여 주거나, 바꿀 때는 같은 장치 목록으로 정합니다. prevboot는 -i(무효화)만 할 수 있습니다. -i는 -m으로 지정한 부트 목록을 무효화합니다.

-o로 지금 부트 목록의 장치를 한 줄에 하나씩 보여 줍니다. 목록의 장치가 시스템에 없으면 이름 대신 -가 나옵니다. 출력은 파일로 저장해 -f의 입력으로 쓸 수 있는 형식이라, 잠시 바꾼 부트 목록을 되돌릴 때 유용합니다.

참고: 핫 플러그 어댑터를 시스템에 더하면 그 어댑터와 하위 장치를 바로 부트 장치로 지정하지 못할 수 있습니다. 모든 부트 후보를 운영 체제가 알게 하려면 재부팅해야 할 수 있습니다.

디스크 장치를 지정할 때는 attribute=value로 정보를 더해야 할 수 있습니다. 대상 디스크에 AIX가 여러 개 설치되어 있거나, 부트 장치의 경로 ID를 지정해야 할 때입니다. AIX가 여러 개면 blv 속성으로 부트 목록에 넣을 부트 논리 볼륨을 지정합니다.

blv는 언제든 쓸 수 있지만 AIX가 여러 개일 때만 꼭 필요합니다. -o로 보여 줄 때는 디스크에 AIX가 하나여도 늘 blv를 함께 보여 줍니다.

(6.1) 경로 ID는 pathid 속성으로 지정합니다. 쉼표로 구분해 경로를 여러 개 줄 수 있으며, -o로 보여 줄 때 경로 ID가 있는 디스크에는 pathid가 함께 나옵니다.

장치 선택

명령줄이나 파일의 장치 이름은 두 가지 형식 가운데 하나입니다.

  • 장치 논리 이름으로 특정 장치를 지정합니다.
  • 키워드로 일반·특수 장치 유형을 지정합니다.
일반 장치 키워드 뜻
fd 표준 I/O에 연결한 디스켓 드라이브
scdisk SCSI 연결 디스크(직렬 링크 디스크 포함)
badisk 직접 버스 연결 디스크
cd SCSI 연결 CD-ROM
rmt SCSI 연결 테이프 장치
ent 이더넷 어댑터
tok 토큰 링 어댑터
fddi FDDI 어댑터

참고: 일반 장치 키워드를 지원하지 않는 플랫폼도 있으며, 그런 플랫폼에서 쓰면 갱신을 거부하고 실패합니다.

특정 장치를 넣을 때는 시스템 관리 명령에서 쓰는 장치 논리 이름을 줍니다. 논리 이름은 접두어와 접미어(보통 장치를 가리키는 번호)로 이루어집니다. 장치는 Available 상태여야 하며, 아니면 갱신을 거부하고 실패합니다.

논리 이름 뜻
fdxx 디스켓 드라이브
hdiskxx 물리 볼륨
cdxx SCSI CD-ROM
rmtxx 자기 테이프
entxx 이더넷 어댑터
tokxx 토큰 링 어댑터
fddixx FDDI 어댑터

속성 선택

속성은 사용자가 명령줄에서 주는 장치의 추가 정보입니다. 특정 장치에 대한 정보이므로 일반 장치에는 속성이 없습니다. 속성은 명령줄에서 바로 앞의 장치에 적용되므로 장치 사이사이에 섞어 쓸 수 있습니다. 지금은 네트워크 장치만 속성이 있습니다.

속성 뜻
bserver BOOTP 서버의 IP 주소
gateway 게이트웨이의 IP 주소
client 클라이언트의 IP 주소
speed 네트워크 어댑터 속도
duplex 네트워크 어댑터 모드
vlan_tag (6.1) VLAN 식별 값(0~4094)
vlan_pri (6.1) VLAN 우선순위 값(0~7)
filename BOOTP 서버에서 TFTP로 받아 올 파일 이름

속성은 다음과 같이 조합합니다.

  • hardware 속성은 혼자 쓸 수 없고 bserver나 gateway와 함께 줘야 합니다. 함께 주면 각각 서버나 게이트웨이에 적용되고, 둘 다 주면 게이트웨이에 적용됩니다.
  • bserver는 혼자, 또는 hardware나 gateway와 함께 쓸 수 있습니다.
  • gateway를 주면 bserver와 client도 줘야 합니다.
  • client는 gateway, bserver와 함께만 쓸 수 있습니다.
  • (6.1) vlan_pri는 vlan_tag와 함께 줘야 하고, vlan_tag는 혼자 쓸 수 있습니다.

일부 속성은 지원하지 않는 플랫폼이 있고, 플랫폼별 제한이 더 있을 수 있습니다.

속성은 attr=value 형식으로, = 앞뒤에 공백 없이 적습니다.

-f 파일 형식

파일에는 공백으로 구분한 장치 이름(hdisk0 hdisk1 cd1)을 적거나 한 줄에 하나씩 적습니다.

오류 처리

오류로 끝나면 장치 목록은 바뀌지 않습니다. 가능한 오류는 다음과 같습니다.

  • 플랫폼이 지원하지 않는 부트 목록을 보거나 바꾸려 하면 모드를 지원하지 않는다며 실패합니다.
  • 잘못된 키워드, 잘못된 플래그, 모르는 장치를 주면 오류 메시지와 함께 실패합니다.
  • 지정한 장치가 Available 상태가 아니면 오류 메시지와 함께 실패합니다.

시스템이 지원하는 것보다 많은 장치를 넣으면 지원하는 개수만큼만 넣습니다.

영어 원문

The bootlist command allows the user to display and alter the list of possible boot devices from which the system may be booted. When the system is booted, it will scan the devices in the list and attempt to boot from the first device it finds containing a boot image. This command supports the updating of the following:

  • Normal boot list. The normal list designates possible boot devices for when the system is booted in normal mode.

  • Service boot list. The service list designates possible boot devices for when the system is booted in service mode. How a system is booted in service mode is hardware-platform dependent. It may require a key switch to be turned to the Service position, a particular function key to be pressed during the boot process, or some other mechanism, as defined for the particular hardware platform.

  • Previous boot device entry. This entry designates the last device from which the system booted. Some hardware platforms may attempt to boot from the previous boot device before looking for a boot device in one of the other lists.

Support of these boot lists may vary from platform to platform. A boot list can be displayed or altered only if the platform supports the specified boot list. It may even be the case that a particular hardware platform does not support any of the boot lists.

When searching for a boot device, the system selects the first device in the list and determines if it is bootable. If no boot file system is detected on the first device, the system moves on to the next device in the list. As a result, the ordering of devices in the device list is extremely important.

The bootlist command supports the specification of generic device types as well as specific devices for boot candidates. Possible device names are listed either on the command line or in a file. Devices in the boot device list occur in the same order as devices listed on the invocation of this command.

The devices to be entered into the boot list may be specified in a file. This makes an alterable record of the boot devices available for reference or future update. When the -f flag is used, the list of devices is taken from the file specified by the file variable. Devices from this list are then placed in the boot list in the order found in the file.

Attention: Care must be taken in specifying the possible boot devices. A future reboot may fail if the devices specified in the device list become unbootable. The system must not be powered off or reset during the operation of the bootlist command. If the system is reset, or if power fails at a critical point in the execution of this command, the boot list may be corrupted or lost.

The selection of the boot list to display or alter is made with the -m mode option, where the mode variable is one of the keywords: service, normal, both, or prevboot. If the both keyword is specified, then both the normal boot list and the service boot list will be displayed, or if being altered, will be set to the same list of devices. If the prevboot keyword is specified, the only alteration allowed is with the -i (invalidate) flag . The -i flag invalidates the boot list specified by the -m flag.

The devices currently in the boot list may be displayed by using the -o flag. The list of devices that make up the specified boot list will be displayed, one device per line. If a device specified in the boot list is no longer present on the system, a '-' is displayed instead of a name. The output is in a form that can be captured in a file and used as input to the bootlist command with the -f flag. This may be useful for restoring a boot list after making a temporary change.

Note: When you add a hot plug adapter to the system, that adapter and its child devices might not be available for specification as a boot device when you use the bootlist command. You may be required to reboot your system to make all potential boot devices known to the operating system.

When you specify a disk device, additional information might need to be added to the disk by using an attribute=value pair. This extra information is required when the target disk has multiple instances of the AIX operating system installed on it, or it is required to indicate a path ID when you specify the boot device. When the target disk has multiple instances of the AIX operating system installed on it, identify the boot logical volume on the target disk that is to be included in the boot list by using the blv attribute.

The blv attribute can be used in all cases, but it is only required when the target disk has multiple instances of AIX installed. When bootlist displays information with the -o flag, the blv attribute is always included for each disk, even if there is only one instance of AIX on that disk.

When you specify a path ID, identify the path ID of the target disk by using the pathid attribute. You can specify one or more path IDs with the pathid attribute by entering a comma-separated list of the required paths to be added to the boot list. When the bootlist command displays information with the -o flag, the pathid attribute is included for each disk that has an associated path ID.

Device Choices

The device name specified on the command line (or in a file) can occur in one of two different forms:

  • It can indicate a specific device by its device logical name.

  • It can indicate a generic or special device type by keyword. The following generic device keywords are supported:

  • fd — Any standard I/O-attached diskette drive

  • scdisk — Any SCSI-attached disk (including serial-link disk drives)

  • badisk — Any direct bus-attached disk

  • cd — Any SCSI-attached CD-ROM

  • rmt — Any SCSI-attached tape device

  • ent — Any Ethernet adapter

  • tok — Any Token-Ring adapter

  • fddi — Any Fiber Distributed Data Interface adapter

  • Note: Some hardware platforms do not support generic device keywords. If a generic device

keyword is specified on such a platform, the update to the boot list is rejected and this command fails.

When a specific device is to be included in the device list, the device's logical name (used with system management commands) must be specified. This logical name is made up of a prefix and a suffix. The suffix is generally a number and designates the specific device. The specified device must be in the Available state. If it is not, the update to the device list is rejected and this command fails. The following devices and their associated logical names are supported (where the bold type is the prefix and the xx variable is the device-specific suffix):

  • fdxx — Diskette-drive device logical names
  • hdiskxx — Physical-volume device logical names
  • cdxx — SCSI CD-ROM device logical names
  • rmtxx — Magnetic-tape device logical names
  • entxx — Ethernet-adapter logical names
  • tokxx — Token-ring adapter logical names
  • fddixx — Fiber Distributed Data Interface adapter logical names
  • Attribute Choices

Attributes are extra pieces of information about a device that the user supplies on the command line. Since this information is specific to a particular device, generic devices do not have attributes. Attributes

apply to the device that immediately precedes them on the command line, which allows attributes to be interspersed among devices on the command line. Currently, only network devices have attributes. These are:

  • bserver — The IP address of the BOOTP server
  • gateway — The IP address of the gateway
  • client — The IP address of the client
  • speed — Network adapter speed
  • duplex — The mode of the network adapter
  • vlan_tag — The virtual local area network (VLAN) identification value. Valid values are 0 - 4094.
  • vlan_pri — The VLAN priority value. Valid values are 0 - 7.
  • filename — The name of the file that is loaded by Trivial File Transfer Protocol (TFTP) from the BOOTP server

These attributes can be combined in the following ways:

  • The hardware attribute cannot be specified alone; it must be specified with the bserver or gateway attribute. When specified with bserver or gateway, it applies to the server or gateway, respectively; when both bserver and gateway are specified, hardware will apply to gateway.

  • The bserver attribute can be specified alone, with hardware, and/or gateway.

  • If the gateway attribute is specified, bserver and client must also be specified.

  • The client attribute can only be specified with gateway and bserver.

  • The vlan_pri attribute must be specified with the vlan_tag attribute. The vlan_tag attribute can be specified alone.

Some of these attributes may not be supported on some hardware platforms. Additional hardware platform restrictions may apply.

The syntax for specifying an attribute is attr=value, where attr is the attribute name, value is the value, and there are no spaces before or after the =.

File Format When Using the -f Flag

The file specified by the file variable should contain device names separated by white space: hdisk0 hdisk1 cd1

or one device per line: hdisk0 hdisk1 cd1

Error Handling

If this command returns with an error, the device lists are not altered. The following device list errors are possible:

  • If the user attempts to display or alter a boot list that is not supported by the hardware platform, the command fails, indicating the mode is not supported.

  • If an invalid keyword, invalid flag, or an unknown device is specified, the command fails with the appropriate error message.

  • If a specified device is not in the Available state, the command fails with the appropriate error message.

If you add too many devices to the boot list, the command adds only the number of devices to the boot list that the system supports.

플래그

플래그 설명
Device 부트 목록에 넣을 특정 장치나 일반 장치의 이름.
-f File 장치 정보를 지정한 파일에서 읽습니다.
-F speed, duplex 속성을 검증할 수 없어도 부트 목록을 바꿉니다.
-i -m으로 지정한 장치 목록을 무효화합니다.
-m Mode 보거나 바꿀 부트 목록. normal, service, both, prevboot.
-o 지정한 변경을 한 뒤 부트 목록을 장치 이름 목록으로 보여 줍니다.
-r 지정한 변경을 한 뒤 부트 목록을 보여 줍니다. 출력은 플랫폼에 따라 다르며, 16진수 덤프나 장치 이름 목록일 수 있습니다(보통 문제 진단용).
-V speed, duplex 속성을 검증만 하고 부트 목록은 바꾸지 않습니다.
-v 자세한 출력을 보여 줍니다. 문제 진단용입니다.
영어 원문
  • Device — Provides the names of the specific or generic devices to include in the boot list.
  • -f File — Indicates that the device information is to be read from the specified file name.
  • -F — Indicates that the boot list must be modified even if the validation of the speed and duplex attributes, if specified, is not possible.
  • -i — Indicates that the device list specified by the -m flag should be invalidated.
  • -m Mode — Specifies which boot list to display or alter. Possible values for the mode variable are normal, service, both, or prevboot.
  • -o — Indicates that the specified boot list is to be displayed after any specified alteration is performed. The output is a list of device names.
  • -r — Indicates that the specified boot list is to be displayed after any specified alteration is performed. The output is hardware-platform dependent. It may be a hexadecimal dump of the boot list or a list of device names. (This is normally used for problem determination.)
  • -V — Indicates that the speed and duplex attributes, if specified, are to be verified only. The boot list is not modified.
  • -v — Displays verbose output. This flag is for problem determination only.

보안

특권 제어: root와 security 그룹 구성원만 이 명령의 실행(x) 권한을 가져야 합니다.

감사 이벤트: NVRAM_Config(정보: 파일 이름)

(6.1) RBAC와 Trusted AIX 사용자: 이 명령은 특권 작업을 할 수 있으며 특권 사용자만 할 수 있습니다. 권한과 특권은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다.

영어 원문

Privilege Control

Only the root user and members of the security group should have execute (x) access to this command.

Auditing Events

Event Information NVRAM_Config File name

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

예제

명령 하는 일
bootlist -m service -i 서비스 모드 부트 목록을 무효화
bootlist -m normal hdisk0 hdisk1 rmt0 fd 명령줄의 장치로 일반 모드 부트 목록을 만듦
bootlist -m normal -f /bootlist.norm 파일 /bootlist.norm의 장치로 일반 모드 부트 목록을 만듦. 파일은 위 형식을 따라야 함
bootlist -m prevboot -i 직전 부트 장치 항목을 무효화
bootlist -m normal tok0 슬롯 2의 토큰 링 장치로 부팅
bootlist -m normal hdisk0 blv=hd5 일반 부팅에 hdisk0의 부트 LV hd5를 지정
bootlist -m normal hdisk0 hdisk1 blv=mb_hd5 cd0 hdisk0의 유일한 부트 LV나 hdisk1의 부트 LV mb_hd5, 그다음 cd0에서 부팅
bootlist -m normal hdisk0 pathid=0 (6.1) 일반 부팅에 hdisk0의 경로 ID 0을 지정
bootlist -m normal hdisk0 pathid=0,2 (6.1) hdisk0의 경로 ID 0과 2를 지정. bootlist -m normal hdisk0 pathid=0 hdisk0 pathid=2와 같음

이더넷 게이트웨이를 거쳐 부팅을 시도하고, 안 되면 다른 장치를 시도합니다.

bash
bootlist -m normal ent0 gateway=129.35.21.1 bserver=129.12.2.10 \
    client=129.35.9.23 hdisk0 rmt0 tok0 bserver=129.35.10.19 hdisk1

위에서 정한 목록을 봅니다.

text
$ bootlist -m normal -o
hdisk0 blv=hd5
$ bootlist -m normal -o
hdisk0
hdisk1 blv=mb_hd5
cd0

자주 쓰는 형태(미러 rootvg):

bash
bosboot -ad /dev/hdisk0; bosboot -ad /dev/hdisk1
bootlist -m normal hdisk0 hdisk1
bootlist -m normal -o
영어 원문
  1. To invalidate the Service mode boot list, enter:
bootlist -m service -i
  1. To make a boot list for Normal mode with devices listed on the command line, enter:
bootlist -m normal hdisk0 hdisk1 rmt0 fd
  1. To make a boot list for Normal mode with a device list from a file, enter:
bootlist -m normal -f /bootlist.norm

where bootlist.norm is a file containing device names to be placed in the boot list for Normal mode. The device names in the bootlist.norm file must comply with the described format.

  1. To invalidate the previous boot device entry, enter:
bootlist -m prevboot -i
  1. To boot from a Token-Ring device in slot 2, enter:
bootlist -m normal tok0
  1. To attempt to boot through a gateway using Ethernet, and then try other devices, enter:
bootlist -m normal ent0 gateway=129.35.21.1 bserver=129.12.2.10
\ client=129.35.9.23 hdisk0 rmt0 tok0 bserver=129.35.10.19
hdisk1
  1. To specify boot logical volume hd5 on disk hdisk0 for a normal boot, type:
bootlist -m normal hdisk0 blv=hd5
  1. To view the boot list set in the preceding example, type:
bootlist -m normal -o
hdisk0 blv=hd5
  1. To specify booting in normal mode from the only boot logical volume on hdisk0, or the mb_hd5 boot logical volume on hdisk1, type:
bootlist -m normal hdisk0 hdisk1 blv=mb_hd5 cd0
  1. To view the boot list set in the preceding example, type:
bootlist -m normal -o
hdisk0
hdisk1 blv=mb_hd5
cd0
  1. To specify path ID 0 on disk hdisk0 for a normal boot operation, type:
bootlist -m normal hdisk0 pathid=0
  1. To specify path ID 0 and path ID 2 on disk hdisk0 for a normal boot operation, type one of the following commands: •
bootlist -m normal hdisk0 pathid=0,2

•

bootlist -m normal hdisk0 pathid=0 hdisk0 pathid=2

Related information:

  • nvram command
  • Device Configuration Subsystem Programming Introduction
  • List of Device Configuration Commands

리눅스(GNU)와 다른 점

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