2

I'm encountering an issue using the autoinstall feature on Ubuntu Server 22.04 LTS. My goal is to deploy a system with a custom storage layout, but the autoinstall process fails during the storage configuration phase. I’m using the following YAML snippet for the configuration:

grub:
  reorder_uefi: false

storage: config: # Initialize disk and BIOS GRUB partition - grub_device: true id: disk-sda path: /dev/sda ptable: gpt type: disk wipe: superblock-recursive - device: disk-sda flag: bios_grub id: grub-part number: 1 size: 1M type: partition

# EFI System Partition
- device: disk-sda
  id: efi-part
  number: 2
  size: 512M
  type: partition
- fstype: fat32
  id: efi-fs
  type: format
  volume: efi-part
- device: efi-fs
  id: efi-mount
  path: /boot/efi
  type: mount

# 4 GB swap partition
- device: disk-sda
  id: swap-part
  number: 3
  size: 4G
  type: partition
- fstype: swap
  id: swap-fs
  type: format
  volume: swap-part
- device: swap-fs
  id: swap-mount
  path: none
  type: mount

# 100 GB root partition
- device: disk-sda
  id: root-part
  number: 4
  size: 100G
  type: partition
- fstype: ext4
  id: root-fs
  type: format
  volume: root-part
- device: root-fs
  id: root-mount
  path: /
  type: mount

# 50 GB home partition
- device: disk-sda
  id: home-part
  number: 5
  size: 50G
  type: partition
- fstype: ext4
  id: home-fs
  type: format
  volume: home-part
- device: home-fs
  id: home-mount
  path: /home
  type: mount

I have verified that /dev/sda is correct for the target disk, and I specifically configured both a BIOS GRUB (with a bios_grub partition) and an EFI System partition. Despite that, the installer does not complete successfully and stops during the storage configuration step.

Any insights, tips, or suggestions would be greatly appreciated.

Edit: I've verified that the rest of my autoinstall file works perfectly by just using:

storage:
  layout:
    name: lvm

However, I want to specifically configure the storage to the above configuration.

glitchbox
  • 23
  • 3

1 Answers1

1

You're missing a few configuration keys.

In the EFI section you need to set flag: boot and grub_device: true as follows:

    # EFI System Partition
    - device: disk-sda
      id: efi-part
      number: 2
      size: 512M
      type: partition
      flag: boot
      grub_device: true
    - fstype: fat32
      id: efi-fs
      type: format
      volume: efi-part
    - device: efi-fs
      id: efi-mount
      path: /boot/efi
      type: mount

For the swap partition, you need to set flag: swap:

    # 4 GB swap partition
    - device: disk-sda
      id: swap-part
      number: 3
      size: 4G
      type: partition
      flag: swap
    - fstype: swap
      id: swap-fs
      type: format
      volume: swap-part
    - device: swap-fs
      id: swap-mount
      path: none
      type: mount
mpboden
  • 3,046