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

Dracut PXE/NFS boot hangs on starting network on Ubuntu 22.04 #2674

Open
walid-omari opened this issue Oct 15, 2024 · 2 comments
Open

Dracut PXE/NFS boot hangs on starting network on Ubuntu 22.04 #2674

walid-omari opened this issue Oct 15, 2024 · 2 comments
Labels
bug Our bugs

Comments

@walid-omari
Copy link

Describe the bug
When trying to setup NFS boot for an Ubuntu 22.04 image that is created with debootstrap, generating an initrd with dracut makes the boot hang after root pivot and init phase at "Starting wait for network to be configured...".
Disabling/masking systemd-network-generator.service and systemd-networkd-wait-online.service as well as omitting systemd module when building the initrd image allows the system to boot but then the network is left unmanaged and the interfaces that were renamed before init from eth0 to enp0s3 (for example) is then reverted to eth0 when the system is booted and running networkctl command shows all interfaces as unmanaged
With initramfs-tools generate initrd image, the system boots normally and the interfaces are renamed properly from "eth0" to "enp0s3" and are managed by systemd as expected.

Distribution used
ubuntu 22.04 LTS

Dracut version
tested both version 051 (available in apt repos) and 058 (built from source)

Init system
systemd

To Reproduce

  1. Setup PXE server (dnsmasq), grub...
  2. Create an ubuntu 22.04 image with debootstrap, chroot into the created image, install kernel (currently using 5.15.0-25-generic) and other packages you may need.
  3. install dracut and dracut-network packages and build an initrd image.
  4. export the image with nfs-kernel-server and boot a VM/machine with it.

Expected behavior
I expect the system to boot properly like when using an initramfs-tools generated image.

Additional context
I understand dracut is not usually used on Debian/ubuntu, but the reason I want to use dracut is its modularity and I find it to be less complicated than initramfs tools and specifically I want to do an overlay with the NFS exported image which is just a rootovl kernel parameter in dracut rather than a whole custom script with initramfs-tools that I was not able to make it work.

@jozzsi
Copy link

jozzsi commented Oct 15, 2024

@walid-omari have you had a chance to try Ubuntu 24.04 or later ? I am assuming that your dracut version is very old on Ubuntu 22.04. I would also recommend reporting it to the Debian bug database if you not focusing on the latest version of Dracut (https://www.debian.org/Bugs/).

Note that rootovl is no longer supported in Ubuntu 24.04, neither it is supported here in this repository and your issue seems to be around that dracut module. Instead we use the overlayfs dracut module.

@walid-omari
Copy link
Author

Dear @jozzsi , Thank you for your reply. I have not had the chance to try on Ubuntu 24.04 or later. as for the dracut version, I have tested both 051 and 058 as I mentioned before. I have also tested without the rootovl (directly mounting nfsroot and pivoting to it) and I got the same behavior so I doubt it had anything to do with that module. And I have not experienced this issue with the initramfs-tools that's why I thought the issue is related to dracut rather than Debian/Ubuntu itself.

I will however report it to the debian bug database and see what I can get. In the meantime, I appreciate any further input you may have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs
Projects
None yet
Development

No branches or pull requests

2 participants