Create an autoinstall tag on https://askubuntu.com/ (must have 300+ reputation to create) to help group usage questions around autoinstall that are posted there.
Offer better ways to debug and understand failed late-commands.
I realize that last suggestion is quite nebulous. It stems from a failing late-command using modprobe and my lack of ability to see into the error. To make some concrete suggestions around this, perhaps the documentation could:
Better explain conceptually and more prominently that curtin in-target is effectively a way to run chroot’d commands in the target
What factors are “different” about this environment from e.g. a normal login to the box after it’s fully spun up
Usage of something like /usr/bin/tail -n 250 /var/log/syslog in error-commands to get hopefully some more debugging detail on failed commands since they are executed through systemd-cat vis a vis curtin
could you please focus to implement possibility to run autoinstall fully offline, even if the network is configured, preffered for IoT/Edge devices with wwan connection
most of us are rebuilding the official iso to our needs and not only applying latest patches, but also including security hardenings
if you have the need of an IoT/Edge tailored OS with WWAN support (and adapted data-handling behaviour for WWAN), special security hardening and a rolling release model, have you taken a look at Ubuntu Core yet ? It is designed for particulary this use case and used a lot in IoT/Edge, PLCs, Industrial gateways, Digital Signage and POS systems around the world …
Pre-installing the package ifenslave seems to break the installer.
I’ve been working on a solution to preinstall some packages to make it possible to setup offline targets.
I’ve come up with a script that mounts casper/filesystem.squashfs, chroot-install some packages, configures my autoinstall script (nocloud) and repacking everything into a new filesystem.squashfs. It’s heavily inspired on inject-subiquity-snap.sh following mwhudson’s suggestions : Automated Server Install Quickstart.
But preinstalling ifenslave makes the installer to crash.
I’m trying to get this to work with a more complex LVM setup, but I get a general error during installation. The user-data file parses and validates correctly it would seem, since I’m offered the chance to type “yes” and begin the autoinstall, but I just get an install_fail error from Subiquity after it sets up the partitions.
I’ve tried to reduce this down to what I think is the simplest version of this possible, so I can get it to work before I set up a much more complex layout with more LVM volumes, but I can’t work out what I’m doing wrong here to have it fail:
Edit: I worked out what i was doing wrong and have replaced my storage: section below with a working one. For reference, if anyone faces similar issues in the future, make sure that the device: keys in your mount: stanzas reference the id field from your format stanza, and don’t reference the partition or LVM volume directly.
Hitting a new issue now - Does the Ubuntu Autoinstall actually support the Curtin syntax for providing options to a mount setting within a config stanza for storage?
I’ve been trying to use the config: option to provide additional settings for the storage: stanza, but I can’t get the options: to take effect in the installed system. A short example of just a mount stanza that I’m trying to use:
The additional options I provide aren’t used when I run mount on a running system, and they’re also not copied into /etc/fstab like the Curtin docs suggest they should be:
curtin will ensure the target OS uses the provided mount options by updating the target OS (/etc/fstab).
Yes, but only in fairly new versions – subiquity version 21.04.1 or newer, so Ubuntu 21.04 is the only released version that supports it, but if you take a focal daily or upgrade the snap during install it should work (the upgrade isn’t offered by default to users of 21.04.2 media because it crashes interactively but if you say refresh: yes channel: stable in an autoinstall it should work). Or wait a couple of weeks for 21.04.3.
It’s worth noting that it seems to be very picky about the mount options being quoted strings and refuses to go any further if they aren’t quoted. Just one for people to be aware of.
I don’t want to wait on autoupdates because I don’t have access to anything in the outside world. I’m sitting in a DMZ and can only see my local subnet, therefore everything I need has to be on the ISO that’s doing the install. So I need the network up but no autoupdates. Security updates will come later as a separate process to all servers.
Update: so yes, it would be nice to have an option to tell autoinstall not to even try doing the autoupdates.
Did you ever figure out if this is problematic? I need the system to either power down or pause on keypress before it reboots.
I have tried read -t which throws an error (anyone know why?), and I have been hesitant to force a powerdown until I was confident there weren’t any side-effects.
Longtime user of preseed so I’m still getting the hang of the new installation tooling, and I have run into a problem for which I am having no luck finding a solution.
Specifically, right after the ramdisk loads and before cloud-init itself starts, there’s a step to request an address via DHCP, and and DHCPDISCOVER packets are sent out on all connected interfaces.
I need some help sorting out how to restrict this to a specific interface (selected by MAC or logical name), as we have scores of servers with multiple interfaces and if the wrong NIC is used to bootstrap, the automated install will fail.
Historically the preseed keyword interface (and the netcfg attribute family in general) could be used to control which NIC was used, but that doesn’t seem to work anymore.
I could use a hand identifying which option(s) I need to use, and suitable values for them.
and yeah I’m still forcing the kernel to use legacy interface naming but due to the sheer quantity and variety of hardware in our data centers, using systemd’s logical naming convention instead is total a non-starter.
Username1 gets created and works, username2 doesn’t, what am I doing wrong? Having looked at some more docs, I’ve now also tried “passwd:” instead of password, “name” instead of username as well as lock-passwd: false, but the user simply isn’t getting created at all.
EDIT: solved by removing identity section altogether and defining all users under user-data. Mind you, you will want lock-passwd: false and deliberately define Bash as the shell unless you really do want SH.