Skip to content

Commit 97ab5f0

Browse files
committed
Add ubuntu desktop autoinstall
1 parent 3cf4a4c commit 97ab5f0

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
```
2+
curl -LO https://releases.ubuntu.com/24.04.2/ubuntu-24.04.2-desktop-amd64.iso
3+
% shasum -a 256 ubuntu-24.04.2-desktop-amd64.iso
4+
d7fe3d6a0419667d2f8eff12796996328daa2d4f90cd9f87aa9371b362f987bf ubuntu-24.04.2-desktop-amd64.iso
5+
6+
docker pull docker.io/boxcutter/ubuntu-autoinstall
7+
docker run -it --rm \
8+
--mount type=bind,source="$(pwd)",target=/data \
9+
docker.io/polymathrobotics/ubuntu-autoinstall \
10+
-a autoinstall.yaml \
11+
-g grub.cfg \
12+
-i \
13+
-s ubuntu-24.04.2-desktop-amd64.iso \
14+
-d ubuntu-autoinstall-NUC9v7QNX.iso
15+
```
16+
curl -LO https://releases.ubuntu.com/24.04.2/ubuntu-24.04.2-live-server-amd64.iso
17+
% shasum -a 256 ubuntu-24.04.2-live-server-amd64.iso
18+
d6dab0c3a657988501b4bd76f1297c053df710e06e0c3aece60dead24f270b4d ubuntu-24.04.2-live-server-amd64.iso
19+
20+
docker pull docker.io/boxcutter/ubuntu-autoinstall
21+
docker run -it --rm \
22+
--mount type=bind,source="$(pwd)",target=/data \
23+
docker.io/polymathrobotics/ubuntu-autoinstall \
24+
-a autoinstall.yaml \
25+
-g grub.cfg \
26+
-i \
27+
-s ubuntu-24.04.2-live-server-amd64.iso \
28+
-d ubuntu-autoinstall-NUC9v7QNX.iso
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#cloud-config
2+
autoinstall:
3+
version: 1
4+
network:
5+
version: 2
6+
ethernets:
7+
# Intel I219-LM interface that supports vPro/AMT pass-through
8+
eno1:
9+
dhcp4: true
10+
dhcp6: false
11+
optional: true
12+
# Intel I210-AT standalone gigabit ethernet
13+
enp113s0:
14+
dhcp4: true
15+
dhcp6: false
16+
optional: true
17+
wlp4s0:
18+
dhcp4: true
19+
dhcp6: false
20+
optional: true
21+
bridges:
22+
br0:
23+
interfaces:
24+
- eno1
25+
dhcp4: true
26+
dhcp6: false
27+
storage:
28+
layout:
29+
name: lvm
30+
sizing-policy: all
31+
ssh:
32+
install-server: true
33+
allow-pw: true
34+
late-commands:
35+
# Because we're using preserve_hostname to allow manual setting
36+
# of the hostname, set an initial hostname manually
37+
- echo robot00 > /target/etc/hostname
38+
- curtin in-target -- sed -ie 's/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=30/' /etc/default/grub
39+
- curtin in-target -- sed -ie 's/GRUB_TIMEOUT_STYLE=.*/GRUB_TIMEOUT=countdown/' /etc/default/grub
40+
- curtin in-target -- update-grub
41+
user-data: # cloud-init starts here
42+
preserve_hostname: true
43+
users:
44+
- name: automat
45+
uid: 63112
46+
primary_group: users
47+
groups: users
48+
shell: /bin/bash
49+
plain_text_passwd: superseekret
50+
sudo: ALL=(ALL) NOPASSWD:ALL
51+
lock_passwd: false
52+
ssh_authorized_keys:
53+
# taylor
54+
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINRK4hkcpUiaSkiLEytgwMYcKylBioXPLx1TnwJFrLPl mahowald
55+
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINy9cJcJl8oN6bRtcBc4RZq8f/T6P1AFR3YS1YRYi5YY sheila
56+
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHGTw44QBehDXY6ebitrYydyAAhDFLBSkQ59RovcVsvX joan
57+
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMWwrOVfOWfax6HR4Y+Mg01jT9No2zXHqkATnqwHuFKU emily
58+
chpasswd: {expire: false}
59+
ssh_pwauth: true
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
set timeout=30
2+
3+
loadfont unicode
4+
5+
set menu_color_normal=white/black
6+
set menu_color_highlight=black/light-gray
7+
8+
menuentry "Ubuntu Desktop Autoinstall" {
9+
set gfxpayload=keep
10+
linux /casper/vmlinuz autoinstall ds=nocloud\;s=/cdrom/nocloud/ ---
11+
initrd /casper/initrd
12+
}
13+
menuentry "Try or Install Ubuntu" {
14+
set gfxpayload=keep
15+
linux /casper/vmlinuz --- quiet splash
16+
initrd /casper/initrd
17+
}
18+
menuentry "Ubuntu (safe graphics)" {
19+
set gfxpayload=keep
20+
linux /casper/vmlinuz nomodeset --- quiet splash
21+
initrd /casper/initrd
22+
}
23+
grub_platform
24+
if [ "$grub_platform" = "efi" ]; then
25+
menuentry 'Boot from next volume' {
26+
exit 1
27+
}
28+
menuentry 'UEFI Firmware Settings' {
29+
fwsetup
30+
}
31+
else
32+
menuentry 'Test memory' {
33+
linux16 /boot/memtest86+x64.bin
34+
}
35+
fi

0 commit comments

Comments
 (0)