qazwsxkevin
V2EX  ›  Debian

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

  •  
  •   qazwsxkevin · Jan 3, 2025 · 1570 views
    This topic created in 512 days ago, the information mentioned may be changed or developed.

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

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   838 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 21:23 · PVG 05:23 · LAX 14:23 · JFK 17:23
    ♥ Do have faith in what you're doing.