debian12.8 的 preseed 自动安装方式,封装 iso 的正确方式??

155 天前
 qazwsxkevin

先做了这些事情(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 的封装方式,安装引导无法识别介质,导致了没法继续下去了,正确姿势应该是如何?

757 次点击
所在节点    Debian
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://yangjunhui.monster/t/1102156

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX