Created
July 16, 2020 05:18
-
-
Save anedward01/b68e00bb2dcfa4f1335cd4590cbc8484 to your computer and use it in GitHub Desktop.
autoinstall data files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
instance-id: iid-local01 | |
hostname: cloudimg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
# This file is for demonstration purposes only. Using this file to for automatic installations | |
# not recommended. For help creating a proper file, visit https://www.edwardssite.com/cloud-init. | |
autoinstall: | |
apt: | |
geoip: true | |
preserve_sources_list: false | |
primary: | |
- arches: [amd64, i386] | |
uri: http://us.archive.ubuntu.com/ubuntu | |
- arches: [default] | |
uri: http://ports.ubuntu.com/ubuntu-ports | |
identity: {hostname: autoinstall-test-device, password: hunter2, | |
realname: Edward A, username: anedward01} | |
keyboard: {layout: us, variant: ''} | |
locale: en_US | |
# Network interface configuration. Interface name device-specific. Requires modification. | |
# Network is nested twice per new autoinstall layout. | |
network: | |
network: | |
ethernets: | |
enp4s0: {dhcp4: true} | |
version: 2 | |
# SSH configuration along with keys go here. | |
ssh: | |
allow-pw: true | |
authorized-keys: [] | |
install-server: true | |
# Storage configuration. This can be edited manually, but not recommended. Using | |
# a pre-configured file is the best solution to avoid potential errors. | |
storage: | |
config: | |
- {ptable: gpt, path: /dev/sda, | |
wipe: superblock, preserve: false, name: '', grub_device: false, type: disk, | |
id: disk-sda} | |
- {device: disk-sda, 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-sda, 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-sda, size: 62410194944, wipe: superblock, flag: '', number: 3, | |
preserve: false, type: partition, id: partition-2} | |
- {volume: partition-2, key: hunter2, preserve: false, type: dm_crypt, | |
id: dm_crypt-0} | |
- name: ubuntu-vg | |
devices: [dm_crypt-0] | |
preserve: false | |
type: lvm_volgroup | |
id: lvm_volgroup-0 | |
- {name: ubuntu-lv, volgroup: lvm_volgroup-0, size: 31195136000B, preserve: false, | |
type: lvm_partition, id: lvm_partition-0} | |
- {fstype: ext4, volume: lvm_partition-0, preserve: false, type: format, id: format-2} | |
- {device: format-2, path: /, type: mount, id: mount-2} | |
- {device: format-1, path: /boot, type: mount, id: mount-1} | |
- {device: format-0, path: /boot/efi, type: mount, id: mount-0} | |
version: 1 | |
# Post-install packages to download and include. These are used to install TPM2KeyUnlock | |
# and can be replaced or removed entirely. | |
packages: | |
- autoconf-archive | |
- m4 | |
- libgcrypt20-dev | |
- libjson-c-dev | |
- uuid-dev | |
- libcmocka0 | |
- libcmocka-dev | |
- build-essential | |
- git | |
- pkg-config | |
- gcc | |
- g++ | |
- m4 | |
- libtool | |
- automake | |
- autoconf | |
- libdbus-glib-1-dev | |
- libssl-dev | |
- cmake | |
- libssl-dev | |
- libcurl4-gnutls-dev | |
- doxygen | |
- efitools | |
- tpm2-abrmd | |
- tpm2-tools | |
# Commands to run post-install. The new OS installation is located at /target. | |
# This installs TPM2KeyUnlock on TPM2-compatible systems. Different commands can be added. | |
# All chroot commands are included in one line. Running chroot followed by another command | |
# does not work as the system turns to user input instead of continuing late-commands. | |
late-commands: | |
- mount -t proc proc /target/proc | |
- mount -o bind /dev /target/dev | |
- chroot /target /bin/bash -c "cd /usr/local/src; git clone https://github.com/anedward01/tpm2keyunlock; cd tpm2keyunlock; chmod +x setup; ./setup" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment