yum -y install createrepo mkisofs isomd5sum rsync
mount -ro loop /home/iso/CentOS-7-x86_64-Minimal-1810.iso /media/
#同步/media下的文件到/ISO路径下,除了repodata文件夹 /usr/bin/rsync -a --exclude=repodata/ /media/ /ISO/ #在/ISO/文件夹下新建repodata文件夹 mkdir -p /ISO/repodata
label linux menu label ^Install CentOS7 kernel vmlinuz append initrd=initrd.img inst.stage2=hd:LABEL=CentOS7 quiet
createrepo -g repodata/comps.xml ./
cd /ISO genisoimage -joliet-long -V CentOS7 -o CentOS7.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -cache-inodes -T -eltorito-alt-boot -e images/efiboot.img -no-emul-boot /ISO
联系客服