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 SP3
- 60 GB or more drive space for running oemaker and storing ISO images.
Installation
The following uses openEuler 22.03 LTS SP3 on the AArch64 architecture as an example to describe how to install oemaker.
Ensure that openEuler 22.03 LTS SP3 has been installed on the computer.
cat /etc/openEuler-release openEuler release 22.03 LTS SP3
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:
NOTE:
x86_64 image download:
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.
[local] name=local baseurl=file:///home/oemaker_iso gpgcheck=0 enabled=1
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:
sudo mount -o loop /home/openEuler-22.03-LTS-SP3-everything-aarch64-dvd.iso /home/oemaker_iso
Make the Yum repository take effect.
yum clean all yum makecache
Install oemaker as the root user.
sudo yum install -y oemaker
Run the following command as the root user to verify that the tool has been installed successfully:
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:
oemaker [ --help | -h ] [ -t <ISO type> ] [ -p <Product name> ] [ -v <Version number> ] [-r <Release information> ] [-s <Source dnf repository address link>]
Command Options
Option | Mandatory | Description |
---|---|---|
--help \ -h | No | Query the help information the command. |
-t <ISO type> | Yes | Specify the image type. The value can be standard, debug, source, everything, everything_debug, everything_src, livecd, or netinst. |
-p <Product name> | No | Product name. |
-v <Version number> | No | Product version. |
-r <Release information> | No | Release information. |
-s <Source dnf repository address link> | No | Software 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.
Modify the configuration file /opt/oemaker/config/aarch64/livecd/rpmlist to specify the RPM software packages to be installed.
sudo vi /opt/oemaker/config/aarch64/livecd/rpmlist
Ensure that the space of the temporary directory for running oemaker is greater than 60 GB.
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
Perform the creation.
Run the following commands:
cd /opt/oemaker ./oemaker.sh -t livecd -p openEuler -v 22.03-LTS-SP3 -r '' -s "file:///home/oemaker_iso"
The result is stored in the /result directory.
ls /result/ -l total 549052 -rw-r--r-- 1 root root 20244 Nov 17 15:24 openEuler-livecd-22.03-LTS-SP3-aarch64_binary.rpmlist -rw-r--r-- 1 root root 562188288 Nov 17 15:24 openEuler-livecd-22.03-LTS-SP3-aarch64.iso -rw-r--r-- 1 root root 15736 Nov 17 15:24 openEuler-livecd-22.03-LTS-SP3-aarch64_source.rpmlist