Skip to main content
Topic: dinit: Service early-keyboard.target command failed with exit code 1 (Read 962 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

dinit: Service early-keyboard.target command failed with exit code 1

It starts fine up to udev-trigger but after that it quickly just stops every service. And the problem is that the first thing i can see being stoppd is elogind but I'm pretty sure it doesn't even mount the root filesystem since the logs are empty and I'm unable to scroll the console up with shift+pgup. So any idea on how to debug this?

dinit: Service early-keyboard.target command failed with exit code 1

Reply #1
Code: [Select]
dinit: Service early-keyboard.target command failed with exit code 1
[FAILED] early-keyboard.target
[FAILED] early-console.target
[FAILED]  pre-local.target
[FAILED] ufw
[FAILED] local.target
dinit: Interrupting start of service fsck-root with pid 849 (with SIGINT).
[FAILED]  elogind
[FAILED]  logind
[FAILED] rclocal
[FAILED] network-pre
[FAILED] network
[FAILED] pre-network.target
[FAILED] NetworkManager
[FAILED] network.target
[FAILED] tor
[FAILED] sshd
[FAILED] system
[FAILED] login.target
[FAILED] boot
[STOPPD] many more...
dinit: Service random-seed stop command failed with exit code 20
...
dinit: Service hwclock stop command failed with exit code 1
...
All services have stopped with no shutdown issued; boot failure?
Choose: (r)ebooto, r(e)covery, re(s)tart boot sequence, (p)ower off?

This is what greeted me this morning :(
What can I do?

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #2
I had the same problem. You can rollback dinit-rc back to 0.4.2-1 if you have it in your pacman cache:
Code: [Select]
pacman -U file:///var/cache/pacman/pkg/dinit-rc-0.4.2-1-x86_64.pkg.tar.zst
And the second option which i had to do is get it from source (you can see individual commits with 'git log' to use with 'git checkout'):
Code: [Select]
git clone https://gitea.artixlinux.org/packages/dinit-rc
cd dinit-rc
git checkout 1157c883730f29323d2e770387b91649eb961f45
makepkg -si
I dit it with an Artix boot usb but i read that it's possible to do it from the dinit recovery console too by mounting root with rw rights with something like this (no clue how safe this is):
Code: [Select]
mount -o rw,remount /

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #3
@toepie Oh I'm screwed. I cleaned my pacman cache just yesterday...
Thank you for response! I did enter dinit recovery with rw rights but I can't clone git repo because I have no network (I'm using NetworkManger) so no internet for me.

Code: [Select]
fatal: unable to access 'https://gitea...': Could not resolve host: gitea.artixlinux.org

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #4
@omnigenous If you are using an ethernet cable maybe it's possible to get internet with dhclient?

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #5
@toepie I do use ethernet cable but I don't have dhclient installed :(

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #6
@omnigenous Shouldn't it be possible to just run NetworkManager in the terminal to start NetworkManager?

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #7
Code: [Select]
NetworkManager
# no output

Code: [Select]
NetworkManager -d # with debug flag
<info> blah blah
...
<error> [timestamp] bus-manager: cannot connect to D-Bus: Could not connect: No such file or directory

Code: [Select]
ls /var/run/ | grep dbus
ls /run/ | grep dbus # both has no output

Not sure how to solve this dbus issue always struggled with dbus stuff

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #8
@omnigenous I guess it's not possible since it excepts dbus to be on. Maybe by manually setting the ip with 'ip addr add <ip-here> dev eth0 (might be something else check with 'ip a')' or something like that?

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #9
How about running dhcpcd -B -M, it's more likely you have that?

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #10
@Hitman I don't have "dhcpcd" installed :(

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #11
@toepie Now I have "inet <IP>/32 scope global eth0\nvalid_lft forever preferred_lft forever" but still no internet access.

Thankfully I still can use "man", brb "man ip | less"

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #12
It's not very standard to connect to a dhcp server without a dhcp client, so rather set a static ip in the router.

(also offtopic but you can always artix-chroot from installer and fix/downgrade/upgrade from there)

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #13
@omnigenous I tried on my own machine and with this i almost got it working but DNS isn't working:
Code: [Select]
sudo ip addr add 192.168.1.104/24 broadcast 192.168.1.255 dev eth0
sudo ip link set eth0 up
echo '192.168.1.1' > /etc/resolv.conf
You seemed to have put the submask to /32 which isn't right.

And yes if possible just do it with the artix-chroot from an Artix usb bootable stick.

Re: dinit: Service early-keyboard.target command failed with exit code 1

Reply #14
Okay, I fixed it.

Had to look for my usb stick.

Code: [Select]
cryptsetup open /dev/drive cryptlvm # decrypt drive
# btrfs stuff, mount needed volumes
export opts="defaults,noatime,compress=zstd,space_cache=v2"
mount -o ${opts},subvol=@ /dev/mapper/cryptlvm /mnt
mount -o ${opts},subvol=@home /dev/mapper/cryptlvm /mnt/home
mount -o ${opts},subvol=@var_log /dev/mapper/cryptlvm /mnt/var/log
artix-chroot /mnt bash

cat /var/log/pacman.log
# find dinit-rc, looked for snapper id before upgrading
# couldn't use "snapper list" because of yet another dbus error
snapper-rollback ID
exit
reboot

@toepie I tried  building dinit-rc after cloning it in chroot but it complained that I'm running makepkg as root so I didn't want to make thing worse :D

Also had to "sudo rm /var/lib/pacman/db.lck"