Then I modified Grubs txt.cfg to add the autoinstall parameter:
label autoinstall
menu label ^Install Ubuntu Server unattended
kernel /casper/vmlinuz
append initrd=/casper/initrd autoinstall quiet ---
This runs the autoinstall with the given .yml file.
Just using the content from the /var/log/installer/autoinstall-user-data file of my previous installation resulted in similar errors as @jinxcappa described:
None is not of type ‘string’
I removed the attribute instead of setting it to ‘’, which worked for me. I also had to add version:1 below autoinstall:.
Now I’m also stuck at the point
Command ‘[‘netplan’, ‘apply’]’ returned non-zero exit status 1
Next problem: Can I add multiple autoinstall configurations? On my previous ISO I had multiple preseed files with corresponding menu entries on the boot screen.
Trying to do the same with the new method I got the message
Confirmation is required to continue.
Add ‘autoinstall’ to your kernel command line to avoid this
when I booted from the second configuration. It seems that the parameter autoinstall is not just a name for the configuration to load, but a keyword.
How can I place multiple autoinstall configurations on a .iso?
I’m planning a nuke-and-pave for my server now that 20.04 is out and I’m interested in using autoinstall (with either the server or netinstall USB ISOs) to automate the early installation, such as:
Partitioning the SSD (ESP/boot.ext4/root.xfs)
Set hostname, network (DHCP)
Install a few packages (e.g., openssh-server, build-essential, etc.)
Add a specified user with SSH authorized key and sudo permissions
Once those steps are complete, I should be able to connect to the server with Ansible and provision it fully from there.
Right now, I’m trying to figure out how to access autoinstall in VirtualBox (6.1.6 as of this writing) to model it before trying it on the live server, but I’m feeling a bit lost. Must the autoinstall be served via HTTP or can it be local? Could I put it on another disk plugged into the machine, like a USB drive? I’m thinking here of the way Kickstart will look for a volume labeled “OEMDRV” and then pull the Kickstart config from there. Here’s a rough screenshot of what I’m talking about. Is that possible with autoinstall? How would I use GRUB’s command line to tell the server/netinstall disc to load an autoinstall (and/or cloud-config) file from a second disk that’s plugged in?
We’re aiming to have some kind of ZFS support in 20.10 / 20.04.2. It will probably not support many options
.
One aim I had that I admit I have mostly forgotten is to allow people to use curtin storage features that subiquity itself does not support. I should see if I can make that possible somehow.
The long, random password for the ‘installer’ user is in the cloud-init output on the console but probably a bit hard to find in amongst everything else. Or you can put a user config with ssh keys into the user-data you give the live session.
Also oops. Both of these should be easy to fix, at least.
Yes, this is a good idea.
There is also /var/log/cloud-init-output.log but I’m not sure it helps with this. It’s always hard to debug why something isn’t happening! Looking in /var/lib/cloud/instance/datasource or the output of ‘cloud-init query’ might help.
Oh argh. I’ll fix this one soon so that the double network key is not necessary (but leave some code in so it works).
You can put ds=nocloud,s=/autoinstall-variant1 on the kernel command line (and put user-data and meta-data files into the /autoinstall-variant1 directory). Or you can have an early-command swap a different yaml file into place depending on a marker you put into the kernel command line.
All this should be very straightforward.
Yes, you can use a filesystem with the cidata (or CIDATA) label for this. As I replied to someone else earlier Comment #4 : Bug #1869291 : Bugs : subiquity has a recipe for this, but I do need to write this up somewhere.
The issue is that I can’t use another ISO file, only USB drive.
And when I try to do that I am not seeing that installer copies cloud init seed into ‘/var/…’
Moment of enlightenment: It occurred to me to check /proc/cmdline, and I discovered that the ; character in the cloud-init config string was causing a problem: When typed directly into the grub console (as packer does), it needs to be escaped to avoid being interpreted as a line feed. This is obviously not necessary when executed via KVM. Probably worth noting in the docs for people who forget that grub’s console is a shell-like environment and passing the kernel command line through that environment represents a(nother) level of escaping.
I am now at least to the point that the config is downloading into the VM and failing schema validation ( ), so I think my noteworthy issues are resolved and the rest is just development work. Thanks for the help everyone.