Skip to main content
Topic: [Solved] I still have the dinit packer issue. sshd won't start after reboot. (Read 216 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Solved] I still have the dinit packer issue. sshd won't start after reboot.

After having created an Alpine Linux vagrant box due to another issue
during my Artix Linux packer installment,  that I have solved, 
I recently discovered that I can't easily use Alpine Linux
to install Artix Linux, so I'm back again at creating an Artix Linux vagrant box.  

https://forum.artixlinux.org/index.php/topic,5457.msg34629.html

And yet again, I like to use dinit, and yet again, I'm back at the same issue. 
Packer can't make the SSH handshake required after the scripted installment.

Code: [Select]
packer_msg "Enable ssh access manually for box"
/usr/bin/artix-chroot /mnt ln -sf /etc/dinit.d/sshd /etc/dinit.d/boot.d/
/usr/bin/install --owner=root --group=root --mode=644 /etc/dinit.d/sshd /mnt/etc/dinit.d/sshd
/usr/bin/install --owner=root --group=root --mode=644 -D -t /mnt/etc/dinit.d/scripts /etc/dinit.d/scripts/sshd

packer_msg "Creating ssh access for artix_user"
/usr/bin/install --directory --owner=artix --group=artix --mode=0700 /mnt/artix/.ssh
/usr/bin/install --owner=artix --group=artix --mode=0600 /home/artix/.ssh/authorized_keys /mnt/artix/.ssh/authorized_keys 
 
During the installation, I have manually created three sshd files. 

/etc/dinit.d/sshd
Code: [Select]
type            = process
command         = /etc/dinit.d/scripts/sshd
smooth-recovery = true
waits-for       = loginready

/etc/dinit.d/scrpts/sshd
Code: [Select]
#!/bin/sh
/usr/bin/ssh-keygen -A
exec /usr/bin/sshd -D

I have checked permissions as well

*ls -lha /etc/dinit.d/*
Code: [Select]
drwxr-xr-x 2 root root 4.0K Apr 19 07:15 .
drwxr-xr-x 7 root root 4.0K Apr 19 07:15 ..
-rwxr-xr-x 1 root root   55 Apr 19 07:15 sshd

*ls -lha individual files*
Code: [Select]
-rwxr-xr-x 1 root root 55 Apr 19 07:15 /etc/dinit.d/scripts/sshd
-rw-r--r-- 1 root root 122 Apr 19 07:15 /etc/dinit.d/sshd
lrwxrwxrwx 1 root root 17 Apr 19 07:15 /etc/dinit.d/boot.d/sshd -> /etc/dinit.d/sshd

 

Re: I still have the dinit packer issue. sshd won't start after reboot.

Reply #1
For some reason the user turned into 1001.

Code: [Select]
/usr/bin/artix-chroot /mnt /usr/bin/chown artix:artix /boot

Also, I had an issue with the bootloader not working properly.