Closed alkisg closed 4 years ago
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.
Hello! I tested dracut while developing https://ltsp.org, and I reported the problems I found, but since they weren't fixed, all ltsp users currently use initramfs-tools based distributions, we have no dracut installations.
Feel free to close it, if any dracut developer or user wants to work on this in the future they can reopen it then. Thanks!
Yeps closing
There's an issue in /usr/sbin/nbdroot which causes the following kernel cmdline to fail:
root=/dev/nbd0 netroot=nbd:server:export
One reason to pass both root= and netroot= is, for example, root=/dev/nbd0p1 netroot=, which mounts a whole raw disk over the net, but boots its first partition. And while root=/dev/nbd0p1 does work, the symmetrical root=/dev/nbd0 doesn't.
The problem is in line 93:
if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" ]; then
This doesn't match "/dev/nbd0", so nbdroot thinks it doesn't need to create the hookdir mount hook, so boot proceeds without blocking, failing because the device node /dev/nbd0 there is ready before networking comes up, before nbd-client runs etc.
So this line should become:
if [ "$root" = "block:/dev/root" -o "$root" = "dhcp" -o "${root#block:/dev/nbd}" != "${root}" ]; then