6.2. Creating custom boot images


After you customize the boot images and the GUI layout, create a new image that includes the changes you made.

Procedure

  1. Make sure that all of your changes are included in the working directory. For example, if you are testing an add-on, make sure to place the product.img in the images/ directory.
  2. Make sure your current working directory is the top-level directory of the extracted ISO image, for example, /tmp/ISO/iso/.
  3. Install the following packages: isomd5sum, xorriso, lorax:

    # dnf install isomd5sum xorriso lorax
  4. Make an EFI boot image by using mkefiboot:

    # mkefiboot --label=ANACONDA /tmp/ISO/iso/EFI/BOOT/ /tmp/ISO/iso/images/efiboot.img
  5. Create a new ISO image by using the xorrisofs:

    # xorrisofs -o ../NEWISO.iso -R -J -V RHEL-10-0-BaseOS-x86_64 --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img -partition_offset 16 -appended_part_as_gpt -append_partition 2 C12A7328-F81F-11D2-BA4B-00A0C93EC93B /tmp/ISO/iso/images/efiboot.img -iso_mbr_part_type EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 -c boot.cat --boot-catalog-hide -b images/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info -eltorito-alt-boot -e --interval:appended_partition_2:all:: -no-emul-boot -graft-points .discinfo=/tmp/ISO/iso/.discinfo images/install.img=/tmp/ISO/iso/images/install.img images/pxeboot=/tmp/ISO/iso/images/pxeboot boot/grub2=/tmp/ISO/iso/boot/grub2 boot/grub2/i386-pc=/usr/lib/grub/i386-pc images/eltorito.img=/tmp/ISO/iso/images/eltorito.img EFI/BOOT=/tmp/ISO/iso/EFI/BOOT

    In the above example:

    • Ensure the value for the -V option matches the image’s boot loader configuration, if you are using the LABEL= directive for options that require a location to load a file on the same disk. If your boot loader configuration (boot/grub2/grub.cfg for BIOS and EFI/BOOT/grub.cfg for UEFI) uses the inst.stage2=LABEL=disk_label stanza to load the second stage of the installer from the same disk, then the disk labels must match.

      重要

      In boot loader configuration files, replace all spaces in disk labels with \x20. For example, if you create an ISO image with a RHEL 10.0 label, boot loader configuration should use RHEL\x2010.0.

    • Replace the value of the -o option (-o ../NEWISO.iso) with the file name of your new image. The value in the example creates the NEWISO.iso file in the directory above the current one. For more information about this command, see the xorrisofs(1) man page on your system.
  6. Implant an MD5 checksum into the image. Note that without an MD5 checksu, the image verification check might fail (the rd.live.check option in the boot loader configuration) and the installation can hang.

    # implantisomd5 ../NEWISO.iso

    In the above example, replace ../NEWISO.iso with the file name and the location of the ISO image that you have created in the previous step.

    You can now write the new ISO image to physical media or a network server to boot it on physical hardware, or you can use it to start installing a virtual machine.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部