-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoinstall_peta.yaml
More file actions
156 lines (129 loc) · 3.99 KB
/
autoinstall_peta.yaml
File metadata and controls
156 lines (129 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
autoinstall:
version: 1
packages:
- ubuntu-desktop
- ansible
- ssh-askpass
- network-manager
- zfsutils-linux
identity:
username: local
password: '$6$o3X2GvDvHs7b1xE1$eXZsqs8sIMwMExDr.HUztoPB/aaGsxIXXE6pLln7stPeb7moOulKxkQJnOqDnrsN1rxHbx3LX8kJO8WQ7jGay1'
hostname: fhmlm4i-nano005
locale: en_US.UTF-8
keyboard:
layout: us
variant: euro
timezone: geoip
codecs:
install: true
drivers:
install: true
ssh:
allow-pw: true
authorized-keys: []
install-server: true
# exa and peta use zfs pools, so these are configured in late-commands
# exa and peta are also configured to use remaining space on device for a swap partition
storage:
config:
- id: os_disk
type: disk
ptable: gpt
match:
serial: '*30000d17022f968b*'
wipe: superblock
preserve: false
grub_device: true
- id: efi_partition
type: partition
device: os_disk
size: 256M
flag: boot
grub_device: true
- id: boot_partition
type: partition
device: os_disk
size: 384M
flag: boot
- id: root_partition
type: partition
device: os_disk
size: 200G
- id: swap_partition
type: partition
device: os_disk
size: -1
- id: efi_format
type: format
fstype: fat32
volume: efi_partition
- id: boot_format
type: format
fstype: ext4
volume: boot_partition
- id: root_format
type: format
fstype: ext4
volume: root_partition
- id: swap_format
type: format
fstype: swap
volume: swap_partition
- id: efi_mount
type: mount
device: efi_format
path: /boot/efi
- id: boot_mount
type: mount
device: boot_format
path: /boot
- id: root_mount
type: mount
device: root_format
path: /
- id: swap_mount
type: mount
device: swap_format
path: none
early-commands:
- echo 'linux-generic-hwe-24.04' > /run/kernel-meta-package
late-commands:
# Changing from networkd to NetworkManager
# move existing config out of the way
- find /target/etc/netplan/ -name "*.yaml" -exec sh -c 'mv "$1" "$1-orig"' _ {} \;
# Create a new netplan and enable it
- |
cat <<EOF | sudo tee /target/etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: NetworkManager
EOF
- curtin in-target --target /target netplan generate
- curtin in-target --target /target netplan apply
- curtin in-target --target /target systemctl enable NetworkManager.service
# Create ZFS mount points
- mkdir -p /target/mnt/ssd
- mkdir -p /target/mnt/localscratch
# I installed zfs in ubuntu 24.04 and noticed these are enabled by default. Leaving them here for reference.
# - curtin in-target -- systemctl enable zfs-import-cache.service
# - curtin in-target -- systemctl enable zfs-mount.service
# - curtin in-target -- systemctl enable zfs.target
# Remove default filesystem and related tools not used with the suggested
# 'direct' storage layout. These may yet be required if different
# partitioning schemes are used.
- >-
curtin in-target -- apt-get remove -y
btrfs-progs cryptsetup* lvm2 xfsprogs
# Remove other packages present by default in Ubuntu Server but not
# normally present in Ubuntu Desktop.
- >-
curtin in-target -- apt-get remove -y
ubuntu-server ubuntu-server-minimal ncurses-term open-iscsi sg3-utils
sosreport open-vm-tools landscape-common
# Keep cloud-init, as it performs some of the installation on first boot.
- curtin in-target -- apt-get install -y cloud-init
# Finally, remove things only installed as dependencies of other things
# we have already removed.
- curtin in-target -- apt-get autoremove -y
shutdown: poweroff