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

Misleading error message about initramfs regeneration #5033

Open
mxj4 opened this issue Aug 4, 2024 · 4 comments
Open

Misleading error message about initramfs regeneration #5033

mxj4 opened this issue Aug 4, 2024 · 4 comments

Comments

@mxj4
Copy link

mxj4 commented Aug 4, 2024

Newbie to rpm-ostree and dracut.
I just changed /etc/crypttab then tried updating initramfs with a command found on Internet: sudo rpm-ostree initramfs-etc --track=/etc/crypttab
But I've already done sudo rpm-ostree initramfs --enable in the past, hence I'm getting the following error message:

error, "initramfs regeneration and /etc overlay not compatible; use dracut arg -I instead");

This is very misleading, and I thought I should do

sudo dracut arg -I /etc/crypttab

It didn't work and I got a binary named arg 🤣
Then I figured the actual command I should run is

sudo rpm-ostree initramfs --enable --arg=-I --arg=/etc/crypttab

We should change the error message to something like

initramfs regeneration and /etc overlay not compatible; use this command instead: rpm-ostree initramfs --enable --arg=-I --arg=/etc/file_to_track

@mxj4
Copy link
Author

mxj4 commented Aug 4, 2024

Looks like initramfs-etc is newer than initramfs regeneration #2170 , so instead of telling people to revert back to rpm-ostree initramfs --enable --arg=-I --arg=/etc/file_to_track, we should tell them to disable regeneration first, then start using initramfs-etc --track /etc/file_to_track?

@cgwalters
Copy link
Member

so instead of telling people to revert back to rpm-ostree initramfs --enable --arg=-I --arg=/etc/file_to_track, we should tell them to disable regeneration first, then start using initramfs-etc --track /etc/file_to_track?

Sounds right to me

@jlebon
Copy link
Member

jlebon commented Aug 28, 2024

The error is kept generic because it depends why you enabled initramfs regeneration in the first place. If it was to -I some files, then yes, you can/should move to initramfs-etc. But e.g. adding dracut modules, kernel drivers, etc... can't be done through initramfs-etc, so if you need to do that and also want to add some /etc files, then you need to revert back to -I in your customized list of dracut kargs.

@jlebon
Copy link
Member

jlebon commented Aug 28, 2024

Though we could probably detect cases where users do rpm-ostree initramfs --enable --arg=-I --arg=/etc/file_to_track and print a helpful note that they could use rpm-ostree initramfs-etc instead.

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

No branches or pull requests

3 participants