0

I'm currently doing PXE automation installation Ubuntu 20.04 desktop. I'm following this guide https://www.laroberto.com/ubuntu-pxe-boot-with-autoinstall. but the guide is for Ubuntu live server image. I've successfully installed it, but when I tried to do it with Ubuntu 20.04 desktop this error occurred.

error

Here my configs.

    #cloud-config
autoinstall:
  version: 1
  apt:
    primary:
    - arches: [default]
      uri: http://mirrors.aliyun.com/ubuntu
  # The passwords are all 000000
  user-data:
    timezone: Asia/Shanghai
    disable_root: false
    chpasswd:
      list: |
        root:$6$UenIfx4J$MXuFvAbjNjwotUl6CtEtwC.1SnlPqMkBd7oHg02XZ1iNk97eMglUrRO1hQUVvOZEf3M/aEhgyrQ/gTDx4fizz/
  identity:
    hostname: ubuntu-desktop
    password: $6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0
    username: ubuntu
  keyboard: {layout: us, variant: ''}
  locale: en_US.UTF-8
  ssh:
    install-server: false

storage: grub: reorder_uefi: False config: - {ptable: gpt, path: /dev/sda, wipe: superblock-recursive, preserve: false, name: '', grub_device: false, type: disk, id: disk-sda} - {device: disk-sda, size: 436870912, wipe: superblock, flag: boot, number: 1, preserve: false, grub_device: true, type: partition, id: partition-0} - {fstype: fat32, volume: partition-0, preserve: false, type: format, id: format-0} - {device: disk-sda, size: -1, wipe: superblock, flag: '', number: 2, preserve: false, type: partition, id: partition-1} - {fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-1} - {device: format-1, path: /, type: mount, id: mount-1} - {device: format-0, path: /boot/efi, type: mount, id: mount-0}

packages:

  • linux-generic-hwe-20.04-edge

late-commands:

  • curtin in-target --target=/target -- wget -P /root/ http://10.0.0.4/tftp/bash/init.sh
  • curtin in-target --target=/target -- wget -P /root/ http://10.0.0.4/tftp/bash/network.sh
  • curtin in-target --target=/target -- bash /root/init.sh

default.

DEFAULT vesamenu.c32
MENU TITLE SPECTRUM PXE BOOT 
TIMEOUT 300
ONTIMEOUT ubuntu-focal-autoinstall
PROMPT 0
NOESCAPE 1

LABEL ubuntu-focal-autoinstall MENU label Install Ubuntu Live Server - autoinstall KERNEL vmlinuz INITRD initrd APPEND root=/dev/ram0 ramdisk_size=150000 ip=dhcp url=http://192.168.75.163/tftp/ubuntu-20.04-live-server-amd64.iso autoinstall ds=nocloud-net;s=http://192.168.75.163/tftp/cloud-init-bios/ cloud-config-url=http://192.168.75.163/tftp/cloud-init-bios/meta-data

LABEL ubuntu-focal-install MENU label Install Ubuntu Live Server KERNEL vmlinuz INITRD initrd APPEND root=/dev/ram0 ramdisk_size=150000 ip=dhcp url=http://192.168.75.163/tftp/ubuntu-20.04-live-server-amd64.iso

LABEL ubuntu-desktop-autoinstall MENU label Install Ubuntu Desktop-Autoinstall KERNEL /u20.04D/vmlinuz INITRD /u20.04D/initrd APPEND root=/dev/ram0 ramdisk_size=150000 ip=dhcp url=http://192.168.75.163/tftp/ubuntu-20.04-desktop-amd64.iso autoinstall ds=nocloud-net;s=http://192.168.75.163/tftp/u20.04D/ cloud-config-url=/dev/null

LABEL ubuntu-focal-install MENU label Install Ubuntu Desktop KERNEL /u20.04D/vmlinuz INITRD /u20.04D/initrd APPEND root=/dev/ram0 ramdisk_size=150000 ip=dhcp url=http://192.168.75.163/tftp/ubuntu-20.04-desktop-amd64.iso

karel
  • 114,770
  • Ubuntu Server 20.04 is compatible with cloud-init. Ubuntu Desktop 20.04 is not. The two are dissimilar due to a multi-year migration to a new installer. Server uses the new installer. Desktop uses the older (preseed-compatible) installer. – user535733 Aug 04 '22 at 04:11
  • thank you for your reply, in my configuration. i need to configure the preseed file instead of user-data cloud-init is it? – nabil_spect Aug 04 '22 at 04:16
  • Seems pretty clear that the instructions you followed are for installing a Desktop system from a PXE-boot using a Server image. You can do it that way -- the base Ubuntu system underlying both Desktop and Server is identical, different packages are on top of that base. You merely downloaded the wrong .iso – user535733 Aug 04 '22 at 04:23
  • for the ubuntu live server is successfully installed. but I need to install the ubuntu-desktop image. but cannot find the right configuration for automation installation. – nabil_spect Aug 04 '22 at 04:29
  • If you want to do it that way, see https://wiki.debian.org/DebianInstaller/Preseed . That's the format compatible with Ubuntu Desktop 20.04/ – user535733 Aug 04 '22 at 04:50

0 Answers0