livefs-editor icon indicating copy to clipboard operation
livefs-editor copied to clipboard

question about enabling cloud-init with u18.04

Open parmentelat opened this issue 2 years ago • 3 comments

hiya

I'm trying to create custom bootcd's from ubuntus 18 20 and 22 that I could use as live-only boot supports I've been kind of successful with 20 and 22 so far, using a hand-made shell script of my own brew - before I stumbled onto this repo which I will probably leverage as it's much cleaner than my own stuff :)

regardless, my approach was working fine with 20 and 22, but fails to work with 18 and I am suspecting the presence of /etc/cloud/cloud-init.disabled to be the root problem

to be more specific:

  • with 20 and 22 I expose another ISO volume named cidata and that is enough for cloud-init to spot it; I can tell that cloud-init performs because my custom ssh keys get installed
  • with 18, there's no .ssh/ created, there is no file named as /var/log/*cloud*, nor does journalctl -u cloud-init.service report anything at all

so I guess I have 3 questions

  1. am I right to suspect the presence of this file to be the root cause of my problem ?
  2. can I use livefs-editor to remove that file in /etc/ ?
  3. more generally, I've taken good note of your disclaimer in the readme :), but in your experience, is it safe to consider editing an image as old as u18.04 with livefs-editor ?

thanks !

parmentelat avatar Feb 25 '23 16:02 parmentelat

as a side note to self, after boot with the u18 image only minimally modified, I can see this

  • if I run systemctl start cloud-init manually, the .ssh/ folder gets created and populated as expected
  • however, there is no ssh server installed in that context !

parmentelat avatar Feb 25 '23 17:02 parmentelat

as a second note, I got an insight on the cloud-init irc libera channel, where I learned that:

providing the extended kernel params after --- cloud-init=enabled will enable cloud-init in BIonic's ephemeral boot stage

so this answers my questions 1 and 2. I guess :) I'm still interested to hear your thoughts about question3, particularly wrt https://discourse.ubuntu.com/t/cloud-init-and-the-live-server-installer/14597 where you announced a change in the u20 installer chain...

parmentelat avatar Feb 25 '23 18:02 parmentelat

18.04 is deprecated in a few weeks, right?

encbladexp avatar Mar 04 '23 20:03 encbladexp