-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.ks
112 lines (75 loc) · 5.2 KB
/
example.ks
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
text
# Basic partitioning
clearpart --all --initlabel --disklabel=gpt
part prepboot --size=4 --fstype=prepboot
part biosboot --size=1 --fstype=biosboot
part /boot/efi --size=100 --fstype=efi
part /boot --size=1000 --fstype=ext4 --label=boot
part / --grow --fstype xfs
ostreecontainer --url quay.io/jwesterl/bootc-azuresqledge:latest --no-signature-verification
firewall --disabled
services --enabled=sshd
# Only inject a SSH key for root
rootpw --iscrypted locked
# Add your example SSH key here!
sshkey --username root "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuuPjXB3E60BZJNagUbsmMKiQSGfTfigf0z+52sKJq4IUwYw2lKLCta8CGMMhwKM/t0W4GuO5axBKYgky/pVsgh+iyW8Qu6xnpiEkJ40nmI1WiNd+XbzNoP/aSaEDQDCHXpIWQyOPdLO58wPMQtEiAG4VutHEPVquRnu7bNhXayrXE1MNf4a4hX0QMsgIP1aMvgWIPIB6NOK0gFPLkRLMiPct3rpL6iBCJgXLv3MzT3UAL8219AiZmS5chqHjMQymzk+d7IVF/gn4KgHMmU03QSmNgmh79VIHH6ehWDB/QeHWr+ZkP2m4oaZ2B8bU+qdCxrwF87CGowQOV2JmBAh5N [email protected]"
user --name=jwesterl --groups=wheel --password=redhat
sshkey --username jwesterl "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuuPjXB3E60BZJNagUbsmMKiQSGfTfigf0z+52sKJq4IUwYw2lKLCta8CGMMhwKM/t0W4GuO5axBKYgky/pVsgh+iyW8Qu6xnpiEkJ40nmI1WiNd+XbzNoP/aSaEDQDCHXpIWQyOPdLO58wPMQtEiAG4VutHEPVquRnu7bNhXayrXE1MNf4a4hX0QMsgIP1aMvgWIPIB6NOK0gFPLkRLMiPct3rpL6iBCJgXLv3MzT3UAL8219AiZmS5chqHjMQymzk+d7IVF/gn4KgHMmU03QSmNgmh79VIHH6ehWDB/QeHWr+ZkP2m4oaZ2B8bU+qdCxrwF87CGowQOV2JmBAh5N [email protected]"
reboot
# ONLY SCROLL PAST HERE TO SEE THE TEMPORARY UGLY HACKS
# Install via bootupd - TODO change anaconda to auto-detect this
bootloader --location=none --disabled
%post
# Work around anaconda wanting a root password
passwd -l root
/usr/bin/bootupctl backend install --device /dev/vda /
mkdir -p /boot/grub2
# Work around https://github.com/coreos/bootupd/pull/536 not being merged yet
base64 -d >/boot/grub2/grub.cfg << EOF
IyBUaGlzIGZpbGUgaXMgY29waWVkIGZyb20gaHR0cHM6Ly9naXRodWIuY29tL2NvcmVvcy9jb3Jl
b3MtYXNzZW1ibGVyL2Jsb2IvbWFpbi9zcmMvZ3J1Yi5jZmcKIyBDaGFuZ2VzOgojICAgLSBEcm9w
cGVkIElnbml0aW9uIGdsdWUsIHRoYXQgY2FuIGJlIGluamVjdGVkIGludG8gcGxhdGZvcm0uY2Zn
CiMgc2V0IHBhZ2VyPTEKIyBwZXRpdGJvb3QgZG9lc24ndCBzdXBwb3J0IC1lIGFuZCBkb2Vzbid0
IHN1cHBvcnQgYW4gZW1wdHkgcGF0aCBwYXJ0CmlmIFsgLWQgKG1kL21kLWJvb3QpL2dydWIyIF07
IHRoZW4KICAjIGZjY3QgY3VycmVudGx5IGNyZWF0ZXMgL2Jvb3QgUkFJRCB3aXRoIHN1cGVyYmxv
Y2sgMS4wLCB3aGljaCBhbGxvd3MKICAjIGNvbXBvbmVudCBwYXJ0aXRpb25zIHRvIGJlIHJlYWQg
ZGlyZWN0bHkgYXMgZmlsZXN5c3RlbXMuIC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