13

After struggling quite some time with figuring out how preseeding on Ubuntu 18.04 Desktop works, I figured it out. I was hoping that I could use the same procedure for 20.04 Desktop. Can I?

The ubuntu wiki page on Automated Server Installs for 20.04 sounds like it has been removed in favor of a new, and hence different, mode of operation:

The server installer for 20.04 supports a new mode of operation: automated installation, autoinstallation for short. You might also know this feature as unattended or handsoff or preseeded installation. [...]

preseeds are the way to automate an installer based on debian-installer (aka d-i).

autoinstalls for the new server installer differ from preseeds in the following main ways:

  • the format is completely different (cloud-init config, usually yaml, vs debconf-set-selections format)
  • when the answer to a question is not present in a preseed, d-i stops and asks the user for input. autoinstalls are not like this: by default, if there is any autoinstall config at all, the installer takes the default for any unanswered question (and fails if there is no default). You can designate particular sections in the config as "interactive", which means the installer will still stop and ask about those.

Questions

  1. Can I use the old procedure of preseeding with a preseed file with d-i/ubiquity directives?
  2. Does this new "autoinstall" work only on Ubuntu 20.04 Server or also on Ubuntu 20.04 Desktop?
  3. Or if the previous answers are both "No, that doesn't work on Ubuntu 20.04 Desktop.", what is the recommended way to automate an installation of Ubuntu 20.04 Desktop?
14
  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:

4

@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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.