We want to use the new ubuntu autoinstall method Autoinstall. There are some problems getting UEFI boot to work. I've installed Ubuntu Server 20.04 with the normal installer and EFI method and then acquired the following user-data file.
#cloud-config
autoinstall:
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [amd64, i386]
uri: http://de.archive.ubuntu.com/ubuntu
- arches: [default]
uri: http://ports.ubuntu.com/ubuntu-ports
identity: {hostname: zsrv, password: $6$AYtLXyyVZAea2aLJ$UQxW1cz2vWWNn.17.3QYH5TxZqIMGoLJCpqbBTfClhUKxqouYn7/Yc5Jsq.bCeK0VDLPxbL6xzfJ0xqTb6MLk.,
realname: root, username: root}
keyboard: {layout: us, toggle: null, variant: ''}
locale: C
network:
ethernets:
enp1s0: {dhcp4: true}
version: 2
ssh:
allow-pw: true
authorized-keys: []
install-server: true
storage:
config:
- {ptable: gpt, wipe: superblock, preserve: false, name: '', grub_device: false,
type: disk, id: disk-vda}
- {ptable: gpt, wipe: superblock-recursive, preserve: false, name: '',
grub_device: false, type: disk, id: disk-vdb}
- {device: disk-vda, 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-vda, size: 1073741824, 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: disk-vdb, size: 24696061952, wipe: superblock, flag: '', number: 1,
preserve: false, type: partition, id: partition-4}
- {device: disk-vda, size: 24696061952, wipe: superblock, flag: '', number: 3,
preserve: false, type: partition, id: partition-5}
- name: md0
raidlevel: raid1
devices: [partition-4, partition-5]
spare_devices: []
preserve: false
type: raid
id: raid-0
- {fstype: ext4, volume: raid-0, preserve: false, type: format, id: format-4}
- {device: format-4, path: /, type: mount, id: mount-4}
- {device: format-1, path: /boot, type: mount, id: mount-1}
- {device: format-0, path: /boot/efi, type: mount, id: mount-0}
version: 1
The system install runs, but then on next boot I get dumped into the UEFI shell. are there some postinstall commands I need to run to get EFI working?
Thanks in advance.
You might be running into the issue where curtin reorders the UEFI boot order during the installation. It makes the current boot method the first in the boot order. There is an option to disable this.
Including this snippet in the
storage
section of theuser-data
file will disable the UEFI reorder.I've run into this booting from PXE. After install, I end up booting from PXE again instead of booting from the hard drive. I'm not sure why you would end up in the UEFI shell.