先做了这些事情(debian-12.8.0-amd64-DVD-1.iso 是官网下载的)
apt install debian-cd isolinux genisoimage
mount -o loop /opt/mkiso/debian-12.8.0-amd64-DVD-1.iso /mnt
mkdir /opt/debian_custom
cp -r /mnt/* /opt/debian_custom/
cp /opt/preseed.cfg /opt/debian_custom/preseed.cfg
chmod +w /opt/debian_custom/isolinux/txt.cfg
vi /opt/debian_custom/isolinux/txt.cfg
加入以下测试项
label autoa
menu label ^autotesta (Automated)
kernel /install.amd/vmlinuz
append auto=true preseed/file=preseed.cfg initrd=/install.amd/initrd.gz --- quiet
label autob
menu label ^autotestb (Automated)
kernel /install.amd/vmlinuz
append auto=true preseed/file=/preseed.cfg initrd=/install.amd/initrd.gz --- quiet
label autoc
menu label ^autotestc (Automated)
kernel /install.amd/vmlinuz
append auto=true preseed/file=/cdrom/preseed.cfg initrd=/install.amd/initrd.gz --- quiet
cd /opt/debian_custom
genisoimage -o /home/debian_0012_-auto.iso \
-r -J -b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
/opt/debian_custom
xorriso -as mkisofs -o /home/debian_0012_-auto.iso \
-r -J -V "Debian Custom" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 8 -boot-info-table \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
/opt/debian_custom
使用以上两种命令生成的 iso ,在虚拟机中,能正常引导,无论是传统的 Graphical Install ,还是自加的 autotesta,autotestb,autotestc 方式,在开始后,会在界面提示:Detect and mount installation media","Incorrect installation media detected"
preseed.cfg 应该是没问题的,交给 GPT 检查过,现在看起来,更像是 iso 的封装方式,安装引导无法识别介质,导致了没法继续下去了,正确姿势应该是如何?