1

testing on VirtualBox an automated install of ubuntu desktop, i have a router, dhcp, tftp, http server.

This is my pxelinux.cfg/default:

UI menu.c32
LABEL Ubuntu
  MENU LABEL Ubuntu
  KERNEL ubuntu/casper/vmlinuz
  INITRD ubuntu/casper/initrd
  APPEND root=/dev/ram0 ramdisk_size=1500000 ip=dhcp cloud-config-url=/dev/null url=http://192.168.1.1/ubuntu-22.04.1-desktop-amd64.iso autoinstall ds='nocloud-net\;s=http://192.168.1.1/' ---

But the automated install doesn't work. I still get to the install form...

I use a minimal autoinstall user-data and empty meta-data on my http server:

#cloud-config
autoinstall:
  version: 1
  identity:
    hostname: test
    password: $6$TgOD2MaHJ5/yy6s4$J7QZMZe/lUqOboU6M3B/MqXEnovVil2n4N1OkfDgP7.RcBXUPGxehSPF6Vy8fPt9yHf61LAGkIL8zLjFVN88i.
    username: test

on the /var/log/apache2/access.log only the ubuntu ISO is requested by the pxe boot. But on live environment I can download the user-data and meta-data files with wget.

with journalctl | grep autoinstall I get

Jan 12 11:08:49 ubuntu kernel: Command line: BOOT_IMAGE=ubuntu/casper/vmlinuz root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=http://192.168.1.1/ubuntu-22.04.1-desktop-amd64.iso autoinstall ds=nocloud-net;s=http://192.168.1.1/ cloud-config-url=/dev/null --- initrd=ubuntu/casper/initrd
Jan 12 11:08:49 ubuntu kernel: Kernel command line: BOOT_IMAGE=ubuntu/casper/vmlinuz root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=http://192.168.1.1/ubuntu-22.04.1-desktop-amd64.iso autoinstall ds=nocloud-net;s=http://192.168.1.1/ cloud-config-url=/dev/null --- initrd=ubuntu/casper/initrd
Jan 12 11:08:49 ubuntu kernel: Unknown kernel command line parameters "autoinstall --- BOOT_IMAGE=ubuntu/casper/vmlinuz ramdisk_size=1500000 ip=dhcp url=http://192.168.1.1/ubuntu-22.04.1-desktop-amd64.iso ds=nocloud-net;s=http://192.168.1.1/ cloud-config-url=/dev/null", will be passed to user space.
Jan 12 11:08:49 ubuntu kernel:     autoinstall
Jan 12 11:09:06 ubuntu /usr/libexec/gdm-x-session[1506]: Kernel command line: BOOT_IMAGE=ubuntu/casper/vmlinuz root=/dev/ram0 ramdisk_size=1500000 ip=dhcp url=http://192.168.1.1/ubuntu-22.04.1-desktop-amd64.iso autoinstall ds=nocloud-net;s=http://192.168.1.1/ cloud-config-url=/dev/null --- initrd=ubuntu/casper/initrd

I have tested with ubuntu server 22.04, UEFI and BIOS, with quotes and backslash for ds parameter but none of them seems to work

  • The standard 22.04 desktop installer does not use autoinstall. The server installer does. PXELinux does not require quoting or escaping in the kernel parameters. See a full example at https://askubuntu.com/a/1240068/376778 – Andrew Lowther Jan 12 '23 at 22:44
  • yes! I replaced the ubuntu-22.04.1-desktop-amd64.iso with ubuntu-22.04.1-live-server-amd64.iso and the auto install is now working, thanks :) – Eryoka Cozart Jan 13 '23 at 09:05

2 Answers2

0

Welcome, the server does not find your user-data file. You need to change the APPEND line slightly

APPEND root=/dev/ram0 ramdisk_size=1500000 ip=dhcp cloud-config-url=<URL TO user-data> url=http://192.168.1.1/ubuntu-22.04.1-desktop-amd64.iso autoinstall ds=nocloud-net s=<URL TO DIRECTORY CONTAINING user-data>

please replace <URL TO user-data> and <URL TO DIRECTORY CONTAINING user-data> with your values.

dummyuser
  • 963
  • 1
  • 3
  • 10
0

I've made two errors:

  • the iso must be the live-server one not the desktop as well as the initrd and the vmlinuz file served by tftp
  • in my pxe config :
    • cloud-config-url should be <URL TO user-data> not /dev/null
    • ds=nocloud-net s=<URL TO DIRECTORY CONTAINING user-data> works, no quotes or escape sequence required

thanks to dummyuser and Andrew Lowther, both of your answer were necessary