I am attempting to set up an unattended installation of 18.04.2 LTS server from the Alternate ISO (not the live version) using Packer. I have my preseed file set up to get copied in from a virtual floppy. The boot command gets entered into the VM and everything from the preseed file seems to load up fine, but I am not getting a desktop after the VM is rebooted once the installation completes. I thought I had pieced everything together from Googling, but I am now stuck.

Here is my Packer configuration:

"_comment": "Build with `packer build ubuntu.json`",
"variables": {
    "boot_command_prefix": "<esc><esc><enter><wait>",
    "cleanup_pause": "",
    "cpus": "2",
    "desktop": "true",
    "disk_size": "65535",
    "headless": "false",
    "iso_checksum": "34416ff83179728d54583bf3f18d42d2",
    "iso_checksum_type": "md5",
    "iso_name": "xubuntu-18.04.2-server-amd64.iso",
    "iso_path": "C:\\dev\\Packer",
    "iso_url": "C:\\dev\\Packer\\ubuntu-18.04.2-server-amd64.iso",
    "locale": "en_US",
    "memory": "4096",
    "preseed" : "preseed.cfg",
    "hostname": "epoch3dev-template",
    "ssh_fullname": <full name>,
    "ssh_password": <password>,
    "ssh_username": <user>,
    "update": "false",
    "rc_version": "1",
    "vm_basename": "EpochIIIDevVM-RC",
    "vmware_guest_os_type": "ubuntu-64"

  "builders": [
      "boot_wait": "5s",
      "boot_command": [
        "{{ user `boot_command_prefix` }}",
        "/install/vmlinuz ",
        "initrd=/install/initrd.gz ",
        "auto=true ",
        "priority=critical ",
        "file=/floppy/{{ user `preseed` }} ",
        "hostname={{ user `hostname` }} ",
        "-- <enter>"
      "disk_size": "{{ user `disk_size` }}",
      "floppy_files": [
        "{{ user `preseed` }}"
      "guest_os_type": "{{ user `vmware_guest_os_type` }}",
      "headless": "{{ user `headless` }}",
      "http_directory": "http",
      "iso_checksum": "{{ user `iso_checksum` }}",
      "iso_checksum_type": "{{ user `iso_checksum_type` }}",
      "iso_urls": [
        "{{ user `iso_path` }}/{{ user `iso_name` }}",
        "{{ user `iso_url` }}"
      "output_directory": "output-{{ user `vm_basename` }}{{ user `rc_version` }}",
      "shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now",
      "ssh_password": "{{ user `ssh_password` }}",
      "ssh_username": "{{ user `ssh_username` }}",
      "ssh_wait_timeout": "10m",
      "tools_upload_flavor": "linux",
      "type": "vmware-iso",
      "vm_name": "{{ user `vm_basename` }}{{ user `rc_version` }}",
      "vmx_data": {
        "ethernet0.pciSlotNumber": "32",
        "memsize": "{{ user `memory` }}",
        "numvcpus": "{{ user `cpus` }}"
      "vmx_remove_ethernet_interfaces": true


Here is my preseed file:

d-i auto-install/enable boolean true

### Localization
# Locale sets language and country.
d-i debian-installer/locale string en_US

# Keyboard selection.
d-i console-keymaps-at/keymap select us

### Network configuration
# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
d-i netcfg/choose_interface select auto

### Clock and time zone setup
# Controls whether or not the hardware clock is set to UTC.
d-i clock-setup/utc boolean true

# You may set this to any valid setting for $TZ; see the contents of
# /usr/share/zoneinfo/ for valid values.
d-i time/zone string US/Eastern

### Account setup
# Skip creation of a root account (normal user account will be able to
# use sudo).
d-i passwd/root-login boolean false

# To create a normal user account.
d-i passwd/root-login boolean false
d-i passwd/user-fullname string <full name>
d-i passwd/username string <username>
# Normal user's password, either in clear text
d-i passwd/user-password password <password>
d-i passwd/user-password-again password <password>
d-i user-setup/encrypt-home boolean false

# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true

### Package selection
ubiquity ubiquity/minimal_install boolean true
tasksel tasksel/first multiselect standard, xubuntu-desktop
d-i pkgsel/install-language-support boolean false
d-i pkgsel/include string openssh-server ntp curl nfs-common linux-headers-$(uname -r) build-essential perl dkms

# do not enable live installer, use normal instead
d-i live-installer/enable boolean false

# activate DASD, dasdfmt if needed
d-i s390-dasd/dasd string 0.0.0200,0.0.0300,0.0.0400

# DASD configuration
d-i s390-dasd/auto-format boolean true
d-i s390-dasd/force-format boolean true

# auto-partition, all files in one partition
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman/choose_partition select finish
d-i partman/confirm_nooverwrite boolean true
d-i partman/confirm boolean true

### Finishing up the first stage install
# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note

# Monitor autodetection is recommended.
xserver-xorg xserver-xorg/autodetect_monitor boolean true
# Uncomment if you have an LCD display.
#xserver-xorg xserver-xorg/config/monitor/lcd boolean true
# X has three configuration paths for the monitor. Here's how to preseed
# the "medium" path, which is always available. The "simple" path may not
# be available, and the "advanced" path asks too many questions.
xserver-xorg xserver-xorg/config/monitor/selection-method \
       select medium
xserver-xorg xserver-xorg/config/monitor/mode-list \
       select 1680x1050 @ 60 Hz

Can anyone tell me what I am doing wrong or what I am missing? Can I even do this with the Server ISO?


1 Answer 1


Ubuntu Server does not come with a graphical interface but if you are connect to the internet you can download one.

You need to add universe pocket first with

sudo add-apt-repository universe

and then install Ubuntu desktop

sudo apt install ubuntu-desktop

or MATE desktop

sudo apt install ubuntu-mate-desktop^
  • I realize that I can do that after the installation, but I need to have this happen during the unattended installation.
    – DrewM
    Commented Jul 10, 2019 at 18:57
  • Maybe this could help you linuxuprising.com/2018/07/…
    – Fizer450
    Commented Jul 10, 2019 at 19:05
  • Unfortunately this doesn't seem feasible. apt install can't find the package. I also attempted to copy over the .deb and install with dpkg, but there are far too many dependencies to add manually.
    – DrewM
    Commented Jul 10, 2019 at 20:18
  • @DrewM you have to add universe pocket to the list of repositories with sudo add-apt-repository universe first.
    – N0rbert
    Commented Jul 11, 2019 at 11:28
  • I have been trying to do this is a Packer provisioner to keep the VM deployment automated, but I'm having issues getting the clock synched up. The apt repositories won't allow the VM to update with the clock too far off. Once I have that working I will post an update, though I am getting pulled away from this at the moment.
    – DrewM
    Commented Jul 12, 2019 at 12:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .