Community Tools

Version: 22.03 LTS SP4

oemaker User Guide

Overview

This document describes how to install and use oemaker, the openEuler image creation tool.

Software and Hardware Requirements

The hardware and software requirements of the computer to create an ISO file using oemaker are as follows:

  • CPU architecture: AArch64 or X86_64
  • OS: openEuler 22.03 LTS SP4
  • 60 GB or more drive space for running oemaker and storing ISO images.

Installation

The following uses openEuler 22.03 LTS SP4 on the AArch64 architecture as an example to describe how to install oemaker.

  1. Ensure that openEuler 22.03 LTS SP4 has been installed on the computer.

    shell
     cat /etc/openEuler-release 
     openEuler release 22.03 LTS SP4
  2. Download the ISO image (must be an everything image) of the corresponding architecture and save it to any directory (it is recommended that the available space of the directory be greater than 20 GB). In this example, the ISO image is saved to the /home directory.

    AArch64 image download:

    https://repo.openeuler.org/openEuler-22.03-LTS-SP4/ISO/aarch64/openEuler-22.03-LTS-SP4-everything-aarch64-dvd.iso

  3. Create a /etc/yum.repos.d/local.repo file to configure the Yum source. The following is an example of the configuration file. baseurl is the directory for mounting the ISO image.

    shell
    [local]
    name=local
    baseurl=file:///home/oemaker_iso
    gpgcheck=0
    enabled=1
  4. Run the following command as the root user to mount the image to the /home/oemaker_iso directory (ensure that the mount directory is the same as baseurl configured in the repo file) as the Yum repository:

    shell
    sudo mount -o loop /home/openEuler-22.03-LTS-SP4-everything-aarch64-dvd.iso /home/oemaker_iso
  5. Make the Yum repository take effect.

    shell
    yum clean all
    yum makecache
  6. Install oemaker as the root user.

    shell
    sudo yum install -y oemaker
  7. Run the following command as the root user to verify that the tool has been installed successfully:

    shell
     sudo oemaker -h
     Usage: oemaker [-h] [-t Type] [-p Product] [-v Version] [-r RELEASE] [-s REPOSITORY]
     
     optional arguments:
         -t Type        ISO Type, include standard debug source everything everything_debug everything_src livecd and netinst
         -p Product     Product Name, such as: openEuler
         -v Version     version identifier
         -r RELEASE     release information
         -s REPOSITORY  source dnf repository address link(may be listed multiple times)
         -h             show the help message and exit

Image Creation

This section describes how to use oemaker to create an openEuler image.

Command Description

Syntax

Run the oemaker command to use the tool. The command syntax is as follows:

shell
oemaker [ --help | -h ] [ -t <ISO type> ] [ -p <Product name> ] [ -v <Version number> ] [-r <Release information> ] [-s <Source dnf repository address link>]

Command Options

OptionMandatoryDescription
--help \ -hNoQuery the help information the command.
-t &lt;ISO type&gt;YesSpecify the image type. The value can be standard, debug, source, everything, everything_debug, everything_src, livecd, or netinst.
-p &lt;Product name&gt;NoProduct name.
-v &lt;Version number&gt;NoProduct version.
-r &lt;Release information&gt;NoRelease information.
-s &lt;Source dnf repository address link&gt;NoSoftware repository.

Software Repository

The RPM packages of the new image can be:

  • Packages of the original ISO image: The RPM packages to be installed are specified in the configuration file rpmlist. The configuration format is software_package_name. For example, kernel.

  • Extra packages: Extra packages can be added to /home/oemaker_iso and run the createrepo command based on normal.xml of the original image to regenerate the repository.

    **NOTE:**

    • During image creation, if an RPM package specified in the configuration file cannot be found, the RPM package will not be added to the image.
    • If the dependency of the RPM package is incorrect, an error may be reported during image creation.

Operation Guide

The following uses the livecd image as an example.

  1. Modify the configuration file /opt/oemaker/config/aarch64/livecd/rpmlist to specify the RPM software packages to be installed.

    shell
     sudo vi /opt/oemaker/config/aarch64/livecd/rpmlist
  2. Ensure that the space of the temporary directory for running oemaker is greater than 60 GB.

    shell
     df -h
     Filesystem                            Size  Used Avail Use% Mounted on
     devtmpfs                              1.2G     0  1.2G   0% /dev
     tmpfs                                 1.5G     0  1.5G   0% /dev/shm
     tmpfs                                 1.5G   23M  1.5G   2% /run
     tmpfs                                 1.5G     0  1.5G   0% /sys/fs/cgroup
     /dev/mapper/openeuler_openeuler-root   69G  2.8G   63G   5% /
     /dev/sda2                             976M  114M  796M  13% /boot
     /dev/mapper/openeuler_openeuler-home   61G   21G   38G  35% /home
  3. Perform the creation.

    Run the following commands:

    shell
    cd /opt/oemaker
    ./oemaker.sh -t livecd -p openEuler -v 22.03-LTS-SP4 -r '' -s "file:///home/oemaker_iso"

    The result is stored in the /result directory.

    shell
    ls /result/ -l
    total 549052
    -rw-r--r-- 1 root root     20244 Nov 17 15:24 openEuler-livecd-22.03-LTS-SP4-aarch64_binary.rpmlist
    -rw-r--r-- 1 root root 562188288 Nov 17 15:24 openEuler-livecd-22.03-LTS-SP4-aarch64.iso
    -rw-r--r-- 1 root root     15736 Nov 17 15:24 openEuler-livecd-22.03-LTS-SP4-aarch64_source.rpmlist