I'm trying to create a customized Ubuntu Server ISO (using the instructions here) for use in Hyper-V VMs. I want to modify boot/grub/grub.cfg
to add autoinstall
to the kernel command line parameters to enable automated server installs.
menuentry "Install Ubuntu Server" {
set gfxpayload=keep
linux /casper/vmlinuz autoinstall quiet ---
initrd /casper/initrd
}
If I create a new VM in Hyper-V and have it boot from an unmodified Ubuntu Server ISO and then manually modify the boot options in grub the auto-install runs flawlessly. However Hyper-V never boots from my customized ISO, skipping straight to PXE boot. The customized ISO does boot in KVM, so I must be missing something that just Hyper-V requires.
The specific command I run to create the new ISO after modifying grub.cfg
comes from the guide linked above on customizing the install CD:
mkisofs -r -V "Custom Ubuntu Install CD" \
-cache-inodes \
-J -l -b isolinux/isolinux.bin \
-c isolinux/boot.cat -no-emul-boot \
-boot-load-size 4 -boot-info-table \
-o custom.iso /path/to/iso/root
The base Ubuntu Server ISO I'm modifying is 20.04.3. My host is Windows 10.
Is there a way to modify the mkisofs
command to include whatever Hyper-V requires, or a way to copy the exact settings from the standard ISO, since that works with Hyper-V already?