Create Boot Configuration#

There are a few ways to create a boot configuration using the ClusterWareAI ™ command line tools or you can create a boot configuration via the Boot Configurations Page in the ClusterWareAI GUI.

Create Boot Configuration with Cloned Image#

Clone an existing image and use the cw-add-boot-config tool to create a new boot configuration that references the new image. Cloning an existing tested and functional image is recommended because you can make changes to the cloned image without impacting a production cluster.

For example, clone the DefaultImage and add it to a new boot configuration:

cw-imagectl -i DefaultImage clone name=NewImage
cw-add-boot-config --image NewImage --boot-config NewBoot

At this point you can make changes to the cloned image or the new boot configuration. For example, to update SELinux enforcing on the boot configuration:

cw-bootctl -i NewBoot update enforcing=1

Create Boot Configuration with Cloned Image and Boot Configuration#

Clone both the DefaultImage and DefaultBoot, update the image, and update the boot configuration by rebuilding the initramfs.

Cloning existing images and boot configurations is common in a live production cluster where you have a working boot configuration, but may need to update software or kernel versions in the image. It is recommended to clone the live image and boot configuration so that you can continue to use the original versions if something does not work as expected.

For example, to update a kernel version in an image and use the updated image in a new boot configuration:

  1. Clone the DefaultImage image:

    cw-imagectl -i DefaultImage clone name=NewImageKernel
    
  2. Clone the DefaultBoot boot configuration and add the new image to the new boot configuration:

    cw-bootctl -i DefaultBoot clone name=NewBootKernel image=NewImageKernel
    
  3. Update the kernel version in the image:

    cw-modimg -i NewImageKernel --chroot --upload --overwrite
    

    See Updating the Kernel in an Image for additional details and options.

  4. Update the boot configuration to use the latest kernel:

    cw-mkramfs --update NewBootKernel
    

    The cw-mkramfs tool finds the image that NewBootKernel references (NewImageKernel in this example), lists the kernels, and updates the boot configuration with the latest kernel and the initramfs that corresponds to that kernel.

    Tip

    If you want to use a non-latest kernel version, use the --kver argument and specify the kernel version.

Create Boot Configuration with ISO#

Create a boot configuration with a deployable image using a provided ISO as the source material.

For example, to create a boot configuration with an image based on a Rocky 10 ISO:

cw-bootctl create iso=@Rocky-10.1-x86_64-minimal.iso name=Rocky-10.1-iso

The command takes several minutes to run, depending on your network connection speed and hardware. While running, the command:

  1. Creates a repo that contains the provided ISO.

  2. Creates a distro that references the new repo.

  3. Runs cw-modimg create using the distro as input.

  4. Runs cw-mkramfs to create the final image and initramfs for the boot configuration.

Tip

If you already have a repo or distro with your ISO file, you can provide those as input instead of the ISO. The ClusterWareAI software picks up the creation command at the appropriate step.

Create Boot Configuration with Kickstart#

In addition to providing content for distros, repos based on RHEL-family ISO images can also be used to kickstart locally installed compute nodes. To prepare a kickstart configuration, create a boot configuration that references the repo directly:

cw-bootctl create name=Rocky8boot repo=Rocky8repo kickstart=basic.ks

The resulting boot configuration automatically locates the kernel and initramfs on the ISO and default to using no image:

[cwadmin@virthead]$ cw-bootctl -i Rocky8boot ls -l
Boot Configurations
  Rocky8boot
    image: none
    initramfs: repo:images/pxeboot/initrd.img
    kernel: repo:images/pxeboot/vmlinuz
    kickstart: basic.ks
    last_modified: 2023-01-31 23:27:08 UTC (0:00:13 ago)
    name: Rocky8boot
    release: 4.18.0-425.3.1.el8.x86_64
    repo: Rocky8repo

Initially this boot configuration can be used to boot a disked node with the live boot style assigned either by the boot configuration boot_style field or a _boot_style node attribute. When live booting a node, the cluster administrator will need to access the node's console to proceed through the operating system installation steps. To use the serial-over-lan BMC feature, the administrator may need to provide an appropriate console= cmdline. For example:

cw-bootctl -i Rocky8boot update cmdline=console=ttyS0,115200

The specific details of the console and other command line arguments depend on the target hardware and are beyond the scope of this document. Once the installation process is complete, the compute node should use a next boot style in order to skip the PXE boot process and instead boot from the next boot device. Cluster administrators are encouraged to configure the BIOS of locally installed compute nodes to attempt PXE boot first and then boot from the local disk so that the next boot style works as intended.

See Using Kickstart for additional details.