refactor: 25.04 is not an Ubuntu LTS release (#15)

* feat: 25.04 is not an Ubuntu LTS release

* doc: removed LTS from Ubuntu 25.04
This commit is contained in:
TheHitman1977
2025-10-13 23:28:07 -05:00
committed by GitHub
parent 8f6d69668b
commit 57d76b51f7
11 changed files with 6 additions and 6 deletions

View File

View File

@@ -0,0 +1,19 @@
network:
network:
version: 2
ethernets:
%{ if ip != null ~}
${device}:
dhcp4: false
addresses:
- ${ip}/${netmask}
gateway4: ${gateway}
nameservers:
addresses:
%{ for item in dns ~}
- ${item}
%{ endfor ~}
%{ else ~}
${device}:
dhcp4: true
%{ endif ~}

View File

@@ -0,0 +1,113 @@
%{~ if length(partitions) == 1 && partitions[0].name == "autopart" ~}
%{~ if partitions[0].format.fstype == "lvm" ~}
storage:
layout:
name: lvm
%{~ endif ~}
%{~ if partitions[0].format.fstype == "simple" ~}
storage:
layout:
name: direct
%{~ endif ~}
%{~ if partitions[0].format.fstype == "" ~}
storage:
layout:
name: direct
%{~ endif ~}
%{~ else ~}
storage:
config:
- ptable: gpt
path: /dev/${device}
wipe: superblock
preserve: false
%{ if vm_bios == "seabios" ~}
grub_device: true
%{ endif ~}
type: disk
id: disk-${device}
%{if vm_bios == "seabios" ~}
- device: disk-${device}
size: 1M
flag: bios_grub
number: 1
preserve: false
type: partition
id: partition-grub
%{ endif ~}
%{ for index, partition in partitions ~}
- device: disk-${device}
%{ if partition.size != -1 ~}
size: ${partition.size}M
%{ else ~}
size: ${partition.size}
%{ endif ~}
wipe: superblock
preserve: false
%{ if partition.mount.path == "/boot" && vm_bios == "seabios" && index == 0 ~}
flag: bios_grub
grub_device: false
%{ endif ~}
%{ if partition.mount.path == "/boot/efi" && index == 0 ~}
flag: boot
grub_device: true
%{ endif ~}
type: partition
id: partition-${partition.name}
%{ if partition.format.fstype != "" ~}
- id: format-${partition.name}
type: format
volume: partition-${partition.name}
label: ${partition.format.label}
fstype: ${partition.format.fstype}
%{ endif ~}
%{ if partition.volume_group == "" && partition.name != "bios_grub" ~}
- id: mount-${partition.name}
type: mount
%{ if partition.mount.path == "" ~}
path: none
%{ else ~}
path: ${partition.mount.path}
%{ endif ~}
device: format-${partition.name}
%{ if partition.mount.options != "" ~}
options: ${partition.mount.options}
%{ endif ~}
%{ endif ~}
%{ endfor ~}
%{ for index, volume_group in lvm ~}
- id: volgroup-${volume_group.name}
type: lvm_volgroup
name: ${volume_group.name}
devices:
%{ for index, partition in partitions ~}
%{ if lookup(partition, "volume_group", "") == volume_group.name ~}
- partition-${partition.name}
%{ endif ~}
%{ endfor ~}
%{ for index, partition in volume_group.partitions ~}
- id: partition-${partition.name}
type: lvm_partition
name: ${partition.name}
size: ${partition.size}M
volgroup: volgroup-${volume_group.name}
- id: format-${partition.name}
type: format
volume: partition-${partition.name}
label: ${partition.format.label}
fstype: ${partition.format.fstype}
- id: mount-${partition.name}
type: mount
%{ if partition.mount.path == "" ~}
path: none
%{ else ~}
path: ${partition.mount.path}
%{ endif ~}
device: format-${partition.name}
%{ if partition.mount.options != "" ~}
options: ${partition.mount.options}
%{ endif ~}
%{ endfor ~}
%{ endfor ~}
%{~ endif ~}

View File

@@ -0,0 +1,29 @@
#cloud-config
autoinstall:
version: 1
early-commands:
- sudo systemctl stop ssh
locale: ${vm_os_language}
keyboard:
layout: ${vm_os_keyboard}
${storage}
${network}
identity:
hostname: ubuntu-server
username: ${build_username}
password: ${build_password_encrypted}
ssh:
install-server: true
allow-pw: true
packages:
- openssh-server
- cloud-init
user-data:
disable_root: false
timezone: ${vm_os_timezone}
late-commands:
- sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config
- echo '${build_username} ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/${build_username}
- curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/${build_username}
- curtin in-target -- apt-get update
- curtin in-target -- apt-get install -y qemu-guest-agent