How to preseed ubuntu 20.04 desktop?

  1. The server installer plans states it is end-of-life:

    With 20.04 LTS, we will be completing the transition to the live server installer and discontinuing the classic server installer based on debian-installer (d-i), allowing us to focus our engineering efforts on a single codebase. The next-generation subiquity server installer brings the comfortable live session and speedy install of Ubuntu Desktop to server users.

    So I would not use it regardless. Link is also a good read about the progress of this.

  2. Only the server.

  3. I myself would use this new method and install the server and then add the desktop as a package to install or as a post installation action. Even though the scope of this will likely be deployment of 100s of machines and not just a single desktop the installation of the desktop is just a single apt install command you could add somewhere in there.

Related links:

  • Discourse
  • Quick start
  • Config reference

@rinzwind answer worked completely for me. ServerGUI. Just append ubuntu-desktop to packages section of autoinstall.yaml and have a desktop build.

Snipping storage section, example enables unattended install into VirtualBox and installs extensions

#cloud-config
autoinstall:
  identity:
    hostname: mcs-ui
    password: overwritten
    realname: ''
    username: mcs
  keyboard:
    layout: us
    variant: ''
  late-commands:
  - 'echo "mcs ALL=(ALL) NOPASSWD: ALL" > /target/etc/sudoers.d/mcs'
  - chmod 440 /target/etc/sudoers.d/mcs
  - apt-get -y install linux-headers-$(uname -r)
  - cp /media/cdrom/vboxadditions/VBoxLinuxAdditions.run /target/root
  - curtin in-target -t /target -- /bin/bash /root/VBoxLinuxAdditions.run --nox11;
    echo 'vboxadditions installed'
  locale: en_US
  packages:
  - avahi-daemon
  - avahi-autoipd
  - build-essential
  - ubuntu-desktop
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  version: 1