Score:1

Issues autoinstalling Ubuntu 20.04

fr flag

I'm trying to make an automated installation of Kubuntu 20.04 with a PXE-Server. First using an ubuntu20.04-live-server image and the adding de kubuntu-desktop package. The thing is that I got lost at some point, because the autoinstaller doesn't do anything that appears on my user-data file. Maybe someone can help me. This would be my PXE-Menu:

default menu.c32
prompt 0
timeout 300
menu title PXE Menu
LABEL Install Kubuntu 20.04 with Autoinstall
 
    MENU LABEL  Install Kubuntu 20.04 with Autoinstall
    KERNEL initundkernel/vmlinuz
    INITRD initundkernel/initrd
    APPEND root=/dev/ram0 ramdisk_size=150000i ip=dhcp url=http://myip/ubuntu-20.04.2-live-server-amd64.iso autoinstall ds=nocloud-net;s=http://myip/preseed/cloud-init/ cloud-config-url=/dev/null

The Menu works, it makes a correct installation of a plane ubuntu-server image, but that is all. It just pretends to read my user-data file:

autoinstall:
  version: 1
  apt:
    geoip: true
    preserve_sources_list: false
    primary:
    - arches: [amd64, i386]
      uri: http://archive.ubuntu.com/ubuntu
    - arches: [default]
      uri: http://ports.ubuntu.com/ubuntu-ports
  identity: {hostname: laptop17, password: $6$BCcme3szGenL3OjI$mj8X5xU97tQmqLkJyrTi3Aroi4Zx1D9a8kMAv08FmX15pK1FLcX5cBCLhYkwxCH1M9iRA2azSqmKMnKpkLAmw1,
    realname: localadmin, username: localadmin}
  keyboard: {layout: de, variant: nodeadkeys}
  locale: de
  network:
    ethernets: {}
    version: 2
  ssh:
    allow-pw: true
    authorized-keys: 
      - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQJj+FCD7xQKz0gDin7pLnqT15wBfeCbnKLWiAPuNBKTqjQT8TO7QaK6TskNVW2rg32ixcT4FGG8d047nMrNzVz61lIsVNiwCGZZQun6Vp6kqdUGP9upXS3ewhsmHNQNAXdZ+XUpUv+++1QU2RX4UEDJelrpIt i@mylaptop
    install-server: true
  storage:
    config:
    - {ptable: gpt, serial: BIWIN_SSD_1832008401056, path: /dev/sda, wipe: superblock,
      preserve: false, name: '', grub_device: true, type: disk, id: disk-sda}
    - {device: disk-sda, size: 1048576, flag: bios_grub, number: 1, preserve: false,
      grub_device: false, type: partition, id: partition-0}
    - {device: disk-sda, size: 1073741824, wipe: superblock, flag: '', number: 2,
      preserve: false, grub_device: false, type: partition, id: partition-1}
    - {fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-0}
    - {device: disk-sda, size: 238979907584, wipe: superblock, flag: '', number: 3,
      preserve: false, grub_device: false, type: partition, id: partition-2}
    - {volume: partition-2, keyfile: /tmp/luks-key-td2i_kos, preserve: false, type: dm_crypt,
      id: dm_crypt-0}
    - name: ubuntu-vg
      devices: [dm_crypt-0]
      preserve: false
      type: lvm_volgroup
      id: lvm_volgroup-0
    - {name: ubuntu-lv, volgroup: lvm_volgroup-0, size: 119481040896B, preserve: false,
      type: lvm_partition, id: lvm_partition-0}
    - {fstype: ext4, volume: lvm_partition-0, preserve: false, type: format, id: format-1}
    - {device: format-1, path: /, type: mount, id: mount-1}
    - {device: format-0, path: /boot, type: mount, id: mount-0}
  version: 1
  
   packages:
   - build-essential
   - kubuntu-desktop

  late-commands:
   - sed -i 's/^#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config
   - service sshd restart
   - dhclient

I followed some documentations like the next one https://louwrentius.com/understanding-the-ubuntu-2004-lts-server-autoinstaller.html#fnref:file but it doesn't work. I used /var/log/installer/autoinstall-user-data file as example and then I just need to add few things like the kubuntu-desktop package and then openssh-server with my ssh-key and allowing login as root.

Any help would be welcome

Andrew Lowther avatar
jp flag
Your `user-data` file **must** being with `#cloud-config`. This is not optional. Also, be careful installing a Desktop environment. Some core components will be changed (e.g. NetworkManager replaces systemd-network). This post has some suggested steps for Desktops https://askubuntu.com/a/1292033/376778
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.