Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ubuntu 20.04 server autoinstallation HowTo
Ventoy has a plugin to work with the debian autoinstaller. Unfortunately, Ubuntu 20 comes with a new auto install method (cloud-init), which works differently. At first, I wasn't able to get it to work with Ventoy, so I made an account to ask for help; in the time it took the account to get activated, I solved the problem however. So here's how to do it in case anyone else has the same problem.

A working auto installer needs two files, one `meta-data` and one `user-data`. These need to be on a partition that has `cidata` as the partition label.

These files can not be put into the same partition that has the iso files, because that partition is locked while the booted software is running.

So, to get it to work:

  • When running Ventoy for the first time to install it on the USB drive, leave some space for a 3rd partition. On linux, that's `-r 16` to leave 16 MB at the end of the medium.
    ventoy-1.0.36/ -I /dev/sdX -r 16
  • Create a new partition on the medium
    fdisk /dev/sdX
    n (new)
    p (partition)
    3 (partition number)
    press return twice to confirm the sector numbers
    t (type)
    3 (partition number)
    7 (vfat partition type)
  • format it to vfat, and name it `cidata`.

    mkfs.vfat -n cidata /dev/sdX3
  • copy the ubuntu installer iso to the first partition, and your user-data and meta-data to the third partition
More information about user-data is at meta-data can be left empty unless you know what you're doing and want to have some version control for different configs.
Under "Create a new partition on the medium"
The part that says "7 (vfat partition type)".
I guess you mean ExFAT here not vfat, because "7" is ExFAT in my fdisk version.
or do you mean the partition type "W95 FAT32 (LBA)" ?

I tried this with Ubuntu Server 21.10, but no luck.

Can you provide a working example user-data file?
Use /var/log/installer/autoinstall-user-data according to Please remove the following two lines
    kernel: {package: linux-generic}
Give a example

#cloud-config (the real generated user-data config)
    geoip: true
    preserve_sources_list: false
    - arches: [amd64, i386]
    - arches: [default]
  identity: {hostname: optiplex-3080, password: $6$Y6L.IeTT5Q2I5GyK$12vthGNN5n37COpgr.M6gnfa71VjbngbJixmfLqxm05l1SIM5j1s3UwK0QeJE4UdLcAO83DQMze.lZLThYUFk0,
    realname: vagrant, username: vagrant}
    - network
    - storage
    kernel: {package: linux-generic}
  keyboard: {layout: us, toggle: null, variant: ''}
  locale: en_US.UTF-8
        dhcp4: true
    version: 2
    wifis: {}
    allow-pw: true
    authorized-keys: []
    install-server: true
    - {ptable: gpt, serial: SAMSUNG MZVLW256HEHP-000L7_S35ENA1J872082, wwn: eui.002538b87103b701,
      path: /dev/nvme0n1, wipe: superblock-recursive, preserve: false, name: '', grub_device: false,
      type: disk, id: disk-nvme0n1}
    - {device: disk-nvme0n1, size: 536870912, 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-nvme0n1, size: 255521193984, 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-1}
    - {path: /, device: format-1, type: mount, id: mount-1}
    - {path: /boot/efi, device: format-0, type: mount, id: mount-0}
  updates: security
  version: 1

Forum Jump:

Users browsing this thread: 1 Guest(s)