Score:0

I'm trying to get the autoinstall working for Ubuntu server 22.04 but the installer doesn't seem to pick up the instructions

tk flag

I'm trying to get the most basic Ubuntu Server headless installation scenario working. I trimmed my user-data yaml file down to the bare minimum.

#cloud-config
version: 1
identity:
   hostname: headless2204
   username: batman
   password: topsecret
   package_upgrade: false

ssh:
   install-server: yes
   allow-pw: yes

Together with an empty meta-data file I placed it into the /nocloud-net folder.

As for grub.cfg, I added:

menuentry "Headless Ubuntu Server Installation" {
    set gfxpayload=keep
    linux /casper/vmlinuz  quiet autoinstall ds=nocloud-net\;s=/cdrom/nocloud-net/ ---
    initrd /casper/initrd.gz
}

The only shortcut I've taken was that I popped up an Ubuntu Desktop VM and launched Cubic instead of CLI tools and xorriso. Is there any difference between them? Cubic seems to be doing exactly the same thing.

My custom image boots just fine, the updated grub.cfg works, however the Ubuntu installer doesn't seem to pick up the autoinstall config. It just works the standard way. When I switch to a different terminal session (Ctrl+F2) during the installation to check the logs, there is nothing autoinstall related. I could only find cloud-init stuff but nothing helpful there.

Do you have any ideas about fixing or debugging it?

Andrew Lowther avatar
jp flag
To start, your `user-data` file does not have an `autoinstall` section. Compare your `user-data` file to any working example.
Boris avatar
tk flag
Andrew thank you for your comment. Unfortunately, adding an autoinstall line to the config made no difference.
Boris avatar
tk flag
Got it working: user-data: '''none #cloud-config autoinstall: version: 1 identity: hostname: headless2204 username: batman password: <mkpasswd -m sha-512 topsecret> ssh: install-server: yes allow-pw: yes ''' grub.cfg: '''none menuentry "Headless Ubuntu Server Installation" { set gfxpayload=keep linux /casper/vmlinuz "ds=nocloud;s=/cdrom/nocloud/" quiet autoinstall --- initrd /casper/initrd.gz } ''' Would be nice to see the documentation updated.
mpboden avatar
do flag
Could you please add your comment as an answer and checkmark it? As a comment, the formatting is lost. Additionally, could you add an explanation of what solved the issue and where you found the info?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.