cloudymax / pxeless

An automated system install and image customization tool for when PXE is not an option, or is not an option yet.
MIT License
115 stars 16 forks source link

Working examples with Ubuntu 22.04.1 Desktop? #11

Closed Poeschl closed 2 years ago

Poeschl commented 2 years ago

Thanks for taking over the ubuntu-autoinstall-iso-generator repro :heart:

Is there a working example known for an automatic install of ubuntu 22.04.1? I'm having issues on setting it up correctly.

When I'm trying to use the provided sample and execute the builder with a pre-downloaded ubuntu iso and the command

./image-create.sh --no-verify --all-in-one --user-data basic-config.yml -s ubuntu-22.04.1-desktop-amd64.iso -d install-22.iso -n jammy

the iso is successfully created.

Now when booted from this iso in a VM, selected the default grup entry, the automatic procedure is not started correctly and I'm seeing the install wizard.

I looked into the syslog and the commands in the kernel seem to be correct. Any clues where to look at?

cloudymax commented 2 years ago

Hoi 👋 Thanks for the question!

A couple points:

While I can't provide a solution to the exact problem at hand, I can suggest that you install your desired desktop environment as part of the the server iso's cloud-init process. there is a great blog post by Pudget Systems that talks about how they use this process to image their laptops.

Dr Donald Kinghorn (Scientific Computing Advisor) How-To: Make Ubuntu Autoinstall ISO with Cloud-init

And here is the gist with their config file: https://gist.github.com/dbkinghorn/c236aea31d76028b2b6ccdf6d3c6f07e

In their setup, they install a minimal desktop then switch the network to use network-manager so wifi will work. This creates a similar end-result to installing via one of the desktop iso, though it is not a live-image.

If it helps for parity of testing environments, I test these images using a QEMU setup with 2 drives (the ISO as a CD-ROM and a blank virtual disk) then attach over vnc using TigerVNC to control the grub selection/reboots that way.

  │ # luanch the VM to install from ISO to Disk
 216   │ create_vm_from_iso(){
 217   │   log "💿 Creating VM from iso file"
 218   │   tmux new-session -d -s "${VM_NAME}_session"
 219   │   tmux send-keys -t "${VM_NAME}_session" "sudo qemu-system-x86_64 \
 220   │     -machine accel=kvm,type=q35 \
 221   │     -cpu host,kvm="off",hv_vendor_id="null" \
 222   │     -smp sockets="$SOCKETS",cores="$PHYSICAL_CORES",threads="$THREADS" \
 223   │     -m "$MEMORY" \
 224   │     -cdrom $ISO_FILE \
 225   │     -object iothread,id=io1 \
 226   │     -device virtio-blk-pci,drive=disk0,iothread=io1 \
 227   │     -drive if=none,id=disk0,cache=none,format=qcow2,aio=threads,file=hdd.img \
 228   │     $NETDEV
 229   │     $DEVICE
 230   │     -bios /usr/share/ovmf/OVMF.fd \
 231   │     -vga virtio \
 232   │     -usbdevice tablet \
 233   │     -vnc $HOST_ADDRESS:$VNC_PORT \
 234   │     $@" ENTER
 235   │     tmux_stream
 236   │ }
Poeschl commented 2 years ago

Thanks a lot for this really details reply. :+1: I will try the server image to see if its an issue with the desktop iso. For my usecase I normally do not need a UI, but if needed it could be installed afterwards (as you said).

Poeschl commented 2 years ago

Trying again with the server iso and it worked perfectly. So indeed the desktop variant is not supporting the autoinstall procedure. :grinning:

cloudymax commented 2 years ago

Trying again with the server iso and it worked perfectly. So indeed the desktop variant is not supporting the autoinstall procedure. 😀

Happy to hear it worked for you - Cheers!