0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

IBM Cloud: stock imageからBIOS方式のRHELを作成する方法

0
Posted at

1. はじめに

Rackware RMMなどを使ってRHEL環境を移行する際に、移行元がBIOS方式で起動している場合は、移行先のRHELもBIOS方式で起動する必要があります。本稿では、VSI for VPCのRHELをBIOS方式で起動する方法を調査しました。

なお、以下の検証は、RHEL9.8(06/03/26版 Stock Image)をプロビジョニングした結果です。将来に渡り、この仕様が変わる可能性があります。
image.png

2. 結論

BIOSで起動させるためには、bx2(Cascade Lake: Generation 2)を使う。
※将来的に、BIOS/UEFIを利用者が明示的に選択できる機能が出てくるといいですね。

3. IBM CloudのStock ImageではRHELはどの方式で起動してくるか

以下は検証結果です。つまり、ストレージの種類を問わず、Profileがbx2(Cascade Lake: Generation 2)の場合はBIOSで起動してきますが、それ以外だとUEFIで起動してきます。

Profile Storage BIOS/UEFI
bxf-2x8 gen1 x 100GB UEFI
bxf-2x8 sdp x 100GB UEFI
bxf-2x8 sdp x 3000GB UEFI
bx2-2x8 gen1 x 100GB BIOS
bx2-2x8 sdp x 100GB BIOS
bx2-2x8 sdp x 3000GB BIOS
bx3d-2x10 gen1 x 100GB UEFI
bx3d-2x10 sdp x 100GB UEFI
bx3d-2x10 sdp x 3000GB UEFI
bx4-2x8 gen1 x 100GB UEFI
bx4-2x8 sdp x 100GB UEFI
bx4-2x8 sdp x 3000GB UEFI
bxf-2x8 + sdp profile x 3000GBの例。UEFIを利用。パーティション形式としてはgptが使われている。
[root@rhel9-bxf-sdp3000 ~]# [ -d /sys/firmware/efi ] && echo "UEFI" || echo "BIOS"
UEFI

[root@rhel9-bxf-sdp3000 ~]# efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0003,0001,0000,0002
Boot0000* UiApp
Boot0001* UEFI Misc Device
Boot0002* EFI Internal Shell
Boot0003* redhat

[root@rhel9-bxf-sdp3000 ~]# lsblk -p
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
/dev/vda    252:0    0  2.9T  0 disk
├─/dev/vda1 252:1    0    1M  0 part
├─/dev/vda2 252:2    0  200M  0 part /boot/efi
├─/dev/vda3 252:3    0    1G  0 part /boot
└─/dev/vda4 252:4    0  2.9T  0 part /
/dev/vdb    252:16   0  392K  0 disk
/dev/vdc    252:32   0   44K  0 disk

[root@rhel9-bxf-sdp3000 ~]# parted -l
Error: /dev/vdb: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 401kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Error: /dev/vdc: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vdc: 45.1kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Model: Virtio Block Device (virtblk)
Disk /dev/vda: 3221GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  212MB   210MB   fat16              boot, esp
 3      212MB   1286MB  1074MB  xfs                bls_boot
 4      1286MB  3221GB  3220GB  xfs
bx-2x8 + sdp profile x 3000GBの例。BIOSを利用。パーティション形式としてはgptが使われている。
[root@rhel9-bx2-sdp3000 ~]# [ -d /sys/firmware/efi ] && echo "UEFI" || echo "BIOS"
BIOS

[root@rhel9-bx2-sdp3000 ~]# efibootmgr
EFI variables are not supported on this system.


[root@rhel9-bx2-sdp3000 ~]# lsblk -p
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
/dev/vda    252:0    0  2.9T  0 disk
├─/dev/vda1 252:1    0    1M  0 part
├─/dev/vda2 252:2    0  200M  0 part /boot/efi
├─/dev/vda3 252:3    0    1G  0 part /boot
└─/dev/vda4 252:4    0  2.9T  0 part /
/dev/vdb    252:16   0  392K  0 disk
/dev/vdc    252:32   0   44K  0 disk

[root@rhel9-bx2-sdp3000 ~]# parted -l
Error: /dev/vdb: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 401kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Error: /dev/vdc: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vdc: 45.1kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Model: Virtio Block Device (virtblk)
Disk /dev/vda: 3221GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  212MB   210MB   fat16              boot, esp
 3      212MB   1286MB  1074MB  xfs                bls_boot
 4      1286MB  3221GB  3220GB  xfs

4: RHEL9 stock imageをBIOS方式でプロビジョニングし、その後にbxf-2x8にプロファイルを変更した場合 -> UEFI方式に変わってしまった。

  1. bx2-2x8 + sdp(3000GB)でstock imageからRHEL9をプロビジョニング。上記の通り、BIOS方式で起動してくる。
  2. サーバーを停止。
  3. サーバーをbxf-2x8にResize。 image.png
    image.png
    image.png
    image.png
  4. サーバーを起動。

結果、UEFI方式に変わってしまった。

[root@rhel9-bx2-sdp3000 ~]$ [ -d /sys/firmware/efi ] && echo "UEFI" || echo "BIOS"
UEFI

[root@rhel9-bx2-sdp3000 ~]$ efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0003,0001,0000,0002
Boot0000* UiApp
Boot0001* UEFI Misc Device
Boot0002* EFI Internal Shell
Boot0003* redhat

[root@rhel9-bx2-sdp3000 ~]$ lsblk -p
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
/dev/vda    252:0    0  2.9T  0 disk
├─/dev/vda1 252:1    0    1M  0 part
├─/dev/vda2 252:2    0  200M  0 part /boot/efi
├─/dev/vda3 252:3    0    1G  0 part /boot
└─/dev/vda4 252:4    0  2.9T  0 part /
/dev/vdb    252:16   0  392K  0 disk
/dev/vdc    252:32   0   44K  0 disk

5: Rackware RMMでBIOSで稼働していた環境を、bx2-2x8 + sdp(3000GB)のBIOS環境に移行したあと、bxf-2x8にプロファイルを変更した場合 -> BIOSのままだった。

もしかしたら、パーティションテーブルがmsdosであり、gptになっていなかったのが原因かもしれません。

Rackwareでの移行直後
[root@syasuda-rhel9-classic3 ~]# [ -d /sys/firmware/efi ] && echo "UEFI" || echo "BIOS"
BIOS

[root@syasuda-rhel9-classic3 ~]# efibootmgr
-bash: efibootmgr: command not found

[root@syasuda-rhel9-classic3 ~]# lsblk -p
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
/dev/vda    252:0    0   30G  0 disk
├─/dev/vda1 252:1    0    1G  0 part /boot
├─/dev/vda2 252:2    0   24G  0 part /
└─/dev/vda3 252:3    0    2G  0 part [SWAP]
/dev/vdb    252:16   0  392K  0 disk
/dev/vdc    252:32   0   44K  0 disk

[root@syasuda-rhel9-classic3 ~]# parted -l
Error: /dev/vdb: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 401kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Error: /dev/vdc: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vdc: 45.1kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Model: Virtio Block Device (virtblk)
Disk /dev/vda: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  1075MB  1074MB  primary  ext4
 2      1075MB  26.8GB  25.8GB  primary  ext4
 3      26.8GB  29.0GB  2147MB  primary  linux-swap(v1)  swap

この後、プロファイルを変更する。

  1. サーバーの停止。
  2. サーバーをbxf-2x8にResize。 image.png
    image.png
    image.png
    image.png
  3. サーバーの起動

以下の通り、BIOSのままだった。

[root@syasuda-rhel9-classic3 ~]# [ -d /sys/firmware/efi ] && echo "UEFI" || echo "BIOS"
BIOS

[root@syasuda-rhel9-classic3 ~]# efibootmgr
-bash: efibootmgr: command not found

[root@syasuda-rhel9-classic3 ~]# lsblk -p
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
/dev/vda    252:0    0   30G  0 disk
├─/dev/vda1 252:1    0    1G  0 part /boot
├─/dev/vda2 252:2    0   24G  0 part /
└─/dev/vda3 252:3    0    2G  0 part
/dev/vdb    252:16   0  392K  0 disk
/dev/vdc    252:32   0   44K  0 disk [SWAP]

[root@syasuda-rhel9-classic3 ~]# parted -l
Error: /dev/vdb: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 401kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Error: /dev/vdc: unrecognised disk label
Model: Virtio Block Device (virtblk)
Disk /dev/vdc: 45.1kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Model: Virtio Block Device (virtblk)
Disk /dev/vda: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  1075MB  1074MB  primary  ext4
 2      1075MB  26.8GB  25.8GB  primary  ext4
 3      26.8GB  29.0GB  2147MB  primary  linux-swap(v1)  swap
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?