centos6
create anaconda boot images
/usr/lib/anaconda-runtime/buildinstall --version 15 --brand "ProdueName" --product "ProdueName" --release 2 --final --output /opt /repo/
create iso
rm -rvf iso-temp/packages/* yum clean all && yum update yumdownloader `cat project/pkg.list` --destdir=iso-temp/packages/ cd iso-temp/ && createrepo -g ../project/dvd-comps.xml . && cd ../ xorriso -as mkisofs \ -V 'centos6-server-custom-install' \ -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \ -c isolinux/boot.cat -b isolinux/isolinux.bin \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -eltorito-alt-boot -e efiboot.img -no-emul-boot \ -isohybrid-gpt-basdat \ iso-temp \ -o centos6-server-custom-install.iso implantisomd5 centos6-server-custom-install.iso
centos7
create anaconda boot images
lorax -p "ProdueName" \ -r 16 -v 16 --isfinal \ -s http://10.1.10.26/repo/TengSnake-16-amd64/os/ iso-temp
构建完成后在 iso-temp 生成如下目录和文件@H_301_17@
.discinfo .treeinfo ├── EFI │ └── BOOT │ ├── BOOTIA32.EFI │ ├── BOOTX64.EFI │ ├── fonts │ │ └── unicode.pf2 │ ├── grub.cfg │ ├── grubia32.efi │ ├── grubx64.efi │ ├── mmia32.efi │ └── mmx64.efi ├── images │ ├── boot.iso │ ├── efiboot.img │ └── pxeboot │ ├── initrd.img │ ├── upgrade.img │ └── vmlinuz ├── isolinux │ ├── boot.msg │ ├── grub.conf │ ├── initrd.img │ ├── isolinux.bin │ ├── isolinux.cfg │ ├── memtest │ ├── splash.png │ ├── upgrade.img │ ├── vesamenu.c32 │ └── vmlinuz └── LiveOS └── squashfs.img
一键制作ISO的脚本
rm -rvf iso-temp/Packages/* yum clean all && yum update mkdir -pv iso-temp/Packages/ yumdownloader --archlist=x86_64 --destdir=iso-temp/Packages/ `cat project/dvd-pkg.list` rm -rvf iso-temp/Packages/*.i686.rpm cd iso-temp/ && createrepo -g ../project/dvd-comps.xml . && cd ../ genisoimage -U -r -v -T -J -joliet-long \ -V DEEPINOS -A DEEPINOS -volset DEEPINOS \ -c isolinux/boot.cat -b isolinux/isolinux.bin \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -eltorito-alt-boot -e images/efiboot.img -no-emul-boot \ -o centos7-server-custom-install.iso \ iso-temp implantisomd5 centos6-server-custom-install.iso #isohybrid centos6-server-custom-install.iso #isohybrid --uefi centos6-server-custom-install.iso rm -rvf iso-temp/Packages/*原文链接:https://www.f2er.com/centos/375220.html