makedev operation not permitted #37

Closed
opened 11 months ago by brendansimon_indt · 3 comments

I am trying to use mmdebstrap (via bdebstrap) with a set of packages that I use in outdated alternative root filesystem builder (brickstrap, which is based on multistrap), targeting an armhf architecture.

All packages install ok except for makedev, which outputs errors like this:

Setting up makedev (2.3.1-97) ...
mknod: mem-: Operation not permitted
makedev mem c 1 1 root kmem 0640: failed
mknod: kmem-: Operation not permitted
makedev kmem c 1 2 root kmem 0640: failed
mknod: null-: Operation not permitted
makedev null c 1 3 root root 0666: failed
...

and

Errors were encountered while processing:
 makedev
 watchdog
E: Sub-process env returned an error code (1)
E: setup failed: E: apt-get -o Dir::Bin::dpkg=env -o DPkg::Options::=--unset=TMPDIR -o DPkg::Options::=dpkg -o DPkg::Chroot-Directory=/tmp/mmdebstrap.y1HT6szt4d --yes install -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false watchdog ?narrow(?or(?archive(^bookworm$),?codename(^bookworm$)),?architecture(amd64),?and(?priority(required),?not(?essential))) failed

Is this a problem with mmdebstrap, or something I need to install in my development environment?
The dev environment a newly created VM (Debian 12 Bookwork Testing) so might have some missing packages that I need?

Full output

$ bdebstrap -c examples/debian-bookworm-minimal-watchdog.yaml --name build/debian-bookworm-minimal-watchdog
I: chroot architecture amd64 is equal to the host's architecture
I: finding correct signed-by value...
done
I: automatically chosen format: tar
I: using /tmp/mmdebstrap.y1HT6szt4d as tempdir
I: running apt-get update...
done
I: downloading packages with apt...
done
I: extracting archives...
done
I: installing essential packages...
done
I: running --essential-hook in shell: sh -c 'mkdir -p "$1/tmp/bdebstrap-output"' exec /tmp/mmdebstrap.y1HT6szt4d
I: installing remaining packages inside the chroot...
done
done
Reading package lists...
Building dependency tree...
debconf is already the newest version (1.5.82).
libpam-runtime is already the newest version (1.5.2-6).
mawk is already the newest version (1.3.4.20200120-3.1).
libpam-modules is already the newest version (1.5.2-6).
libpam-modules-bin is already the newest version (1.5.2-6).
The following additional packages will be installed:
  debian-archive-keyring gpgv libapt-pkg6.0 libcom-err2 libext2fs2 libffi8
  libgnutls30 libhogweed6 libidn2-0 libnettle8 libp11-kit0 libseccomp2
  libsemanage-common libsemanage2 libsepol2 libss2 libstdc++6 libtasn1-6
  libunistring2 libxxhash0 logsave makedev
Suggested packages:
  apt-doc aptitude | synaptic | wajig dpkg-dev gnupg | gnupg2 | gnupg1
  powermgmt-base gpart parted fuse2fs e2fsck-static gnupg gnutls-bin
  nfs-common
Recommended packages:
  ca-certificates e2fsprogs-l10n sensible-utils
The following NEW packages will be installed:
  apt debian-archive-keyring e2fsprogs gpgv libapt-pkg6.0 libcom-err2
  libext2fs2 libffi8 libgnutls30 libhogweed6 libidn2-0 libnettle8 libp11-kit0
  libseccomp2 libsemanage-common libsemanage2 libsepol2 libss2 libstdc++6
  libtasn1-6 libunistring2 libxxhash0 logsave makedev mount passwd tzdata
  watchdog
0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded.
Need to get 9531 kB of archives.
After this operation, 30.0 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 libcom-err2 amd64 1.47.0-2 [19.8 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 libext2fs2 amd64 1.47.0-2 [205 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 libss2 amd64 1.47.0-2 [24.5 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 logsave amd64 1.47.0-2 [19.6 kB]
Get:5 http://deb.debian.org/debian bookworm/main amd64 e2fsprogs amd64 1.47.0-2 [571 kB]
Get:6 http://deb.debian.org/debian bookworm/main amd64 mount amd64 2.38.1-5+b1 [134 kB]
Get:7 http://deb.debian.org/debian bookworm/main amd64 gpgv amd64 2.2.40-1.1 [648 kB]
Get:8 http://deb.debian.org/debian bookworm/main amd64 libstdc++6 amd64 12.2.0-14 [614 kB]
Get:9 http://deb.debian.org/debian bookworm/main amd64 libxxhash0 amd64 0.8.1-1 [27.6 kB]
Get:10 http://deb.debian.org/debian bookworm/main amd64 libapt-pkg6.0 amd64 2.6.0 [906 kB]
Get:11 http://deb.debian.org/debian bookworm/main amd64 debian-archive-keyring all 2023.3 [161 kB]
Get:12 http://deb.debian.org/debian bookworm/main amd64 libnettle8 amd64 3.8.1-2 [288 kB]
Get:13 http://deb.debian.org/debian bookworm/main amd64 libhogweed6 amd64 3.8.1-2 [328 kB]
Get:14 http://deb.debian.org/debian bookworm/main amd64 libunistring2 amd64 1.0-2 [437 kB]
Get:15 http://deb.debian.org/debian bookworm/main amd64 libidn2-0 amd64 2.3.3-1+b1 [124 kB]
Get:16 http://deb.debian.org/debian bookworm/main amd64 libffi8 amd64 3.4.4-1 [22.9 kB]
Get:17 http://deb.debian.org/debian bookworm/main amd64 libp11-kit0 amd64 0.24.1-2 [345 kB]
Get:18 http://deb.debian.org/debian bookworm/main amd64 libtasn1-6 amd64 4.19.0-2 [56.6 kB]
Get:19 http://deb.debian.org/debian bookworm/main amd64 libgnutls30 amd64 3.7.9-2 [1403 kB]
Get:20 http://deb.debian.org/debian bookworm/main amd64 libseccomp2 amd64 2.5.4-1+b3 [46.6 kB]
Get:21 http://deb.debian.org/debian bookworm/main amd64 apt amd64 2.6.0 [1372 kB]
Get:22 http://deb.debian.org/debian bookworm/main amd64 libsemanage-common all 3.4-1 [21.6 kB]
Get:23 http://deb.debian.org/debian bookworm/main amd64 libsepol2 amd64 3.4-2 [282 kB]
Get:24 http://deb.debian.org/debian bookworm/main amd64 libsemanage2 amd64 3.4-1+b5 [89.9 kB]
Get:25 http://deb.debian.org/debian bookworm/main amd64 passwd amd64 1:4.13+dfsg1-1+b1 [972 kB]
Get:26 http://deb.debian.org/debian bookworm/main amd64 tzdata all 2023c-3 [301 kB]
Get:27 http://deb.debian.org/debian bookworm/main amd64 makedev all 2.3.1-97 [41.6 kB]
Get:28 http://deb.debian.org/debian bookworm/main amd64 watchdog amd64 5.16-1+b2 [69.7 kB]
Fetched 9531 kB in 5s (1856 kB/s)
Chrooting into /tmp/mmdebstrap.y1HT6szt4d/
debconf: delaying package configuration, since apt-utils is not installed
Fetched 9531 kB in 5s (1856 kB/s)
Chrooting into /tmp/mmdebstrap.y1HT6szt4d/
Selecting previously unselected package libcom-err2:amd64.
(Reading database ... 5792 files and directories currently installed.)
Preparing to unpack .../libcom-err2_1.47.0-2_amd64.deb ...
Unpacking libcom-err2:amd64 (1.47.0-2) ...
Selecting previously unselected package libext2fs2:amd64.
Preparing to unpack .../libext2fs2_1.47.0-2_amd64.deb ...
Unpacking libext2fs2:amd64 (1.47.0-2) ...
Selecting previously unselected package libss2:amd64.
Preparing to unpack .../libss2_1.47.0-2_amd64.deb ...
Unpacking libss2:amd64 (1.47.0-2) ...
Selecting previously unselected package logsave.
Preparing to unpack .../logsave_1.47.0-2_amd64.deb ...
Unpacking logsave (1.47.0-2) ...
Chrooting into /tmp/mmdebstrap.y1HT6szt4d/
Setting up libcom-err2:amd64 (1.47.0-2) ...
Setting up libext2fs2:amd64 (1.47.0-2) ...
Setting up libss2:amd64 (1.47.0-2) ...
Chrooting into /tmp/mmdebstrap.y1HT6szt4d/
Selecting previously unselected package e2fsprogs.
(Reading database ... 5814 files and directories currently installed.)
Preparing to unpack .../00-e2fsprogs_1.47.0-2_amd64.deb ...
Unpacking e2fsprogs (1.47.0-2) ...
Selecting previously unselected package mount.
Preparing to unpack .../01-mount_2.38.1-5+b1_amd64.deb ...
Unpacking mount (2.38.1-5+b1) ...
Selecting previously unselected package gpgv.
Preparing to unpack .../02-gpgv_2.2.40-1.1_amd64.deb ...
Unpacking gpgv (2.2.40-1.1) ...
Selecting previously unselected package libstdc++6:amd64.
Preparing to unpack .../03-libstdc++6_12.2.0-14_amd64.deb ...
Unpacking libstdc++6:amd64 (12.2.0-14) ...
Selecting previously unselected package libxxhash0:amd64.
Preparing to unpack .../04-libxxhash0_0.8.1-1_amd64.deb ...
Unpacking libxxhash0:amd64 (0.8.1-1) ...
Selecting previously unselected package libapt-pkg6.0:amd64.
Preparing to unpack .../05-libapt-pkg6.0_2.6.0_amd64.deb ...
Unpacking libapt-pkg6.0:amd64 (2.6.0) ...
Selecting previously unselected package debian-archive-keyring.
Preparing to unpack .../06-debian-archive-keyring_2023.3_all.deb ...
Unpacking debian-archive-keyring (2023.3) ...
Selecting previously unselected package libnettle8:amd64.
Preparing to unpack .../07-libnettle8_3.8.1-2_amd64.deb ...
Unpacking libnettle8:amd64 (3.8.1-2) ...
Selecting previously unselected package libhogweed6:amd64.
Preparing to unpack .../08-libhogweed6_3.8.1-2_amd64.deb ...
Unpacking libhogweed6:amd64 (3.8.1-2) ...
Selecting previously unselected package libunistring2:amd64.
Preparing to unpack .../09-libunistring2_1.0-2_amd64.deb ...
Unpacking libunistring2:amd64 (1.0-2) ...
Selecting previously unselected package libidn2-0:amd64.
Preparing to unpack .../10-libidn2-0_2.3.3-1+b1_amd64.deb ...
Unpacking libidn2-0:amd64 (2.3.3-1+b1) ...
Selecting previously unselected package libffi8:amd64.
Preparing to unpack .../11-libffi8_3.4.4-1_amd64.deb ...
Unpacking libffi8:amd64 (3.4.4-1) ...
Selecting previously unselected package libp11-kit0:amd64.
Preparing to unpack .../12-libp11-kit0_0.24.1-2_amd64.deb ...
Unpacking libp11-kit0:amd64 (0.24.1-2) ...
Selecting previously unselected package libtasn1-6:amd64.
Preparing to unpack .../13-libtasn1-6_4.19.0-2_amd64.deb ...
Unpacking libtasn1-6:amd64 (4.19.0-2) ...
Selecting previously unselected package libgnutls30:amd64.
Preparing to unpack .../14-libgnutls30_3.7.9-2_amd64.deb ...
Unpacking libgnutls30:amd64 (3.7.9-2) ...
Selecting previously unselected package libseccomp2:amd64.
Preparing to unpack .../15-libseccomp2_2.5.4-1+b3_amd64.deb ...
Unpacking libseccomp2:amd64 (2.5.4-1+b3) ...
Selecting previously unselected package apt.
Preparing to unpack .../16-apt_2.6.0_amd64.deb ...
Unpacking apt (2.6.0) ...
Selecting previously unselected package libsemanage-common.
Preparing to unpack .../17-libsemanage-common_3.4-1_all.deb ...
Unpacking libsemanage-common (3.4-1) ...
Selecting previously unselected package libsepol2:amd64.
Preparing to unpack .../18-libsepol2_3.4-2_amd64.deb ...
Unpacking libsepol2:amd64 (3.4-2) ...
Selecting previously unselected package libsemanage2:amd64.
Preparing to unpack .../19-libsemanage2_3.4-1+b5_amd64.deb ...
Unpacking libsemanage2:amd64 (3.4-1+b5) ...
Selecting previously unselected package passwd.
Preparing to unpack .../20-passwd_1%3a4.13+dfsg1-1+b1_amd64.deb ...
Unpacking passwd (1:4.13+dfsg1-1+b1) ...
Selecting previously unselected package tzdata.
Preparing to unpack .../21-tzdata_2023c-3_all.deb ...
Unpacking tzdata (2023c-3) ...
Selecting previously unselected package makedev.
Preparing to unpack .../22-makedev_2.3.1-97_all.deb ...
Unpacking makedev (2.3.1-97) ...
Selecting previously unselected package watchdog.
Preparing to unpack .../23-watchdog_5.16-1+b2_amd64.deb ...
Unpacking watchdog (5.16-1+b2) ...
Chrooting into /tmp/mmdebstrap.y1HT6szt4d/
Setting up debian-archive-keyring (2023.3) ...
Setting up libunistring2:amd64 (1.0-2) ...
Setting up libidn2-0:amd64 (2.3.3-1+b1) ...
Setting up libsemanage-common (3.4-1) ...
Setting up libseccomp2:amd64 (2.5.4-1+b3) ...
Setting up tzdata (2023c-3) ...

Current default time zone: 'Etc/UTC'
Local time is now:      Thu May 18 00:00:23 UTC 2023.
Universal Time is now:  Thu May 18 00:00:23 UTC 2023.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Setting up makedev (2.3.1-97) ...
mknod: mem-: Operation not permitted
makedev mem c 1 1 root kmem 0640: failed
mknod: kmem-: Operation not permitted
makedev kmem c 1 2 root kmem 0640: failed
mknod: null-: Operation not permitted
makedev null c 1 3 root root 0666: failed
mknod: port-: Operation not permitted
makedev port c 1 4 root kmem 0640: failed
mknod: zero-: Operation not permitted
makedev zero c 1 5 root root 0666: failed
mknod: full-: Operation not permitted
makedev full c 1 7 root root 0666: failed
mknod: random-: Operation not permitted
makedev random c 1 8 root root 0666: failed
mknod: urandom-: Operation not permitted
makedev urandom c 1 9 root root 0666: failed
mknod: tty-: Operation not permitted
makedev tty c 5 0 root tty 0666: failed
mknod: ram0-: Operation not permitted
makedev ram0 b 1 0 root disk 0660: failed
mknod: ram1-: Operation not permitted
makedev ram1 b 1 1 root disk 0660: failed
mknod: ram2-: Operation not permitted
makedev ram2 b 1 2 root disk 0660: failed
mknod: ram3-: Operation not permitted
makedev ram3 b 1 3 root disk 0660: failed
mknod: ram4-: Operation not permitted
makedev ram4 b 1 4 root disk 0660: failed
mknod: ram5-: Operation not permitted
makedev ram5 b 1 5 root disk 0660: failed
mknod: ram6-: Operation not permitted
makedev ram6 b 1 6 root disk 0660: failed
mknod: ram7-: Operation not permitted
makedev ram7 b 1 7 root disk 0660: failed
mknod: ram8-: Operation not permitted
makedev ram8 b 1 8 root disk 0660: failed
mknod: ram9-: Operation not permitted
makedev ram9 b 1 9 root disk 0660: failed
mknod: ram10-: Operation not permitted
makedev ram10 b 1 10 root disk 0660: failed
mknod: ram11-: Operation not permitted
makedev ram11 b 1 11 root disk 0660: failed
mknod: ram12-: Operation not permitted
makedev ram12 b 1 12 root disk 0660: failed
mknod: ram13-: Operation not permitted
makedev ram13 b 1 13 root disk 0660: failed
mknod: ram14-: Operation not permitted
makedev ram14 b 1 14 root disk 0660: failed
mknod: ram15-: Operation not permitted
makedev ram15 b 1 15 root disk 0660: failed
mknod: ram16-: Operation not permitted
makedev ram16 b 1 16 root disk 0660: failed
mknod: loop0-: Operation not permitted
makedev loop0 b 7 0 root disk 0660: failed
mknod: loop1-: Operation not permitted
makedev loop1 b 7 1 root disk 0660: failed
mknod: loop2-: Operation not permitted
makedev loop2 b 7 2 root disk 0660: failed
mknod: loop3-: Operation not permitted
makedev loop3 b 7 3 root disk 0660: failed
mknod: loop4-: Operation not permitted
makedev loop4 b 7 4 root disk 0660: failed
mknod: loop5-: Operation not permitted
makedev loop5 b 7 5 root disk 0660: failed
mknod: loop6-: Operation not permitted
makedev loop6 b 7 6 root disk 0660: failed
mknod: loop7-: Operation not permitted
makedev loop7 b 7 7 root disk 0660: failed
mknod: tty0-: Operation not permitted
makedev tty0 c 4 0 root tty 0600: failed
mknod: console-: Operation not permitted
makedev console c 5 1 root tty 0600: failed
/usr/sbin/MAKEDEV: don't know how to make device "tty0"
dpkg: error processing package makedev (--configure):
 installed makedev package post-installation script subprocess returned error exit status 1
Setting up libnettle8:amd64 (3.8.1-2) ...
dpkg: dependency problems prevent configuration of watchdog:
 watchdog depends on makedev (>= 2.3.1-24) | udev; however:
  Package makedev is not configured yet.
  Package udev is not installed.

dpkg: error processing package watchdog (--configure):
 dependency problems - leaving unconfigured
Setting up libsepol2:amd64 (3.4-2) ...
Setting up logsave (1.47.0-2) ...
Setting up libffi8:amd64 (3.4.4-1) ...
Setting up mount (2.38.1-5+b1) ...
Setting up gpgv (2.2.40-1.1) ...
Setting up libxxhash0:amd64 (0.8.1-1) ...
Setting up libtasn1-6:amd64 (4.19.0-2) ...
Setting up libsemanage2:amd64 (3.4-1+b5) ...
Setting up libstdc++6:amd64 (12.2.0-14) ...
Setting up libhogweed6:amd64 (3.8.1-2) ...
Setting up e2fsprogs (1.47.0-2) ...
Setting up libapt-pkg6.0:amd64 (2.6.0) ...
Setting up libp11-kit0:amd64 (0.24.1-2) ...
Setting up passwd (1:4.13+dfsg1-1+b1) ...
Shadow passwords are now on.
Setting up libgnutls30:amd64 (3.7.9-2) ...
Setting up apt (2.6.0) ...
Processing triggers for libc-bin (2.36-9) ...
Errors were encountered while processing:
 makedev
 watchdog
E: Sub-process env returned an error code (1)
E: setup failed: E: apt-get -o Dir::Bin::dpkg=env -o DPkg::Options::=--unset=TMPDIR -o DPkg::Options::=dpkg -o DPkg::Chroot-Directory=/tmp/mmdebstrap.y1HT6szt4d --yes install -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false watchdog ?narrow(?or(?archive(^bookworm$),?codename(^bookworm$)),?architecture(amd64),?and(?priority(required),?not(?essential))) failed
I: main() received signal PIPE: waiting for setup...
I: removing tempdir /tmp/mmdebstrap.y1HT6szt4d...
E: mmdebstrap failed to run
2023-05-18 10:00:25,330 bdebstrap ERROR: mmdebstrap failed with exit code 2. See above for details.
I am trying to use mmdebstrap (via bdebstrap) with a set of packages that I use in outdated alternative root filesystem builder (brickstrap, which is based on multistrap), targeting an armhf architecture. All packages install ok except for `makedev`, which outputs errors like this: ``` Setting up makedev (2.3.1-97) ... mknod: mem-: Operation not permitted makedev mem c 1 1 root kmem 0640: failed mknod: kmem-: Operation not permitted makedev kmem c 1 2 root kmem 0640: failed mknod: null-: Operation not permitted makedev null c 1 3 root root 0666: failed ... ``` and ``` Errors were encountered while processing: makedev watchdog E: Sub-process env returned an error code (1) E: setup failed: E: apt-get -o Dir::Bin::dpkg=env -o DPkg::Options::=--unset=TMPDIR -o DPkg::Options::=dpkg -o DPkg::Chroot-Directory=/tmp/mmdebstrap.y1HT6szt4d --yes install -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false watchdog ?narrow(?or(?archive(^bookworm$),?codename(^bookworm$)),?architecture(amd64),?and(?priority(required),?not(?essential))) failed ``` Is this a problem with `mmdebstrap`, or something I need to install in my development environment? The dev environment a newly created VM (Debian 12 Bookwork Testing) so might have some missing packages that I need? **Full output** ``` $ bdebstrap -c examples/debian-bookworm-minimal-watchdog.yaml --name build/debian-bookworm-minimal-watchdog I: chroot architecture amd64 is equal to the host's architecture I: finding correct signed-by value... done I: automatically chosen format: tar I: using /tmp/mmdebstrap.y1HT6szt4d as tempdir I: running apt-get update... done I: downloading packages with apt... done I: extracting archives... done I: installing essential packages... done I: running --essential-hook in shell: sh -c 'mkdir -p "$1/tmp/bdebstrap-output"' exec /tmp/mmdebstrap.y1HT6szt4d I: installing remaining packages inside the chroot... done done Reading package lists... Building dependency tree... debconf is already the newest version (1.5.82). libpam-runtime is already the newest version (1.5.2-6). mawk is already the newest version (1.3.4.20200120-3.1). libpam-modules is already the newest version (1.5.2-6). libpam-modules-bin is already the newest version (1.5.2-6). The following additional packages will be installed: debian-archive-keyring gpgv libapt-pkg6.0 libcom-err2 libext2fs2 libffi8 libgnutls30 libhogweed6 libidn2-0 libnettle8 libp11-kit0 libseccomp2 libsemanage-common libsemanage2 libsepol2 libss2 libstdc++6 libtasn1-6 libunistring2 libxxhash0 logsave makedev Suggested packages: apt-doc aptitude | synaptic | wajig dpkg-dev gnupg | gnupg2 | gnupg1 powermgmt-base gpart parted fuse2fs e2fsck-static gnupg gnutls-bin nfs-common Recommended packages: ca-certificates e2fsprogs-l10n sensible-utils The following NEW packages will be installed: apt debian-archive-keyring e2fsprogs gpgv libapt-pkg6.0 libcom-err2 libext2fs2 libffi8 libgnutls30 libhogweed6 libidn2-0 libnettle8 libp11-kit0 libseccomp2 libsemanage-common libsemanage2 libsepol2 libss2 libstdc++6 libtasn1-6 libunistring2 libxxhash0 logsave makedev mount passwd tzdata watchdog 0 upgraded, 28 newly installed, 0 to remove and 0 not upgraded. Need to get 9531 kB of archives. After this operation, 30.0 MB of additional disk space will be used. Get:1 http://deb.debian.org/debian bookworm/main amd64 libcom-err2 amd64 1.47.0-2 [19.8 kB] Get:2 http://deb.debian.org/debian bookworm/main amd64 libext2fs2 amd64 1.47.0-2 [205 kB] Get:3 http://deb.debian.org/debian bookworm/main amd64 libss2 amd64 1.47.0-2 [24.5 kB] Get:4 http://deb.debian.org/debian bookworm/main amd64 logsave amd64 1.47.0-2 [19.6 kB] Get:5 http://deb.debian.org/debian bookworm/main amd64 e2fsprogs amd64 1.47.0-2 [571 kB] Get:6 http://deb.debian.org/debian bookworm/main amd64 mount amd64 2.38.1-5+b1 [134 kB] Get:7 http://deb.debian.org/debian bookworm/main amd64 gpgv amd64 2.2.40-1.1 [648 kB] Get:8 http://deb.debian.org/debian bookworm/main amd64 libstdc++6 amd64 12.2.0-14 [614 kB] Get:9 http://deb.debian.org/debian bookworm/main amd64 libxxhash0 amd64 0.8.1-1 [27.6 kB] Get:10 http://deb.debian.org/debian bookworm/main amd64 libapt-pkg6.0 amd64 2.6.0 [906 kB] Get:11 http://deb.debian.org/debian bookworm/main amd64 debian-archive-keyring all 2023.3 [161 kB] Get:12 http://deb.debian.org/debian bookworm/main amd64 libnettle8 amd64 3.8.1-2 [288 kB] Get:13 http://deb.debian.org/debian bookworm/main amd64 libhogweed6 amd64 3.8.1-2 [328 kB] Get:14 http://deb.debian.org/debian bookworm/main amd64 libunistring2 amd64 1.0-2 [437 kB] Get:15 http://deb.debian.org/debian bookworm/main amd64 libidn2-0 amd64 2.3.3-1+b1 [124 kB] Get:16 http://deb.debian.org/debian bookworm/main amd64 libffi8 amd64 3.4.4-1 [22.9 kB] Get:17 http://deb.debian.org/debian bookworm/main amd64 libp11-kit0 amd64 0.24.1-2 [345 kB] Get:18 http://deb.debian.org/debian bookworm/main amd64 libtasn1-6 amd64 4.19.0-2 [56.6 kB] Get:19 http://deb.debian.org/debian bookworm/main amd64 libgnutls30 amd64 3.7.9-2 [1403 kB] Get:20 http://deb.debian.org/debian bookworm/main amd64 libseccomp2 amd64 2.5.4-1+b3 [46.6 kB] Get:21 http://deb.debian.org/debian bookworm/main amd64 apt amd64 2.6.0 [1372 kB] Get:22 http://deb.debian.org/debian bookworm/main amd64 libsemanage-common all 3.4-1 [21.6 kB] Get:23 http://deb.debian.org/debian bookworm/main amd64 libsepol2 amd64 3.4-2 [282 kB] Get:24 http://deb.debian.org/debian bookworm/main amd64 libsemanage2 amd64 3.4-1+b5 [89.9 kB] Get:25 http://deb.debian.org/debian bookworm/main amd64 passwd amd64 1:4.13+dfsg1-1+b1 [972 kB] Get:26 http://deb.debian.org/debian bookworm/main amd64 tzdata all 2023c-3 [301 kB] Get:27 http://deb.debian.org/debian bookworm/main amd64 makedev all 2.3.1-97 [41.6 kB] Get:28 http://deb.debian.org/debian bookworm/main amd64 watchdog amd64 5.16-1+b2 [69.7 kB] Fetched 9531 kB in 5s (1856 kB/s) Chrooting into /tmp/mmdebstrap.y1HT6szt4d/ debconf: delaying package configuration, since apt-utils is not installed Fetched 9531 kB in 5s (1856 kB/s) Chrooting into /tmp/mmdebstrap.y1HT6szt4d/ Selecting previously unselected package libcom-err2:amd64. (Reading database ... 5792 files and directories currently installed.) Preparing to unpack .../libcom-err2_1.47.0-2_amd64.deb ... Unpacking libcom-err2:amd64 (1.47.0-2) ... Selecting previously unselected package libext2fs2:amd64. Preparing to unpack .../libext2fs2_1.47.0-2_amd64.deb ... Unpacking libext2fs2:amd64 (1.47.0-2) ... Selecting previously unselected package libss2:amd64. Preparing to unpack .../libss2_1.47.0-2_amd64.deb ... Unpacking libss2:amd64 (1.47.0-2) ... Selecting previously unselected package logsave. Preparing to unpack .../logsave_1.47.0-2_amd64.deb ... Unpacking logsave (1.47.0-2) ... Chrooting into /tmp/mmdebstrap.y1HT6szt4d/ Setting up libcom-err2:amd64 (1.47.0-2) ... Setting up libext2fs2:amd64 (1.47.0-2) ... Setting up libss2:amd64 (1.47.0-2) ... Chrooting into /tmp/mmdebstrap.y1HT6szt4d/ Selecting previously unselected package e2fsprogs. (Reading database ... 5814 files and directories currently installed.) Preparing to unpack .../00-e2fsprogs_1.47.0-2_amd64.deb ... Unpacking e2fsprogs (1.47.0-2) ... Selecting previously unselected package mount. Preparing to unpack .../01-mount_2.38.1-5+b1_amd64.deb ... Unpacking mount (2.38.1-5+b1) ... Selecting previously unselected package gpgv. Preparing to unpack .../02-gpgv_2.2.40-1.1_amd64.deb ... Unpacking gpgv (2.2.40-1.1) ... Selecting previously unselected package libstdc++6:amd64. Preparing to unpack .../03-libstdc++6_12.2.0-14_amd64.deb ... Unpacking libstdc++6:amd64 (12.2.0-14) ... Selecting previously unselected package libxxhash0:amd64. Preparing to unpack .../04-libxxhash0_0.8.1-1_amd64.deb ... Unpacking libxxhash0:amd64 (0.8.1-1) ... Selecting previously unselected package libapt-pkg6.0:amd64. Preparing to unpack .../05-libapt-pkg6.0_2.6.0_amd64.deb ... Unpacking libapt-pkg6.0:amd64 (2.6.0) ... Selecting previously unselected package debian-archive-keyring. Preparing to unpack .../06-debian-archive-keyring_2023.3_all.deb ... Unpacking debian-archive-keyring (2023.3) ... Selecting previously unselected package libnettle8:amd64. Preparing to unpack .../07-libnettle8_3.8.1-2_amd64.deb ... Unpacking libnettle8:amd64 (3.8.1-2) ... Selecting previously unselected package libhogweed6:amd64. Preparing to unpack .../08-libhogweed6_3.8.1-2_amd64.deb ... Unpacking libhogweed6:amd64 (3.8.1-2) ... Selecting previously unselected package libunistring2:amd64. Preparing to unpack .../09-libunistring2_1.0-2_amd64.deb ... Unpacking libunistring2:amd64 (1.0-2) ... Selecting previously unselected package libidn2-0:amd64. Preparing to unpack .../10-libidn2-0_2.3.3-1+b1_amd64.deb ... Unpacking libidn2-0:amd64 (2.3.3-1+b1) ... Selecting previously unselected package libffi8:amd64. Preparing to unpack .../11-libffi8_3.4.4-1_amd64.deb ... Unpacking libffi8:amd64 (3.4.4-1) ... Selecting previously unselected package libp11-kit0:amd64. Preparing to unpack .../12-libp11-kit0_0.24.1-2_amd64.deb ... Unpacking libp11-kit0:amd64 (0.24.1-2) ... Selecting previously unselected package libtasn1-6:amd64. Preparing to unpack .../13-libtasn1-6_4.19.0-2_amd64.deb ... Unpacking libtasn1-6:amd64 (4.19.0-2) ... Selecting previously unselected package libgnutls30:amd64. Preparing to unpack .../14-libgnutls30_3.7.9-2_amd64.deb ... Unpacking libgnutls30:amd64 (3.7.9-2) ... Selecting previously unselected package libseccomp2:amd64. Preparing to unpack .../15-libseccomp2_2.5.4-1+b3_amd64.deb ... Unpacking libseccomp2:amd64 (2.5.4-1+b3) ... Selecting previously unselected package apt. Preparing to unpack .../16-apt_2.6.0_amd64.deb ... Unpacking apt (2.6.0) ... Selecting previously unselected package libsemanage-common. Preparing to unpack .../17-libsemanage-common_3.4-1_all.deb ... Unpacking libsemanage-common (3.4-1) ... Selecting previously unselected package libsepol2:amd64. Preparing to unpack .../18-libsepol2_3.4-2_amd64.deb ... Unpacking libsepol2:amd64 (3.4-2) ... Selecting previously unselected package libsemanage2:amd64. Preparing to unpack .../19-libsemanage2_3.4-1+b5_amd64.deb ... Unpacking libsemanage2:amd64 (3.4-1+b5) ... Selecting previously unselected package passwd. Preparing to unpack .../20-passwd_1%3a4.13+dfsg1-1+b1_amd64.deb ... Unpacking passwd (1:4.13+dfsg1-1+b1) ... Selecting previously unselected package tzdata. Preparing to unpack .../21-tzdata_2023c-3_all.deb ... Unpacking tzdata (2023c-3) ... Selecting previously unselected package makedev. Preparing to unpack .../22-makedev_2.3.1-97_all.deb ... Unpacking makedev (2.3.1-97) ... Selecting previously unselected package watchdog. Preparing to unpack .../23-watchdog_5.16-1+b2_amd64.deb ... Unpacking watchdog (5.16-1+b2) ... Chrooting into /tmp/mmdebstrap.y1HT6szt4d/ Setting up debian-archive-keyring (2023.3) ... Setting up libunistring2:amd64 (1.0-2) ... Setting up libidn2-0:amd64 (2.3.3-1+b1) ... Setting up libsemanage-common (3.4-1) ... Setting up libseccomp2:amd64 (2.5.4-1+b3) ... Setting up tzdata (2023c-3) ... Current default time zone: 'Etc/UTC' Local time is now: Thu May 18 00:00:23 UTC 2023. Universal Time is now: Thu May 18 00:00:23 UTC 2023. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up makedev (2.3.1-97) ... mknod: mem-: Operation not permitted makedev mem c 1 1 root kmem 0640: failed mknod: kmem-: Operation not permitted makedev kmem c 1 2 root kmem 0640: failed mknod: null-: Operation not permitted makedev null c 1 3 root root 0666: failed mknod: port-: Operation not permitted makedev port c 1 4 root kmem 0640: failed mknod: zero-: Operation not permitted makedev zero c 1 5 root root 0666: failed mknod: full-: Operation not permitted makedev full c 1 7 root root 0666: failed mknod: random-: Operation not permitted makedev random c 1 8 root root 0666: failed mknod: urandom-: Operation not permitted makedev urandom c 1 9 root root 0666: failed mknod: tty-: Operation not permitted makedev tty c 5 0 root tty 0666: failed mknod: ram0-: Operation not permitted makedev ram0 b 1 0 root disk 0660: failed mknod: ram1-: Operation not permitted makedev ram1 b 1 1 root disk 0660: failed mknod: ram2-: Operation not permitted makedev ram2 b 1 2 root disk 0660: failed mknod: ram3-: Operation not permitted makedev ram3 b 1 3 root disk 0660: failed mknod: ram4-: Operation not permitted makedev ram4 b 1 4 root disk 0660: failed mknod: ram5-: Operation not permitted makedev ram5 b 1 5 root disk 0660: failed mknod: ram6-: Operation not permitted makedev ram6 b 1 6 root disk 0660: failed mknod: ram7-: Operation not permitted makedev ram7 b 1 7 root disk 0660: failed mknod: ram8-: Operation not permitted makedev ram8 b 1 8 root disk 0660: failed mknod: ram9-: Operation not permitted makedev ram9 b 1 9 root disk 0660: failed mknod: ram10-: Operation not permitted makedev ram10 b 1 10 root disk 0660: failed mknod: ram11-: Operation not permitted makedev ram11 b 1 11 root disk 0660: failed mknod: ram12-: Operation not permitted makedev ram12 b 1 12 root disk 0660: failed mknod: ram13-: Operation not permitted makedev ram13 b 1 13 root disk 0660: failed mknod: ram14-: Operation not permitted makedev ram14 b 1 14 root disk 0660: failed mknod: ram15-: Operation not permitted makedev ram15 b 1 15 root disk 0660: failed mknod: ram16-: Operation not permitted makedev ram16 b 1 16 root disk 0660: failed mknod: loop0-: Operation not permitted makedev loop0 b 7 0 root disk 0660: failed mknod: loop1-: Operation not permitted makedev loop1 b 7 1 root disk 0660: failed mknod: loop2-: Operation not permitted makedev loop2 b 7 2 root disk 0660: failed mknod: loop3-: Operation not permitted makedev loop3 b 7 3 root disk 0660: failed mknod: loop4-: Operation not permitted makedev loop4 b 7 4 root disk 0660: failed mknod: loop5-: Operation not permitted makedev loop5 b 7 5 root disk 0660: failed mknod: loop6-: Operation not permitted makedev loop6 b 7 6 root disk 0660: failed mknod: loop7-: Operation not permitted makedev loop7 b 7 7 root disk 0660: failed mknod: tty0-: Operation not permitted makedev tty0 c 4 0 root tty 0600: failed mknod: console-: Operation not permitted makedev console c 5 1 root tty 0600: failed /usr/sbin/MAKEDEV: don't know how to make device "tty0" dpkg: error processing package makedev (--configure): installed makedev package post-installation script subprocess returned error exit status 1 Setting up libnettle8:amd64 (3.8.1-2) ... dpkg: dependency problems prevent configuration of watchdog: watchdog depends on makedev (>= 2.3.1-24) | udev; however: Package makedev is not configured yet. Package udev is not installed. dpkg: error processing package watchdog (--configure): dependency problems - leaving unconfigured Setting up libsepol2:amd64 (3.4-2) ... Setting up logsave (1.47.0-2) ... Setting up libffi8:amd64 (3.4.4-1) ... Setting up mount (2.38.1-5+b1) ... Setting up gpgv (2.2.40-1.1) ... Setting up libxxhash0:amd64 (0.8.1-1) ... Setting up libtasn1-6:amd64 (4.19.0-2) ... Setting up libsemanage2:amd64 (3.4-1+b5) ... Setting up libstdc++6:amd64 (12.2.0-14) ... Setting up libhogweed6:amd64 (3.8.1-2) ... Setting up e2fsprogs (1.47.0-2) ... Setting up libapt-pkg6.0:amd64 (2.6.0) ... Setting up libp11-kit0:amd64 (0.24.1-2) ... Setting up passwd (1:4.13+dfsg1-1+b1) ... Shadow passwords are now on. Setting up libgnutls30:amd64 (3.7.9-2) ... Setting up apt (2.6.0) ... Processing triggers for libc-bin (2.36-9) ... Errors were encountered while processing: makedev watchdog E: Sub-process env returned an error code (1) E: setup failed: E: apt-get -o Dir::Bin::dpkg=env -o DPkg::Options::=--unset=TMPDIR -o DPkg::Options::=dpkg -o DPkg::Chroot-Directory=/tmp/mmdebstrap.y1HT6szt4d --yes install -oAPT::Status-Fd=<$fd> -oDpkg::Use-Pty=false watchdog ?narrow(?or(?archive(^bookworm$),?codename(^bookworm$)),?architecture(amd64),?and(?priority(required),?not(?essential))) failed I: main() received signal PIPE: waiting for setup... I: removing tempdir /tmp/mmdebstrap.y1HT6szt4d... E: mmdebstrap failed to run 2023-05-18 10:00:25,330 bdebstrap ERROR: mmdebstrap failed with exit code 2. See above for details. ```
Owner

Hi,

what are the contents of your examples/debian-bookworm-minimal-watchdog.yaml? Anyways, as you are not running bdebstrap as root, mmdebstrap is either run in unshare or fakeroot mode. Neither node has the necessary permissions to create device nodes.

I guess I see several ways forward:

  • run the whole thing as root
  • file a bug against makedev to prevent it from failing if mknod is not permitted
  • don't use makedev

Do not discard the last point easily. I'm surprised anybody uses makedev these days. It was useful in the past but not anymore these days. Look at those usage numbers:

https://qa.debian.org/popcon.php?package=makedev

Why do you think do you need it? mmdebstrap (and in extension bdebstrap) is already creating device nodes for you without needing superuser privileges. Also look at the changelog of makedev. The package was orphaned in 2012 and hasn't received any additional features besides packaging fixes since then...

Hi, what are the contents of your `examples/debian-bookworm-minimal-watchdog.yaml`? Anyways, as you are not running bdebstrap as root, mmdebstrap is either run in unshare or fakeroot mode. Neither node has the necessary permissions to create device nodes. I guess I see several ways forward: - run the whole thing as root - file a bug against makedev to prevent it from failing if mknod is not permitted - don't use makedev Do not discard the last point easily. I'm surprised anybody uses makedev these days. It was useful in the past but not anymore these days. Look at those usage numbers: https://qa.debian.org/popcon.php?package=makedev Why do you think do you need it? mmdebstrap (and in extension bdebstrap) is already creating device nodes for you without needing superuser privileges. Also look at the changelog of makedev. The package was orphaned in 2012 and hasn't received any additional features besides packaging fixes since then...

My debian-bookwork-minimal-watchdog.yaml file is:

---
mmdebstrap:
  keyrings:
    - /usr/share/keyrings/debian-archive-keyring.gpg
  mode: unshare
  suite: bookworm
  target: root.tar.xz
  variant: minbase

  packages:
    - watchdog

I don't observe this issue when using brickstrap to build a rootfs as a non-root user. NOTE: I'm using an older version of brickstrap, which uses user-unshare, multistrap, and libguestfs.

makedev is a dependency of the watchdog package.

However, I have just noticed the package specifies makedev or udev as a dependency, so maybe if I specify udev in the package list then it wont download makedev?

https://packages.debian.org/bookworm/watchdog

I can see that my brickstrap generated filesystem doesn't have makedev installed, but does have udev installed, so I guess that is probably the solution.

My `debian-bookwork-minimal-watchdog.yaml` file is: ```yaml --- mmdebstrap: keyrings: - /usr/share/keyrings/debian-archive-keyring.gpg mode: unshare suite: bookworm target: root.tar.xz variant: minbase packages: - watchdog ``` I don't observe this issue when using `brickstrap` to build a rootfs as a non-root user. NOTE: I'm using an older version of `brickstrap`, which uses `user-unshare`, `multistrap`, and `libguestfs`. `makedev` is a dependency of the `watchdog` package. However, I have just noticed the package specifies `makedev` **or** `udev` as a dependency, so maybe if I specify `udev` in the package list then it wont download `makedev`? https://packages.debian.org/bookworm/watchdog I can see that my `brickstrap` generated filesystem doesn't have `makedev` installed, but does have `udev` installed, so I guess that is probably the solution.

I can confirm that adding udev as a package allows the build to succeed :)

This yaml file works

---
mmdebstrap:
  keyrings:
    - /usr/share/keyrings/debian-archive-keyring.gpg
  mode: unshare
  suite: bookworm
  target: root.tar.xz
  variant: minbase

  packages:
    - udev
    - watchdog

Closing this issue now.
Cheers :)

I can confirm that adding `udev` as a package allows the build to succeed :) This yaml file works ```yaml --- mmdebstrap: keyrings: - /usr/share/keyrings/debian-archive-keyring.gpg mode: unshare suite: bookworm target: root.tar.xz variant: minbase packages: - udev - watchdog ``` Closing this issue now. Cheers :)
brendansimon_indt closed this issue 11 months ago
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josch/mmdebstrap#37
Loading…
There is no content yet.