[pkg-lxc-devel] Bug#998095: lxc-templates: lxc-create using alpine template fails with mknod error
gerbier
eric.gerbier at free.fr
Sat Oct 30 09:51:03 BST 2021
Package: lxc-templates
Version: 3.0.4-5
Severity: normal
X-Debbugs-Cc: eric.gerbier at free.fr
Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
I am trying to create an alpine lxc container
* What exactly did you do (or not do) that was effective (or
ineffective)?
lxc-create -t alpine -n alpine
* What was the outcome of this action?
mknod: dev/zero: Le fichier existe
lxc-create: alpine: lxccontainer.c: create_run_template: 1616 Failed to create container from template
lxc-create: alpine: tools/lxc_create.c: main: 319 Failed to create container alpine
* What outcome did you expect instead?
the lxc container should be created with the following message
==> Container's rootfs and config have been created
devices seems to be already created
The problem can be fixed with the following patch
--- /usr/share/lxc/templates/lxc-alpine 2021-10-30 10:43:25.468395300 +0200
+++ /usr/share/lxc/templates/lxc-alpine.new 2021-10-30 10:21:27.682509425 +0200
@@ -278,10 +278,10 @@
mkdir -p -m 755 dev/pts
mkdir -p -m 1777 dev/shm
- mknod -m 666 dev/zero c 1 5
+ #mknod -m 666 dev/zero c 1 5
mknod -m 666 dev/full c 1 7
- mknod -m 666 dev/random c 1 8
- mknod -m 666 dev/urandom c 1 9
+ #mknod -m 666 dev/random c 1 8
+ #mknod -m 666 dev/urandom c 1 9
local i; for i in $(seq 0 4); do
mknod -m 620 dev/tty$i c 4 $i
@@ -290,7 +290,7 @@
mknod -m 666 dev/tty c 5 0
chown 0:5 dev/tty # root:tty
- mknod -m 620 dev/console c 5 1
+ #mknod -m 620 dev/console c 5 1
mknod -m 666 dev/ptmx c 5 2
chown 0:5 dev/ptmx # root:tty
*** End of the template - remove these template lines ***
-- System Information:
Debian Release: 11.1
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-9-amd64 (SMP w/4 CPU threads)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages lxc-templates depends on:
ii lxc 1:4.0.6-2
Versions of packages lxc-templates recommends:
ii bridge-utils 1.7-1
ii busybox-static 1:1.30.1-6+b3
ii cloud-image-utils 0.31-2
ii debootstrap 1.0.123
ii distro-info 1.0
ii mmdebstrap 0.7.5-2.2
ii openssl 1.1.1k-1+deb11u1
ii rsync 3.2.3-4+deb11u1
ii uuid-runtime 2.36.1-8
ii xz-utils 5.2.5-2
Versions of packages lxc-templates suggests:
pn qemu-user-static <none>
-- no debconf information
More information about the Pkg-lxc-devel
mailing list