2 Installation

Install the OCK Image Builder utility on an Oracle Linux 9 host.

OCK Image Builder must be installed on Oracle Linux 9, from the OCK Image Builder GitHub repository. The prerequisites are Podman, and the qemu-img utility.

  1. Install Podman.
    sudo dnf install container-tools
    For more information on installing and using Podman, see the Oracle Linux: Podman User's Guide.
  2. Install qemu-img.

    The qemu-img utility is used to manipulate Qcow2 images. Install qemu-ing from the ol9_kvm_utils repository.

    First, enable the repository:

    sudo dnf config-manager --enable ol9_kvm_utils

    Then, install qemu-img:

    sudo dnf install qemu-img
  3. Install Git.

    Install the Git client:

    sudo dnf install git 
  4. Install OCK Image Builder.

    Clone the OCK Image Builder GitHub repository:

    git clone https://github.com/oracle-cne/ock-forge
  5. Install the OCK Configuration files:

    Clone the OCK Configuration GitHub repository. The examples in this guide assume that the configuration files are in the configs directory within the OCK Image Builder installation, so perform the clone from within the ock-forge directory.

    cd ock-forge
    git clone https://github.com/oracle-cne/ock         
  6. Load the nbd kernel module.

    OCK Image Builder can generate a bootable OCK image in Qcow2 format, as a raw disk image, or directly to a physical disk. The ock-forge utility mounts Qcow2 images on a Network Block Device (NBD). Raw disk images are mounted either to a physical disk, or a loopback device, depending on the options specified.

    So that OCK Image Builder can mount Qcow2 images to an NBD, load the nbd kernel module:

    sudo modprobe nbd max_part=max_partitions

    Change max_partitions to the maximum number of partitions the resulting Qcow2 image requires. The default is 8, which is enough for most images.