You are not logged in.

#1 2019-04-24 00:17:14

utiadenfgnuve
Member
Registered: 2018-11-20
Posts: 19

[SOLVED] Re-generating of initrams fails with netconf

Hello there,

I try to set up an encrypted headless server. I followed the wiki Dm-crypt/Specialties#Remote_unlocking_of_the_root_(or_other)_partition but when I re-generate the initramfs I get the error message:

ERROR: file not found: `!!/usr/lib/systemd/systemd-networkd'

I have no idea where the "!!" come from. The folder /usr/lib/systemd/systemd-networkd exists.
I am in desperation, hours of try and error or googling didn't hint a solution.
Hopefully one of you has an idea.

Best regards

Edit: formatting.

Last edited by utiadenfgnuve (2019-04-24 10:24:33)

Offline

#2 2019-04-24 00:22:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Re-generating of initrams fails with netconf

Is this using the AUR package? Some details of what you have done and your configs would be helpful...

Moving to NC.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-04-24 00:33:38

utiadenfgnuve
Member
Registered: 2018-11-20
Posts: 19

Re: [SOLVED] Re-generating of initrams fails with netconf

You are right, I am sorry.

What I did: I have a working encrypted linux wich will prompt a key input at boot.
I installed  mkinitcpio-netconf,  mkinitcpio-tinyssh and mkinitcpio-utils. I already had a ssh-key I only copied it to the key to "/etc/tinyssh/root_key".
After that I added the Hooks, the line shows:

HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block netconf tinyssh encryptssh sd-encrypt filesystems fsck)

I know that "the encryptssh replaces the encrypt hook".
I changed the kernel parameter to:

GRUB_CMDLINE_LINUX="rd.luks.name=725b5640-58fb-4ac5-af9c-426c65c8f309=cryptroot rd.luks.options=timeout=300 rootflags=x-systemd.device-timeout=300 net.ifnames=0 ip=:::::eth0:dhcp"

But while i re-generate the mkinitramfs I get the mentioned error.

Edit: formatting.

Last edited by utiadenfgnuve (2019-04-24 00:38:25)

Offline

#4 2019-04-24 09:25:28

Piri
Member
Registered: 2018-06-02
Posts: 70

Re: [SOLVED] Re-generating of initrams fails with netconf

Ignore the error for now you got more fundamental issues:

utiadenfgnuve wrote:

I know that "the encryptssh replaces the encrypt hook".

You should also know that the encrypt hook is used for a busybox init and sd-encrypt for a systemd init. Since your current setup is a systemd init you should use a replacment for sd-encrypt not encrypt.

In plain words: You probably want to use systemd-tool as described in here.

Offline

#5 2019-04-24 09:53:12

utiadenfgnuve
Member
Registered: 2018-11-20
Posts: 19

Re: [SOLVED] Re-generating of initrams fails with netconf

I see, so the netconf and tinyssh do not work with the systemd init? Thank you for the clarification.

But I tried the systemd-tool at first and only tried the tinyssh solution, becaus the re-generation with systemd-tool showed far more errors and I couldn't find a for me understandable documentation.
The hooks line shows

HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt filesystems fsck systemd-tool)

And the errors from the re-generation are:

==> ERROR: invalid source binary /usr/bin/mc
==> ERROR: invalid source binary /usr/bin/mcedit
==> ERROR: invalid source binary /usr/bin/mcview
==> ERROR: invalid source path /etc/mc
==> ERROR: invalid source path /usr/lib/mc
==> ERROR: invalid source path /usr/share/mc
==> ERROR: file not found: `/bin/dropbear'
==> ERROR: invalid source path /etc/dropbear
    convert openssh to tinysshd host key ed25519
==> ERROR: command failure (127): tinyssh-convert -f /etc/ssh/ssh_host_ed25519_key -d /etc/tinyssh/sshkeydir 
/etc/systemd/system/initrd-build.sh: line 93: tinyssh-convert: command not found

==> ERROR: file not found: `/usr/bin/busybox'
==> ERROR: invalid source path /etc/tinyssh/sshkeydir/.ed25519.sk
==> ERROR: invalid source path /etc/tinyssh/sshkeydir/ed25519.pk

I would prefer the systemd-tools version, but i couldn't find a explanation what has to be configured beforehand.

Offline

#6 2019-04-24 10:20:42

utiadenfgnuve
Member
Registered: 2018-11-20
Posts: 19

Re: [SOLVED] Re-generating of initrams fails with netconf

I installed tinyss-convert and mc and now only get the error concerning "dropbear".
Why do I have to have tinyssh and dropbear or can I disregard that error?

Offline

#7 2019-04-24 10:21:20

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,779

Re: [SOLVED] Re-generating of initrams fails with netconf

Incase you want to use mkinicpio-netconf / mkinitcpio-tinyssh you should switch to a busybox init .

replace systemd hook with base & udev hooks .  check mkinicpio doc whether you also need usr and/or resume hook .
replace all sd-* hooks with non-systemd equivalents (or just remove them if you don't need their functionality).


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

#8 2019-04-24 10:24:13

utiadenfgnuve
Member
Registered: 2018-11-20
Posts: 19

Re: [SOLVED] Re-generating of initrams fails with netconf

It worked!! smile After I installed the previous mentioned programms and a reboot it worked.
Thank you all very much for your help! smile

Offline

Board footer

Powered by FluxBB