I followed this link to create an offline autoinstall for Ubuntu 22.04.
I have successfully generated the ISO using xorriso and installed it in a virtual machine on VirtualBox. However, after rebooting, the machine fails to boot into normal mode. Instead, I am presented with a minimal BASH-like line editing shell, as shown below
The ISO was generated using the following command:
xorriso -as mkisofs -r -V 'Ubuntu-22.04-LTS-AUTO' -o ../ubuntu-nov12-test1-autoinstall.iso --grub2-mbr ../BOOT/1-Boot-NoEmul.img -partition_offset 16 --mbr-force-bootable -append_partition 2 28732ac11ff8d211ba4b00a0c93ec93b ../BOOT/2-Boot-NoEmul.img -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 -eltorito-alt-boot -e '--interval:appended_partition_2:::' -no-emul-boot .
grub.cfg
file is as follows,
loadfont unicodeset menu_color_normal=white/blackset menu_color_highlight=black/light-graymenuentry "Try or Install Ubuntu Server" { set gfxpayload=keep linux /casper/vmlinuz autoinstall ds=nocloud\;s=/cdrom/nocloud/ --- initrd /casper/initrd}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
install-sources.yaml
file is as follows
- description: en: This version installs a Desktop environment where humans are not expected to log in. id: desktop locale_support: none name: en: Ubuntu Desktop path: filesystem.squashfs size: 2712014848 type: fsimage variant: server default: true- description: en: This version has been customized to have a small runtime footprint in environments where humans are not expected to log in. id: ubuntu-server-minimal locale_support: none name: en: Ubuntu Server (minimized) path: ubuntu-server-minimal.squashfs size: 611012608 type: fsimage variant: server- description: en: The default install contains a curated set of packages that provide a comfortable experience for operating your server. id: ubuntu-server locale_support: locale-only name: en: Ubuntu Server path: ubuntu-server-minimal.ubuntu-server.squashfs size: 1259954176 type: fsimage-layered variant: server
@mpboden I followed your instructions and took the steps below
apt updatesudo apt install xorriso squashfs-tools gzip wget p7zip-full -y# Unpacked the Iso`smkdir server-iso-extracted desktop-iso-extracted7z -y x ~/server-iso-extracted/ubuntu-22.04.5-live-server-amd64.iso -oserver-iso/cd server-iso/mv '[BOOT]' ../BOOT7z -y x ~/desktop-iso-extracted/ubuntu-22.04.5-desktop-amd64.iso -odesktop-iso/#Unsquash the Desktop Filesystem sudo unsquashfs -d desktop-squashfs desktop-iso-extracted/desktop-iso/casper/filesystem.squashfs#Chroot into the unsquashed filesystemsudo mount --bind /dev desktop-squashfs/devsudo mount --bind /proc desktop-squashfs/procsudo mount --bind /run desktop-squashfs/runsudo mount --bind /sys desktop-squashfs/syssudo chroot desktop-squashfs# Inside the chroot, run custom scripts to install additional packages (Apache, PHP, PostgreSQL): # Example commands for package installation apt update apt install -y apache2 php postgresql # Install cloud-init for user configuration during autoinstall apt install -y cloud-init#Exit chroot and clean up exit sudo umount desktop-squashfs/dev sudo umount desktop-squashfs/proc sudo umount desktop-squashfs/run sudo umount desktop-squashfs/sys# Resquash the Modified Filesystemsudo mksquashfs desktop-squashfs server-iso-extracted/server-iso/casper/filesystem.squashfs -comp xz -e boot# Add Autoinstall Files to Server ISO Directory mkdir -p server-iso-extracted/server-iso/nocloudtouch user-data meta-datavi user-data #cloud-config autoinstall: version: 1 identity: hostname: ubuntu-desktop password: $6$5lpwCLsKLEzMkSJc$keOAhA6aO/5RocGThmhVA7LSNuW911Rx5HHXFEa75oGK20cEdAAgn14H5f5nGeq6QgcSyLPrWcg1.JvjXbhrN/ realname: Ubuntu user username: ubuntu timezone: Asia/Kolkata network: version: 2 renderer: NetworkManager refresh-installer: update: no keyboard: layout: us locale: en_US.UTF-8 late-commands: - curtin in-target --target=/target -- apt-get install -y cloud-initgrub.cfg file is given aboveinstall-sources.yaml file is given above #Update checksums: cd ~/server-iso-extracted/server-iso sudo chmod +w md5sum.txt sudo find . -type f -print0 | sudo xargs -0 md5sum | grep -v "./md5sum.txt" | sudo tee md5sum.txt md5sum -c md5sum.txtiso generated using the xorriso command given above..
could you please look into it?
Please help me resolve this issue.