1.构建所需的工具有 lorax createrepo等。
wget https://mirrors.openanolis.cn/anolis/8.4/isos/GA/loongarch64/AnolisOS-8.4-GA-loongarch64-dvd.iso
[root@controller anolis]# mkdir iso
[root@controller anolis]# mount AnolisOS-8.4-GA-loongarch64-dvd.iso iso/
查看挂载后的目录列表
[root@controller anolis]# ls iso/
AppStream BaseOS boot boot.catalog EFI images media.repo TRANS.TBL
注意:如果需要定制,可根据自己需要重新修改源仓库下repodate目录下的分组文件并通过createrepo -g生成新的分组信息
查看EFI/BOOT/grub.cfg中LABEL对应的值,并记录
LABEL=loongarch64-dvd
该值为盘符信息,或者uuid,可根据实际需要修改,一般不建议修改,修改的话需要同步修改其他地方对应的信息
_iso_efi_boot_args=“-eltorito-alt-boot -e images/efiboot.img -no-emul-boot -isohybrid-gpt-basdat”
ISO_FULLNAME=“loongnix-test-loongarch-dvd.iso”
xorriso -as mkisofs -iso-level 3 -full-iso9660-filenames -volid “${LABEL}” -appid “Loongnix http://www.loongnix.org” -publisher “loongnix Install CD” -preparer “prepared by mkarchiso” ${_iso_efi_boot_args} -output ${ISO_FULLNAME} “iso”
参数详解
-iso-level LEVEL Set ISO9660 conformance level (1…3) or 4 for ISO9660 version 2
-full-iso9660-filenames Allow full 31 character filenames for ISO9660 names
-volid Set Volume ID
注意,如果使用别人已经做好的iso挂载的文件,需要与EFI/BOOT/grub.cfg中LABEL对应的值保持一致
-appid Set Application ID
-publisher Set Volume publisher
-preparer Set Volume preparer
-output 输出的文件名称