How to perform unattended installations of Ubuntu Desktop?

9,229

There is no real difference between server and desktop version despite the package-set being installed.

There is a meta-package called "ubuntu-desktop", bringing all packages installed with Ubuntu Desktop. There are also meta-packages for Kubuntu, Edubuntu, Lubuntu and Xubuntu available in default repositories.

Just use a tutorial for Ubuntu server and add this package to your kickstart-file instead of server-related packages (there are other meta-packages like "openssh-server" being installed depending on what services are chosen during installation). If none are chosen (or listed in kickstart-file), you get a minimal Ubuntu-system without anything.

Example for the relevant part in Preseed-file:

### Package selection
tasksel tasksel/first multiselect ubuntu-desktop
#tasksel tasksel/first multiselect lamp-server, print-server
#tasksel tasksel/first multiselect kubuntu-desktop

Example file found here

same for Kickstart-file:

%packages
ubuntu-desktop

Don't use @ubuntu-desktop, what means installing a package-group, but in deb-world a package-group is a meta-package which pulls other packages as dependencies.

Share:
9,229

Related videos on Youtube

Timo
Author by

Timo

Updated on September 18, 2022

Comments

  • Timo
    Timo over 1 year

    I know that there is a lot of information about headless and unattended installation of Ubuntu servers. But I need to install the desktop version of Trusty on a lot of machines and I would like to automate that. With the Kickstart and Preseed manuals I could not bring up an unattended install of Ubuntu 14.04. Desktop 64-bit.

    Is somewhere out there a manual that I did not find? It would be great to get some help. I already spent a couple of hours on this.

    My txt.cfg in /isolinux/:

    default autoinstall
    label autoinstall
         menu label ^Autoinstall Ubuntu POS-Server
         kernel /install/vmlinuz
         append preseed/file=/cdrom/preseed/pos.seed debian-installer/locale=de_DE console-setup/layoutcode=de initrd=/install/initrd.gz ramdisk_size=16384 ks=cdrom:/ks.cfg  root=/dev/ram rw --
    

    My pos.seed in /preseed/:

    d-i partman/confirm_write_new_label boolean true
    d-i partman/choose_partition \
    select Finish partitioning and write changes to disk
    d-i partman/confirm boolean true
    
    d-i debian-installer/locale string en_US.UTF-8
    d-i debian-installer/splash boolean false
    d-i console-setup/ask_detect boolean false
    d-i console-setup/layoutcode string de
    d-i console-setup/variantcode string
    
    ### Network
    d-i netcfg/choose_interface select auto
    
    ## Keyboard configuration
    d-i keyboard-configuration  keyboard-configuration/layoutcode       string  de
    d-i keyboard-configuration  keyboard-configuration/layout   select  German
    d-i keyboard-configuration  keyboard-configuration/variant  select  German
    d-i keyboard-configuration  keyboard-configuration/xkb-keymap       select  de
    
    #### Advanced options
    ### Running custom commands during the installation
    # This first command is run as early as possible, just after
    # preseeding is read.
    # if old filesystem present installer asks for unmount
    d-i preseed/early_command string umount /media
    
    ### Package selection
    # Individual additional packages to install
    # Install the Ubuntu desktop.
    tasksel tasksel/first multiselect ubuntu-desktop
    d-i pkgsel/include string openssh-server build-essential
    # Policy for applying updates. May be "none" (no automatic updates),
    # "unattended-upgrades" (install security updates automatically), or
    # "landscape" (manage system with Landscape).
    d-i pkgsel/update-policy select none
    # Enable extras.ubuntu.com.
    d-i apt-setup/extras    boolean true
    

    My ks.cfg in /:

    #Generated by Kickstart Configurator
    #platform=AMD64 or Intel EM64T
    
    #System language
    lang en_US
    #Language modules to install
    langsupport en_US
    #System keyboard
    keyboard de
    #System mouse
    mouse
    #System timezone
    timezone Europe/Berlin
    #Root password
    rootpw --disabled
    #Initial user
    user ****** --fullname "******" --iscrypted --password ******************
    #Reboot after installation
    reboot
    #Use text mode install
    text
    #Install OS instead of upgrade
    install
    #Use CDROM installation media
    cdrom
    #System bootloader configuration
    bootloader --location=mbr locale=de_DE console-setup/ask_detect=false keyboard-configuration/layoutcode=de
    #Clear the Master Boot Record
    zerombr yes
    #Partition clearing information
    clearpart --all --initlabel 
    #Partitioning
    part / --fstype ext4 --size 1 --grow --asprimary
    part swap --recommended
    part /boot --fstype ext4 --size 256 --asprimary
    #System authorization infomation
    auth  --useshadow  --enablemd5 
    #Network configuration
    network --bootproto=dhcp --device=eth0
    #Firewall configuration
    #firewall --disabled 
    #Do not configure the X Window System
    skipx
    #custom packages for installation
    %packages
    openssh-server
    ubuntu-desktop
    
    • Timo
      Timo over 9 years
      with this setup I was able to set up a server but not a desktop
  • Timo
    Timo over 9 years
    ok...I see, I will try to get my server-install to automatically install ubuntu-desktop package.
  • Timo
    Timo over 9 years
    Sorry, it is not possible to just add a ubuntu-desktop to either the kickstart nor the preseed file. it just does not work.
  • Christian
    Christian over 9 years
    I've just added more information to the answer. I think you are confused by packagegroup and metapackage. I also don't see "ubuntu-desktop" listed in your preseed-file. It would be nice to know what you exactly mean with "just does not work". What kind of system with what problem do you get after installing this way?
  • Timo
    Timo over 9 years
    I updated my file-examples another time. ubuntu-desktop was there in the preseed-file. I removed the @ from the kickstart-file. I was trying out several different options. In the end it always installs automatically but always the server without installing the ubuntu-desktop and not setting my keyboard to german layout. I need the Desktop to start automatically.
  • Christian
    Christian over 9 years
    Is it not being installed or only not automatically started? Did you install with that "skipx"-parameter in Kickstart-file?
  • Timo
    Timo over 9 years
    I used the above files but with the @ before ubuntu-desktop and without network. Now it works! Obviously I needed internet-connection to download desktop-data and the @ was wrong as you said.