Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to run with no kickstart #144

Merged
merged 1 commit into from Feb 13, 2023

Conversation

M4rtinK
Copy link
Contributor

@M4rtinK M4rtinK commented Jan 30, 2023

Regularly Initial Setup expects the /root/anaconda-ks.cfg file created by Anaconda to exists, so that it can resolve which screens to show.

This works well for the regular use-case where Initial Setup runs after a regular installation, to configure additional settings, such as a user account.

But Initial Setup is also used in the so-called reconfig-mode, usually on ARM SBCs or IoT devices, where it is started from a static image that has been dd-ed to the system and Initial Setup is then used to customize it.

In this case the idea of kickstart describing the state of the system breaks down, as the /root/anaconda-ks.cfg if present could describe the image creation settings and not the desired action for this scenario - which is essentially "configure what you can".

This is how bug 2015490 came to be - the kickstart used to build the ARM installation image has root password set to be locked.

This is correct - the image should have no default root password & the user is expected to set one (or create an admin user) via Initial Setup.

Unfortunately the Initial Setup/Anaconda logic dictates that if root password is mentioned in kickstart, it is considered as set and user is then not required to set one during the Initial Setup run. This way if user forgets to set a root password or setup an admin user account, the resulting customized system might end up inaccessible.

To solve this issue, make it possible to run Initial Setup without an input kickstart - this will result in default behavior of requiring a root password or admin user to be created. Also as mentioned in bug 2015490, there is a known way how to assure the ARM installation image has no kickstart on it. That together with this fix should fix the bug.

Resolves: rhbz#2015490

@M4rtinK M4rtinK added the master label Jan 30, 2023
Regularly Initial Setup expects the /root/anaconda-ks.cfg file created
by Anaconda to exists, so that it can resolve which screens to show.

This works well for the regular use-case where Initial Setup runs after
a regular installation, to configure additional settings, such as a user
account.

But Initial Setup is also used in the so-called reconfig-mode, usually
on ARM SBCs or IoT devices, where it is started from a static image
that has been dd-ed to the system and Initial Setup is then used to
customize it.

In this case the idea of kickstart describing the state of the system
breaks down, as the /root/anaconda-ks.cfg if present could describe the
image creation settings and not the desired action for this scenario -
which is essentially "configure what you can".

This is how bug 2015490 came to be - the kickstart used to build the
ARM installation image has root password set to be locked.

This is correct - the image should have no default root password & the
user is expected to set one (or create an admin user) via Initial Setup.

Unfortunately the Initial Setup/Anaconda logic dictates that if root
password is mentioned in kickstart, it is considered as set and user
is then not required to set one during the Initial Setup run. This way
if user forgets to set a root password or setup an admin user account,
the resulting customized system might end up inaccessible.

To solve this issue, make it possible to run Initial Setup without
an input kickstart - this will result in default behavior of requiring a
root password or admin user to be created. Also as mentioned in bug
2015490, there is a known way how to assure the ARM installation image
has no kickstart on it. That together with this fix should fix the bug.

Resolves: rhbz#2015490
@M4rtinK
Copy link
Contributor Author

M4rtinK commented Jan 31, 2023

initial_setup_no_kickstart
So this is how it looks like with no /root/anaconda-ks.cfg exists and reconfig mode is triggered via /etc/reconfigSys file existing.

@M4rtinK
Copy link
Contributor Author

M4rtinK commented Jan 31, 2023

COPR build of Initial Setup with the change:
https://copr.fedorainfracloud.org/coprs/m4rtink/initial_setup_no_kickstart/build/5378430/

Copy link
Contributor

@rvykydal rvykydal left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@M4rtinK M4rtinK merged commit 5e34e64 into rhinstaller:master Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants