I created my own elemental derivative image and I ...
# elemental
w
I created my own elemental derivative image and I have the elemental cli tool installed on it. I can create a seed image iso with it and I am able to boot the iso, however on boot it doesn't seem to install anything. My custom iso just stays in live mode when I boot it. In a typical elemental installation it seems the elemental-register --install command is automatically triggered on boot, which installs the iso and reboots the machine. I am wondering what calls the elemental-register command? Is there something else I need to add on my custom iso instead of just the elemental cli?
f
also what features are you configuring with the
elemental init
command in your derivative? I recall it's
elemental-setup
feature that creates the service files for elemental to run at boot, you may miss that (reference)
w
I am installing whatever the default features are for elemental-init
elemental init --debug --force
In my /system/oem/ folder on my livecd I only see these files
Where do those yip files get created? I am wondering if I need to create those on my system. Also how do those get called? Do they get called by elemental init?
f
if you are making a derivative then the expected file should be there already, I think the elemental-setup feature is the only thing you miss, this feature creates all the systemd unit files so that the stages are executed, this is part of the init initialization process: https://github.com/rancher/elemental-toolkit/tree/main/pkg/features/embedded/elemental-setup/etc/systemd/system
w
I am not creating a derivative from the elemental os base image. I am using my own base image. Is this why I am missing the files? The systemd unit files you mentioned are on my livecd and in place, I dont think thats the issue I could be wrong though.
f
oh yes, then definitely you need to populate your /system/oem with the same file
w
ok so then how does that /system/oem files get triggered?
f
By default,
elemental
reads the yaml configuration files from the following paths in order:
/system/oem
,
/oem
and
/usr/local/cloud-config
. (ref)
w
ok cool that makes sense
Thanks for the help!
I will probably have a few more questions here later.
f
the
if: '[ -f /run/elemental/live_mode ]'
will also make the yip run only in live mode, the file can continue to live in the filesystem but will just be skipped afterwards
w
ohh ok cool
f
you may want to check the other default files from the Elemental image, like this one to start the needed elemental-system-agent: https://github.com/rancher/elemental/blob/v2.2.1/framework/files/system/oem/99_elemental_system_agent.yaml
some things may not work otherwise, like if want to bootstrap a Cluster with your machines
w
Ok sweet yeah I will be wanting to do that
thanks again!
I did notice on an elemental image that does work there are systemd unit files for elemental-register service and stuff like that. Will I need those files as well?
Nevermind you answered that question earlier with your first link.
f
actually, I missed part of the puzzle, you also may want to look at the services, the elemental-register-install.service for example used in the first yip I linked: https://github.com/rancher/elemental/tree/main/framework/files/usr/lib/systemd/system
w
I am running into an issue now where when elemental install runs I run out of space on some workingTree folder. Its something with the rsync, but I have my disk I am installing to 200GB. I feel like that should be plenty of space I can get error in a second here. Just wondering if you had any ideas.
f
by the way, unless you are trying to build another distribution, you can simply modify the Elemental image:
Copy code
FROM <http://registry.suse.com/suse/sl-micro/6.1/baremetal-os-container:latest|registry.suse.com/suse/sl-micro/6.1/baremetal-os-container:latest>
w
yeah I am trying to build another distribution
so finding out a little more, it seems like when the elemental install command gets triggered, it creates a loop device. That loop device eventually runs out of space somehow. Still looking into it