Skip to content

Comments

Added script for first-boot#150

Merged
insatomcat merged 1 commit intoseapath:mainfrom
dahoat-sprecher:main
Feb 5, 2026
Merged

Added script for first-boot#150
insatomcat merged 1 commit intoseapath:mainfrom
dahoat-sprecher:main

Conversation

@dahoat-sprecher
Copy link
Contributor

Hello to All,

During development, I noticed the images generated would always have the same machine-id and SSH host keys once deployed. Among others, this lead to problems when MAC addresses were generated based on the machine-id.

The new file 70-first-boot ensures:

  • the first-boot semantics of systemd is executed
  • /etc/machine-id is generated and D-BUS machine id is linked to it
  • unique SSH host keys are generated

Best regards,
Daniel

@eroussy eroussy requested a review from insatomcat February 4, 2026 14:42
Copy link
Member

@insatomcat insatomcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not concern the building of the ISO itself, but only the image use with the installer (ping @dupremathieu) and the qcow2 file used for guests.

So from my point of view, it would be more appropriate to apply this via the SEAPATH_RAW class rather than in the SEAPATH_COMMON class.

@dupremathieu
Copy link
Member

This does not concern the building of the ISO itself, but only the image use with the installer (ping @dupremathieu) and the qcow2 file used for guests.

So from my point of view, it would be more appropriate to apply this via the SEAPATH_RAW class rather than in the SEAPATH_COMMON class.

I agree.

When FAI is used to generate an installation iso (build_iso.sh), the ssh host key and the machine-id are generated during the installation on target.

When we generate an image directly (build_qcow2.sh and generate_seapath_image.sh) this generation is done in the "build" machine.

So as @insatomcat said we should only apply your changes for the 2nd case.
Do to so you should rename your file from srv_fai_config/scripts/SEAPATH_COMMON/70-first-boot to srv_fai_config/scripts/SEAPATH_RAW/70-first-boot.

The generated image shipped with static machine-id and SSH host keys. The new file 70-first-boot ensures:
 - the first-boot semantics of systemd is executed
 - /etc/machine-id is generated and D-BUS machine id is linked to it
 - unique SSH host keys are generated

Signed-off-by: Daniel Hofer <daniel.hofer@sprecher-automation.com>
@dahoat-sprecher
Copy link
Contributor Author

Changes are made, sorry, I didn't notice the RAW class until now.

@insatomcat insatomcat merged commit d482bf7 into seapath:main Feb 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants