Skip to content

Commit b8d880c

Browse files
committed
cleaning up Ubuntu guide
1 parent a4f3b75 commit b8d880c

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

_posts/2024-12-11-Cobbler-v3.3.7-Ubuntu-Deployment-Guide.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ Cobbler v3.3.7 does not come with a sample template for the `cloud-init` autoins
3434

3535
Create the `cloud-init` autoinstall template with the following contents and save it to `/var/lib/cobbler/templates/cloud-init_user-data`:
3636

37-
> Cobbler Templates and Snippets are actually Python Cheetah templates, so be careful editing the files, especially the cheetah code preceded buy `#`
37+
> Cobbler Templates and Snippets are actually Python Cheetah templates, so keep in mind that not all `#`'s in the below 3 files represent comments.
3838
3939
```shell
4040
#cloud-config
4141
autoinstall:
4242
version: 1
4343
apt:
44-
# even set to no/false, geoip lookup still happens
45-
#geoip: no
44+
## even set to no/false, geoip lookup still happens
45+
##geoip: no
4646
preserve_sources_list: true
4747
primary:
4848
- arches: [amd64, i386]
4949
uri: http://$http_server/cblr/links/$distro
50-
# uri: http://us.archive.ubuntu.com/ubuntu
50+
## uri: http://us.archive.ubuntu.com/ubuntu
5151
- arches: [default]
52-
# uri: http://$http_server/cblr/links/$distro
52+
## uri: http://$http_server/cblr/links/$distro
5353
uri: http://ports.ubuntu.com/ubuntu-ports
5454
fallback: offline-install
5555
identity:
@@ -83,7 +83,6 @@ $SNIPPET('cloud-init_network')
8383
#end if
8484
- wget -O /target/tmp/autoinstall-user-data.yaml http://$http_server/cblr/svc/op/autoinstall/$what/$name
8585
- chroot /target /bin/bash -s ssh-keygen -t rsa -b 2048 -m ssh2 -N "" -f /root/.ssh/id_rsa
86-
# - rm /target/etc/apt/apt.conf.d/99needrestart # This prompt will prevent the apt command from completing
8786
```
8887

8988
> the `fallback: offline` option under the apt configuration will use the live CD (.iso file) as the source to install Ubuntu from if there is an issue connecting to a remote repo mirror, and was only introduced as of [Ubuntu 22.04 release](https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668).
@@ -268,7 +267,7 @@ The above autoinstall template calls for 2 Cobbler snippets; create them with th
268267
#end if
269268
```
270269

271-
> This section should resemble the [netplan](https://netplan.readthedocs.io/en/latest/netplan-yaml/) network configuration standard to Ubuntu once generated.
270+
> This section should resemble the standard [netplan](https://netplan.readthedocs.io/en/latest/netplan-yaml/) YAML configuration file for Ubuntu once generated.
272271
273272
Create 2 Cobbler sync-triggers to correct the GRUB and PXELINUX boot configurations to support Ubuntu `cloud-init` installations, which will run each time the `cobbler sync` action is performed:
274273

@@ -466,6 +465,14 @@ cobbler sync
466465

467466
1. The [Cobbler 3.3.6 Beginner's Guide](/blog/2024/Cobbler-v3.3.6-Beginners-Guide/) **Tips & Troubleshooting** section contains some basic recommendations and limitations of Cobbler which will not be repeated here.
468467

468+
1. Troubleshooting the installation
469+
470+
- The Ubuntu installer will reboot the system automatically upon completing a `cloud-init` auto-install. To prevent this, append the following line to the end of the autoinstall template (`cloud-init_user-data`) as the final command int the `late-commands:` section *(be sure the spacing/indentation aligns with the rest of the `late-command` entries)*:
471+
472+
```shell
473+
- rm /target/etc/apt/apt.conf.d/99needrestart
474+
```
475+
469476
1. More info on `cloud-init`
470477

471478
- [https://cloudinit.readthedocs.io/en/22.1_a/topics/modules.html](https://cloudinit.readthedocs.io/en/22.1_a/topics/modules.html)

0 commit comments

Comments
 (0)