Custom initramfs in Warewulf 4

63 views
Skip to first unread message

Jorge L. Florit

unread,
Jul 5, 2023, 2:21:18 PM7/5/23
to Warewulf
Hi,

I'm adding a new overlay to wwinit to add a script in /warewulf/init.d/ to partition a NVMe to have it as a scratch, but it fails since at the execution time of the script the drive is not detected.

I tried this overlay succesfully with an SSD but it didn't work with an NVMe. Looking at the initrd file in a node I don't see any nvme driver, that could be the reason (not sure).

I see the field "root" with "(initramfs)" value in the Warewulf config but I haven't found any documentation about how to add/change the initramfs with a custom one, or if it is possible to modify the current one.

My question is how I could do it, and where is located the default initramfs file used.


Thanks in advance,

Christi...@web.de

unread,
Jul 5, 2023, 3:53:22 PM7/5/23
to ware...@lbl.gov
> --

Hello Jorge,
the porblem here is that at execution time of the script in /warewulf/init.d no systemd is running and subsequently udev isn't wokring. The solution is to load the right kernel modules in the partition script, or create systemd scripts and place them in wwinit overlay.
As a starting point you can use my PR which will introduce disk support for warwulf, see
https://github.com/hpcng/warewulf/pull/786/files

kind regrads,
Christian

Jorge L. Florit

unread,
Jul 6, 2023, 5:21:17 AM7/6/23
to Warewulf, Christi...@web.de
Hi Christian,

Thanks for your reply. I finally did it with a systemd unit because I don't need to deal with kernel modules and I can add dependencies easily, e.g. "Require=dev-nvme0n1.device", but I will follow the new feature for disk support.

I asked this question because I also have a problem with a shared network and other unconfigured interfaces down, even the system has completely started,  and also I don't see any network driver on initrd; I wanted to try if it could help, but I haven't found how to edit this "root" field or, if it is not possible, if I have to change it manually in the container/image.


Regards,
Reply all
Reply to author
Forward
0 new messages