On Wed, 29 Jan 2020 00:02:51 +0100 Johannes Schauer wrote: [...] > Quoting Francesco Poli (2020-01-28 23:41:38) [...] > > The lines that seem to fail are /usr/share/initramfs-tools/hooks/udev: > > 25 and the following ones... But why? > > yes, that's where it seems to fail. To further investigate you can try the > following: > > Copy /usr/share/autopkgtest/setup-commands/setup-testbed to a location that > you > control so that you can edit it. Remove all the parts that are not necessary > to > reproduce the problem. I suspect just keeping the line 'chroot "$root" > update-initramfs -u' is not sufficient and something else has to happen before > so that you can see the error? If that line alone is enough, then you should > also be able to reproduce the problem by running mmdebstrap with: > > --customize-hook='chroot "$1" update-initramfs -u'
I can get the error with just:
$ cd Downloads/
$ TMPDIR='./'
$ export TMPDIR
$ mmdebstrap --variant=important --include=linux-image-amd64 \
> --customize-hook='chroot "$1" passwd --delete root' \
> --customize-hook='chroot "$1" useradd --home-dir /home/user --create-home
user' \
> --customize-hook='chroot "$1" passwd --delete user' \
> --customize-hook='echo host > "$1/etc/hostname"' \
> --customize-hook='echo "127.0.0.1 localhost host" > "$1/etc/hosts"' \
> --customize-hook='chroot "$1" update-initramfs -u' \
> "sid" debian-unstable.tar
>
> Once you are that far, you either already have found the problem or the next
> thing you can try is to debug /usr/share/initramfs-tools/hooks/udev. To do
> that, just insert a "set -x" somewhere at the top. For example by adding the
> following before you call the failing hook:
>
> --customize-hook='awk "NR==2{print 'set -x'}1"
> "$1/usr/share/initramfs-tools/hooks/udev"'
I think I am getting nearer to understand the issue.
$ cd Downloads/
$ TMPDIR='.'
$ export TMPDIR
$ mmdebstrap --variant=important --include=linux-image-amd64 \
> --customize-hook='chroot "$1" passwd --delete root' \
> --customize-hook='chroot "$1" useradd --home-dir /home/user --create-home
user' \
> --customize-hook='chroot "$1" passwd --delete user' \
> --customize-hook='echo host > "$1/etc/hostname"' \
> --customize-hook='echo "127.0.0.1 localhost host" > "$1/etc/hosts"' \
> --customize-hook='sed -i "1a set -x"
"$1/usr/share/initramfs-tools/hooks/udev"' \
> --customize-hook='chroot "$1" update-initramfs -u' \
> "sid" debian-unstable.tar
[...]
+ PREREQS=
+ prereqs
+ echo
+ exit 0
+ PREREQS=
+ . /usr/share/initramfs-tools/hook-functions
+ mkdir -p ./mkinitramfs_1itDzt/lib/systemd
[...]
+ mkdir -p ./mkinitramfs_1itDzt/etc/udev
+ cp -p /etc/udev/udev.conf ./mkinitramfs_1itDzt/etc/udev/
+ mkdir -p ./mkinitramfs_1itDzt/lib/systemd/network/
+ find /lib/systemd/network -name *.link -execdir cp -pt
./mkinitramfs_1itDzt/lib/systemd/network/ {} +
cp: failed to access './mkinitramfs_1itDzt/lib/systemd/network/': No such
file or directory
E: /usr/share/initramfs-tools/hooks/udev failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-3-amd64 with 1.
E: run_chroot failed: E: command failed: chroot "$1" update-initramfs -u
I: main() received signal PIPE: waiting for setup...
W: listening on child socket failed: E: received eof on socket
I: removing tempdir ${HOME}/Downloads/mmdebstrap._p8KPoNDcS...
The issue seems to be that the -execdir option passed to find causes
the command "cp" to be run from the subdirectory containing the matched
file "/lib/systemd/network", but the destination directory is a
relative path "./mkinitramfs_1itDzt/lib/systemd/network/", which has
been previously created, but not under "/lib/systemd/network" !
If I set TMPDIR=$(pwd) in stead of TMPDIR='.' or TMPDIR='./'
I get to the end of the process without major errors.
Except for some warnings such as:
W: Unable to read ${HOME}/Downloads/48yluzcM8D - RealFileExists (2: No such
file or directory)
Should I worry about them?!?
At least I obtain a non-empty debian-unstable.tar and I manage to
create debian-unstable.img with guestfish and then convert it to
debian-unstable.qcow2 with qemu-img...
Now I am running out of time, but I hope I will soon get to check the
resulting .qcow2 file (I have to test whether it can successfully be
used as an autopkgtest testbed).
I'll let you know, thanks for all you invaluable help so far! :-)
>
> I would love to help more but I already tried out the failing command on three
> different systems and I'm unable to reproduce it.
Which TMPDIR were you using?
--
http://www.inventati.org/frx/
There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
pgpSFx32kRtKR.pgp
Description: PGP signature

