So I am trying to bootstrap a Ubuntu as unprivileged user on Ubuntu. The little script I am using is:
#!/usr/bin/env bash
DEBARCHIVE_URL="http://localhost:3142/de.archive.ubuntu.com/ubuntu/"
LANG=en_US.UTF-8 \
fakeroot-ng -f -l"$(pwd)/fakeroot-ng.log" -p"$(pwd)/fakeroot-ng.state" \
fakechroot \
debootstrap \
--keep-debootstrap-dir \
--exclude=dhcp3-common,dhcp3-client,laptop-detect,tasksel,tasksel-data \
--variant=fakechroot \
--arch=amd64 \
$(lsb_release -sc) "${1:-$(pwd)/build_chroot}" ${DEBARCHIVE_URL}
The gist is, that debootstrap hangs at the following operation:
I: Configuring makedev...
In htop (but not in pstree) I can see that the blocking command is:
mknod mem- c 1 1
invoked by:
/bin/sh - /sbin/MAKEDEV std consoleonly fd
invoked by:
/bin/sh -e /var/lib/dpkg/info/makedev.postinst configure
which itself is invoked by dpkg.
Summary (in order of invocation):
/bin/sh -e /var/lib/dpkg/info/makedev.postinst configure
/bin/sh - /sbin/MAKEDEV std consoleonly fd
mknod mem- c 1 1
This is flabbergasting, since I am giving --variant=fakechroot and therefore should expect to have no trouble with potentially privileged commands.
What am I doing wrong or how else would I go about bootstrapping a chroot environment for later use with fakeroot fakechroot chroot ...?
Here's the relevant tail of the fakeroot log file:
4937: Called mknod(NONE)
mknod: 4937 tried to create character device, turn to regular file
mknod: 4937 mode 401
4502: Calling syscall 5 redirected from open
4937: Called mknod(RETURN)
mknod: 4937 call failed with error Permission denied
4502: Called syscall 5, redirected from open
open: 4502 map for dev 5 inode 1029 already exists - doing nothing
process 4937 orig_sc=133 actual sc=79 state=RETURN