Skip to content

Instantly share code, notes, and snippets.

@danielfaust
Created April 11, 2025 14:25
Show Gist options
  • Save danielfaust/e7d8a21c1e739617236f97f1f7325d66 to your computer and use it in GitHub Desktop.
Save danielfaust/e7d8a21c1e739617236f97f1f7325d66 to your computer and use it in GitHub Desktop.
Ubuntu autoinstall YAML file with custom disk partitioning (EFI, boot, root, backups)
autoinstall:
version: 1
locale: "en_US.UTF-8" # default
refresh-installer:
update: false # default
keyboard:
layout: "us" # default
variant: "" # default
source:
id: ubuntu-desktop-minimal # default
identity:
realname: "ubuntu"
username: ubuntu
password: "$6$_____j1" # Use 'openssl passwd -6' to generate a hash
hostname: ubuntu
timezone: "Europe/Berlin"
ssh:
install-server: true
allow-pw: true
codecs:
install: true
drivers:
install: true
storage:
config:
# disks
- type: disk
id: disk0
name: disk0
ptable: gpt
grub_device: false
# partitions
- type: partition
id: esp
device: disk0
size: 1G
flag: boot
number: 1
wipe: superblock
grub_device: true
- type: partition
id: boot
device: disk0
size: 2G
number: 2
- type: partition
id: root
device: disk0
size: 40G
wipe: superblock
number: 3
- type: partition
id: backups
device: disk0
size: -1
number: 4
# logical volumes
- type: lvm_volgroup
id: vgroot
name: vgroot
devices:
- root
- type: lvm_partition
id: lvroot
name: lvroot
volgroup: vgroot
wipe: superblock
size: 20G
# file systems
- type: format
id: esp-format
volume: esp
fstype: fat32
- type: format
id: boot-format
volume: boot
fstype: ext4
- type: format
id: lvroot-format
volume: lvroot
fstype: ext4
- type: format
id: backups-format
volume: backups
fstype: ext4
# mount points
- type: mount
id: efi-mount
device: esp-format
path: /boot/efi
- type: mount
id: boot-mount
device: boot-format
path: /boot
- type: mount
id: root-mount
device: lvroot-format
path: /
- type: mount
id: backups-mount
device: backups-format
path: /media/backups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment