Since my previous comment I have learned that Ubuntu server saves its cloud-init install config, including disk partitioning in /var/log/installer/autoinstall-user-data
Great! So that's got me an almost fully working config. Now I just need to genericise it for use in my script which should only amount 3 things:
* Change gpt to mbr
* Remove the disks serial ID and any disk UUID sort of stuff
* Get cloud init to use the full space of the disk
Its that third point I'm not quite sure how to achieve currently. Subiquity inserts a size: field for each partition it creates into autoinstall-user-data. I tried removing the size: field hoping that it would default to using the full remaining space after the bios boot partition but subiquity didn't like this.
Does a disk size need to be specified for each partition? Is there no "use rest of space on disk" cloud-init function I can use when defining a partition?
Here's my updated, non-working attempt at a cloud-init file:
Since my previous comment I have learned that Ubuntu server saves its cloud-init install config, including disk partitioning in /var/log/ installer/ autoinstall- user-data
Great! So that's got me an almost fully working config. Now I just need to genericise it for use in my script which should only amount 3 things:
* Change gpt to mbr
* Remove the disks serial ID and any disk UUID sort of stuff
* Get cloud init to use the full space of the disk
Its that third point I'm not quite sure how to achieve currently. Subiquity inserts a size: field for each partition it creates into autoinstall- user-data. I tried removing the size: field hoping that it would default to using the full remaining space after the bios boot partition but subiquity didn't like this.
Does a disk size need to be specified for each partition? Is there no "use rest of space on disk" cloud-init function I can use when defining a partition?
Here's my updated, non-working attempt at a cloud-init file:
#cloud-config components: [] sources_ list: false gb.archive. ubuntu. com/ubuntu ports.ubuntu. com/ubuntu- ports rgbG$oSAwiMQ9GH /5gs5ZaNPlnIIpp 6k7eFQ4ZSw7aTTN ZRfnSMoUi7MRI3G XjalcB6ykXYF8SU QE5c6CPsvlXOC1w 1 keys: [] recursive
autoinstall:
apt:
disable_
geoip: true
preserve_
primary:
- arches:
- amd64
- i386
uri: http://
- arches:
- default
uri: http://
drivers:
install: false
identity:
hostname: ltspbase
password: $6$aPM6zZtkZeD2
realname: ubuntu
username: ubuntu
kernel:
package: linux-generic
keyboard:
layout: gb
toggle: null
variant: ''
locale: en_GB.UTF-8
network:
ethernets:
enp0s3:
dhcp4: true
version: 2
ssh:
allow-pw: true
authorized-
install-server: false
storage:
config:
- ptable: mbr
path: /dev/sda
wipe: superblock-
preserve: false
name: ''
grub_device: true
type: disk
id: disk-sda
- device: disk-sda
size: 1048576
flag: bios_grub
number: 1
preserve: false
grub_device: false
type: partition
id: partition-0
- device: disk-sda
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-0
- path: /
device: format-0
type: mount
id: mount-0
updates: security
version: 1