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
Unbootable initramfs with --sysroot
#893
Comments
Out of curiosity does Void Linux use the system management framework ( systemd ) or is Void Linux a non-systemd system? |
Void uses runit instead of systemd. |
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions. |
This issue is not stale. |
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions. |
On a Void Linux system with a mostly stock configuration (for the distribution),
dracut --sysroot
does not produce bootable initramfs images. The major problem seems to be the omission of importantudev
rules that prevent device recognition.Steps to reproduce:
dracut-050
installation, try to build an image from the root of desired sysroot:--sysroot .
argument:Attempt to boot the image.
Attempt to resolve the sysroot to an absolute path:
Expected behavior
The image proeduced with
--sysroot .
should include the missingudev
files and allow the system to boot, and the--sysroot $(readlink -f .)
(which, in this example, should resolve to--sysroot /
) should produce a similarly bootable image.Actual behavior
The image produced wth
--sysroot .
lacks theudev
configuration necessary to identify root devices, so the image will not be capable of booting the system. Attempting to use--sysroot $(readlink -f .)
causes numerous errors that prevent an image from being created in the first place.Motivation
In Void Linux, we have automatic post-installation hooks that generate initramfs images for newly installed kernels. The XBPS package manager can support installing to alternate roots; the hooks are always executed with the CWD as the target root. Running
dracut
without--sysroot
will ignore the difference between the "host" installation and the target root (when the two differ), so the resulting images will be built against the wrong root fs (the host and target roots might not even have the same collection of kernel modules). Proper support for--sysroot
would allow the installation hook to change to the target root and rundracut --sysroot .
and build an image against files in the target root.The text was updated successfully, but these errors were encountered: