3

I'm trying to automatically install ubuntu-server 21.10 via PXE. Since the text-based installation does work, I omit some details about the whole PXE setup.

This is the relevant part of /srv/tftp/pxelinux.cfg/default:

label 1
  menu label ^Install Ubuntu 21.10
  kernel vmlinuz
  initrd initrd
  append url=http://IP/images/ubuntu-21.10-live-server-amd64.iso autoinstall ds='nocloud-net;s=http://IP/ks/' cloud-config-url=/dev/null ip=dhcp fsck.mode=skip ---

And this configuration is located on the http server under /ks/user-data:

#cloud-config
autoinstall:
  version: 1
  locale: en_US.UTF-8
  identity:
    username: user
    hostname: temp_hostname
    password: '$5$NOheCwwkZHOOQR54$gV90i.jGeomPadblFpg6nNL2f/Y27BfevHCyDVTk7h.'
  users:
  - name: user
    shell: /bin/bash
    lock_passwd: false
    ssh_pwauth: true
    chpasswd: { expire: false }
    sudo: 'ALL=(ALL:ALL) ALL'
    groups: wheel
  disable_root: false
  network:
    version: 2
    ethernets:
      enp0s31f6:
        dhcp4: true
  storage:
    layout:
      name: direct

I would expect that the installation happens without any user intervention. But instead I'm prompted with the text-based installer.

Hint: The iso file on the http server is the original Ubuntu server iso file. I did not yet try recommendations where the meta-data and user-data config files were packed into the iso itself. I would also like to find a solution where this is not necessary, so I can easily edit the cloud-init configuration without touching the iso file.

Edit: I now tried with a patched iso (patched grub.cfg and added the user-data and meta-data files). It still boots into the manual installer.

a.ilchinger
  • 141
  • 2

0 Answers0