NSPAWN interactive error: debian-custom failed with error code 1
GigaBypass9876 opened this issue · comments
Discussed in https://github.com/orgs/unifi-utilities/discussions/553
Any thoughts greatly appreciated as I would like to get pi-hole up and running.
I ran the interactive script, selected (2) Create a Custom Container Mac Vlan, and it produced the error below after about 5-6 minutes of executions/installing pkgs.
Originally posted by GigaBypass9876 June 15, 2023
UDM Pro SE running OS 3.0.18
In running the interactive guide to install nspawn, I selected Mac Vlan container, it ran for a long time installing packages, then stopped with this error:
"Container debian-custom exited successfully.
In container start network
Spawning container debian-custom on /data/custom/machines/debian-custom.
Press ^] three times within 1s to kill container.
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Container debian-custom failed with error code 1"
I then went to the manual steps and realized it got through step 1 and began manually entering Step 2 as follows until the last command and got an error (below). I am reluctant to try the interactive script again since running all of those packages may produce duplicate files or otherwise make things worse. Can I do that? Is there a way to resume this interactive script or do I need to factory reset the UDM Pro SE and try it again. First, I am trying to understand why it failed in the first place. Please chime in if you think it will help. Thanks!
from @peacey: Step 2. Configure the Container
Now that the container is created, let's configure it. Make sure you are back on the host OS and not in the container.
- First, we will link the container to /var/lib/machines so we can control it with machinectl.
mkdir -p /var/lib/machines
ln -s /data/custom/machines/debian-custom /var/lib/machines/ - Next, we will create a debian-custom.nspawn file in /etc/systemd/nspawn to configure parameters for the container (such as network, bind mounts, etc). Here I use vim to create the file as a personal preference.
mkdir -p /etc/systemd/nspawn
vim /etc/systemd/nspawn/debian-custom.nspawn
I entered the commands above and got an error that "a swap file was already created" and not to make two instances of it.
"the editing session crashed"
I looked at the directory structure in Winscp, and directory seemingly created above, /etc/systemd/nspawn, did not appear. Any way to resolve this without a system reset and trying again?