代码: 全选
xorriso -as mkisofs \
-o "$new_iso"\
-V 'Ubuntu-Server 22.04.3 LTS amd64' \
--grub2-mbr --interval:local_fs:0s-15s:zero_mbrpt,zero_gpt:'ubuntu-22.04.3-live-server-amd64.iso' \
--protective-msdos-label \
-partition_cyl_align off \
-partition_offset 16 \
--mbr-force-bootable \
-append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b --interval:local_fs:4156048d-4166115d::'ubuntu-22.04.3-live-server-amd64.iso' \
-appended_part_as_gpt \
-iso_mbr_part_type a2a0d0ebe5b9334487c068b6b72699c7 \
-c '/boot.catalog' \
-b '/boot/grub/i386-pc/eltorito.img' \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
--grub2-boot-info \
-eltorito-alt-boot \
-e '--interval:appended_partition_2_start_1039012s_size_10068d:all::' \
-no-emul-boot \
-boot-load-size 10068 \
/var/lib/vz/template/iso/custom_ubuntu
在网上找了篇帖子
https://github.com/YasuhiroABE/ub-autoinstall-iso
参照改方法,make geniso成功编译镜像,但是安装提示
代码: 全选
Booting from Hard Disk
Boot failed:bnot a bootable disk
Booting from DEV/CD...
我的grub.cfg文件
代码: 全选
set timeout=30
loadfont unicode
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Install Ubuntu Server" {
set gfxpayload=keep
linux /casper/vmlinuz autoinstall ds='nocloud-net' \;s=/cdrom/
initrd /casper/initrd
}
menuentry "Ubuntu Server with the HWE kernel" {
set gfxpayload=keep
linux /casper/hwe-vmlinuz ---
initrd /casper/hwe-initrd
}
grub_platform
if [ "$grub_platform" = "efi" ]; then
menuentry 'Boot from next volume' {
exit 1
}
menuentry 'UEFI Firmware Settings' {
fwsetup
}
else
menuentry 'Test memory' {
linux16 /boot/memtest86+.bin
}
fi