I’m on NanoPC-TV with dietpi migrated to bullseye.
I’m trying to install docker and start a hello-world container.
Upon installation via dietpi-software I get error
Selecting previously unselected package docker-ce-cli.
(Reading database ... 46985 files and directories currently installed.)
Preparing to unpack .../docker-ce-cli_5%3a20.10.9~3-0~debian-bullseye_arm64.deb ...
Unpacking docker-ce-cli (5:20.10.9~3-0~debian-bullseye) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_5%3a20.10.9~3-0~debian-bullseye_arm64.deb ...
Unpacking docker-ce (5:20.10.9~3-0~debian-bullseye) ...
Setting up docker-ce-cli (5:20.10.9~3-0~debian-bullseye) ...
Setting up docker-ce (5:20.10.9~3-0~debian-bullseye) ...
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "restart" failed.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2021-10-14 14:59:58 BST; 33ms ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 40474 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 40474 (code=exited, status=1/FAILURE)
Oct 14 14:59:58 DietPi systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Oct 14 14:59:58 DietPi systemd[1]: docker.service: Failed with result 'exit-code'.
Oct 14 14:59:58 DietPi systemd[1]: Failed to start Docker Application Container Engine.
dpkg: error processing package docker-ce (--configure):
installed docker-ce package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)
I can however start service later using
service docker start
root@DietPi:~# service docker status
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-10-14 15:28:20 BST; 22min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 45030 (dockerd)
Tasks: 11
Memory: 26.0M
CGroup: /system.slice/docker.service
└─45030 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Oct 14 15:28:20 DietPi dockerd[45030]: time="2021-10-14T15:28:20.452413178+01:00" level=info msg="Loading containers: done."
Oct 14 15:28:20 DietPi dockerd[45030]: time="2021-10-14T15:28:20.510148970+01:00" level=info msg="Docker daemon" commit=79ea9d3 graphdriver(s)=overlay2 version=20.10.9
Oct 14 15:28:20 DietPi dockerd[45030]: time="2021-10-14T15:28:20.510731428+01:00" level=info msg="Daemon has completed initialization"
Oct 14 15:28:20 DietPi systemd[1]: Started Docker Application Container Engine.
Oct 14 15:28:20 DietPi dockerd[45030]: time="2021-10-14T15:28:20.652845678+01:00" level=info msg="API listen on /run/docker.sock"
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.191039275+01:00" level=warning msg="Your kernel does not support cgroup namespaces. Cgroup namespace setting discarded."
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.392383608+01:00" level=error msg="stream copy error: reading from a closed fifo"
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.392588233+01:00" level=error msg="stream copy error: reading from a closed fifo"
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.521419150+01:00" level=error msg="41b3e2ac426a574a9ec1c915056e1eac9e1a31ab566febef23331ee99d2636ed cleanup: failed to delete container from containerd: no>
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.521791025+01:00" level=error msg="Handler for POST /v1.41/containers/41b3e2ac426a574a9ec1c915056e1eac9e1a31ab566febef23331ee99d2636ed/start returned error>
root@DietPi:~#
When I try to start a container I get following error
root@DietPi:~# docker -D run --name hello-world hello-world
DEBU[0000] [hijack] End of stdout
docker: Error response from daemon: OCI runtime create failed: cgroup namespaces aren't enabled in the kernel: unknown.
ERRO[0000] error waiting for container: context canceled
That boot.img seems like a firmware, not a linux image, which should be called something with “linux” in its same. And most importantly it should be stored somewhere in the boot partition. In theory a bootloader can load it from everywhere, but there isn’t some bootloader configuration or an initramfs, device tree or something like that, so I wonder how this an even boot.
I remember we had a GPT image for NanoPC T4 once, installed via some Android tools based installer image. Can you check whether there is an EFI partition?
The root filesystem is not located on an NVMe drive but on an SD card or eMMC /dev/mmcblk1. You should see the same when running df and the root filesystem with e.g. /dev/mmcblk1p1 as source.
Strange is that the root drive itself seems to not contain any partition table. This looks the same on my external drives where I wrote the filesystem directory onto the raw drive without creating a partition table first. While this works for a root filesystem mount and external mounts, this cannot be used to boot a system from, so obviously you boot from a different drive.
Probably the system is booted (bootloader/EFI) from the NVMe while it then loads the root filesystem from the SD/eMMC drive? That would explain why we do not find any kernel. Can you show the following:
df
fdisk -l
cat /etc/fstab
I didn’t mean a file with “linux” in its name, but a package :
So I’m pretty sure your system is based on the old GPT installer image, which had this 6 partitions set. But to be true I don’t know much about it, this was basically before my time, our new image has a single partition to be flashed to the target drive directly. But let’s see what we can find out.
The above output would be good to know whether there is a kernel package installed at all, so a chance to upgrade it. And then we need to find the partition which does contains the boot configuration. I’m confused that fdisk -l doesn’t show any partitions, not even a partition table . Can you show the output of:
lsblk -po NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
Last resort is mounting all of them and checking the content:
mkdir /mnt/tmp
for i in /dev/mmcblk1?*
do
mount "$i" /mnt/tmp
ls -l /mnt/tmp
umount /mnt/tmp
sleep 1
done