You are not logged in.
I've been trying to use netconf to get networking on early boot to remote unlock luks partitions. I've created a file /etc/systemd/network/eth0.network.initramfs with the following content:
[Match]
MACAddress=b1:1c:e2:50:3e:b3
[Network]
Address=192.168.1.10/24
Gateway=192.168.1.1
DNS=192.168.1.5Regenerating the initramfs so the network file is included with it:
[root@Dyson /]# mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts.img --microcode /boot/amd-ucode.img
==> Starting build: '6.1.39-1-lts'
-> Running build hook: [base]
-> Running build hook: [systemd]
-> Running build hook: [autodetect]
-> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
-> Running build hook: [sd-vconsole]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [netconf]
Created symlink /tmp/mkinitcpio.EiNUfV/root/etc/systemd/system/dbus-org.freedesktop.network1.service → /usr/lib/systemd/system/systemd-networkd.service.
Created symlink /tmp/mkinitcpio.EiNUfV/root/etc/systemd/system/multi-user.target.wants/systemd-networkd.service → /usr/lib/systemd/system/systemd-networkd.service.
Unit /tmp/mkinitcpio.EiNUfV/root/usr/lib/systemd/system/systemd-networkd.service is added as a dependency to a non-existent unit multi-user.target.
Created symlink /tmp/mkinitcpio.EiNUfV/root/etc/systemd/system/sockets.target.wants/systemd-networkd.socket → /usr/lib/systemd/system/systemd-networkd.socket.
Failed to enable auxiliary unit systemd-network-generator.service, ignoring.
Failed to enable auxiliary unit systemd-networkd-wait-online.service, ignoring.
Added /etc/systemd/network/eth0.network.initramfs to /etc/systemd/network/eth0.network
-> Running build hook: [clevis]
-> Running build hook: [sd-encrypt]
-> Running build hook: [lvm2]
-> Running build hook: [resume]
-> Running build hook: [btrfs]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts.img'
==> Image generation successful Now when I boot the pc the systemd-network d service fails with all it's five tries. The log for it is as follows:
-- Boot 41c6620a401c47ccb4b0ba7a00ecab9e --
sep 02 20:07:42 archlinux systemd[1]: Starting Network Configuration...
sep 02 20:07:42 archlinux (netw[271]: systemd-networkd.service: Failed to determine user credentials: No such process
sep 02 20:07:42 archlinux (netw[271]: systemd-networkd.service: Failed at step USER spawning /usr/lib/systemd/systemd-networkd: No such process
sep 02 20:07:42 archlinux systemd[1]: systemd-networkd.service: Main process exited, code=exited, status=217/USER
sep 02 20:07:42 archlinux systemd[1]: systemd-networkd.service: Failed with result 'exit-code'.
sep 02 20:07:42 archlinux systemd[1]: Failed to start Network Configuration.I have tried the ip kernel parameter way, I tried using DHCP, I also tried using the name of the interface (eth0 due to it being early kernel boot) instead of the mac address and the service always fails. Any advice on what should i try next? Any help is appreciated.
Last edited by 7thCore (2023-09-03 17:52:40)
The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.
Offline
netconf appears to be a busybox hook, not a systemd one.
You can try https://wiki.archlinux.org/title/Dm-cry … kinitcpio)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Okay this seems to work. Thank you.
Side note, any ideas on how to get clevis working with systemd based initramfs so it can be used with tang?
The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.
Offline
Keep in mind the initramfs is intended to provide a minimal environment that has what is needed to succesfully start the full system.
Typically this means mounting the root volume .
I don't know clevis, but it's archlinux wikipage has a big red warning about using it for unlocking root volumes.
Please think long and hard if having clevis/tang support in the initramfs is a good idea.
Incase you do want to pursue that method, start a new thread for it in the appropriate forum sub-board (which would probably be Networking, Server, and Protection ).
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
That, from what I can see is for the TPM variant. I want to have a network solution so a server can reboot and unlock itself on my home network and not anywhere else.
I will create a new post in the section you mentioned. Thank you.
The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.
Offline