trinityX icon indicating copy to clipboard operation
trinityX copied to clipboard

Boot variables for part/post scripts

Open msteggink opened this issue 1 year ago • 1 comments

By default, the luna installer doesn't expose a lot of variables which can be used in the part script. However some variables are only filled in after the installer starts or not exported at all but they are known upfront.

For example LUNA_IMAGEFILE is filled in after the part script but when the node boots it is known, just not exported.

Could you make them available, e.g. in templ_nodeboot.cfg, so they can be picked up by the installer via /proc/cmdline:

luna.osimage={{ LUNA_OSIMAGENAME }}

Result should be something like

# cat /proc/cmdline
kernel root=luna luna.bootproto=static luna.mac=aa:bb:cc:dd:ee:ff luna.ip=10.141.0.1/24 luna.gw= {snip} initrd=initrd.img boot=ramdisk luna.osimage=compute-rhel-9.4

Or as export in the installer templ_install.cfg:

export LUNA_OSIMAGENAME={{ LUNA_OSIMAGENAME }}

There may be more which can be useful during boot:

  • osimage name
  • osimage distribution
  • osimage_osrelease
  • groupname

msteggink avatar Jun 04 '24 19:06 msteggink

not everything is available at the various stages in an attempt to be more optimized (overhead reduction). It would be helpful to have a list of variables to have so we can work towards it instead of trying to provide everything. I leave this one up to you.

-A

aphmschonewille avatar Jun 13 '24 08:06 aphmschonewille

did not hear about the subject for quite a while. would this still be useful or is there a list of to be exported variables?

aphmschonewille avatar Oct 23 '24 07:10 aphmschonewille

No further feedback. Will close the ticket. Thanks for your input.

aphmschonewille avatar Feb 14 '25 20:02 aphmschonewille