Closed dlabun closed 4 years ago
Not sure why your build continues. Mine fails with bootstrap.
If I recall correctly, debootstrap doesn't like running through capsh. Since it's not important during the bootstrap stage, we can just remove it, but it would be nice to know what the actual issue is.
I also got this error when using the docker build....
[22:19:29] Begin /pi-gen/stage1/02-net-tweaks/00-packages
Reading package lists...
Building dependency tree...
Reading state information...
netbase is already the newest version (5.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[22:19:30] End /pi-gen/stage1/02-net-tweaks/00-packages
[22:19:30] Begin /pi-gen/stage1/02-net-tweaks/00-patches
The quilt meta-data in .pc/ are already in the version 2 format; nothing to do
File series fully applied, ends at patch /pi-gen/stage1/02-net-tweaks/00-patches/01-hosts.diff
[22:19:30] End /pi-gen/stage1/02-net-tweaks/00-patches
[22:19:30] Begin /pi-gen/stage1/02-net-tweaks/00-run.sh
[22:19:30] End /pi-gen/stage1/02-net-tweaks/00-run.sh
[22:19:30] End /pi-gen/stage1/02-net-tweaks
[22:19:30] Begin /pi-gen/stage1/03-install-packages
[22:19:30] Begin /pi-gen/stage1/03-install-packages/00-packages
Reading package lists...
Building dependency tree...
Reading state information...
libraspberrypi-bin is already the newest version (1.20190620+1-1).
libraspberrypi0 is already the newest version (1.20190620+1-1).
raspi-config is already the newest version (20190620).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[22:19:31] End /pi-gen/stage1/03-install-packages/00-packages
[22:19:31] End /pi-gen/stage1/03-install-packages
[22:19:31] End /pi-gen/stage1
[22:19:31] Begin /pi-gen/stage2
[22:19:31] Begin /pi-gen/stage2/prerun.sh
[22:19:31] End /pi-gen/stage2/prerun.sh
[22:19:31] Begin /pi-gen/stage2/00-copies-and-fills
[22:19:31] Begin /pi-gen/stage2/00-copies-and-fills/01-packages
Reading package lists...
Building dependency tree...
Reading state information...
raspi-copies-and-fills is already the newest version (0.13).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[22:19:33] End /pi-gen/stage2/00-copies-and-fills/01-packages
[22:19:33] Begin /pi-gen/stage2/00-copies-and-fills/02-run.sh
mv: cannot stat '/pi-gen/work/2019-06-26-raspbian-nj/stage2/rootfs/etc/ld.so.preload': No such file or directory
real 0m18,773s
user 0m0,065s
sys 0m0,018s
For the sake of troubleshooting I pulled a clean copy of Pi-Gen to a 3B+ running Stretch and building Buster worked fine. The problem must reside within a change made in Debian between Stretch and Buster and not Pi-Gen itself.
Nope, still fails with missing folders / files during the export phase.
If I recall correctly, debootstrap doesn't like running through capsh. Since it's not important during the bootstrap stage, we can just remove it, but it would be nice to know what the actual issue is.
capsh
doesn't appear to be the issue, or at least replacing capsh --drop=cap_setfcap --
with /bin/bash
in scripts/common
still causes the build to fail for me, at the "rmdir: failed to remove ... Directory not empty" error (on latest Raspbian Buster).
capsh
doesn't appear to be the issue, or at least replacingcapsh --drop=cap_setfcap --
with/bin/bash
inscripts/common
still causes the build to fail for me, at the "rmdir: failed to remove ... Directory not empty" error (on latest Raspbian Buster).
The problem definitely seemed to be capsh for me. The build seems to be working since I replaced
setarch linux32 capsh --drop=cap_setfcap -- "${BOOTSTRAP_CMD}" "${BOOTSTRAP_ARGS[@]}" || true
with just
debootstrap "${BOOTSTRAP_ARGS[@]}" || true
Hmm yep, that works for me too, thanks.
Looks like my mistake was thinking that replacing it with /bin/bash
would be a good idea (based on the "Execute /bin/bash with trailing arguments" line in the capsh manpage).
It looks like this workaround breaks the APT proxy option, After making the same change on my end I started getting a lot of messages reading "Unsupported proxy configured: 192.168.2.1717//3142". It's odd because I can see Pi-Gen is pulling some files from the proxy at first but then suddenly it doesn't like the proxy any more.
Not working through bash was a good hint. Looks like it runs debootstrap through bash rather than sh then has compatibility issues?
Not sure how to fix this properly. We need capsh because otherwise you end up with files with capabilities set which will have problems on NFS filesystems or when archived with tar.
Capsh will only use bash, but will parse arguments, so -c "debootstrap ..."
works. Then things get hairy when it comes to making sure arguments are passed properly.
@jvonau I've tried your change:
debootstrap "${BOOTSTRAP_ARGS[@]}" || true
...and the build seems to work. However, I'm not sure I understand what would be the impact of this change? Could you please clarify?
@smg-bg Not sure of the total impact, haven't tried booting the resulting image yet. I was looking for quick way to continue working towards a custom image farther up the chain and the above mentioned fix got me past the error I was seeing. Easy to revert when there is a proper fix.
All of the images I've built with that workaround seem to work fine.
Good to know, thanks
I can also confirm that my custom image works fine with that fix.
If you don't drop cap_setfcap
you end up with files with capabilities set, which NFS doesn't support. So, if you're netbooting, you may find ping won't work without sudo
.
I think I have a fix here https://github.com/RPi-Distro/pi-gen/issues/338#issuecomment-546995455
I’ll test it this weekend.
An alternative fix here is to pass the full path to debootstrap. (The underlying issue is that in the case that breaks, $0
within debootstrap is not a fully qualified path)
Hi @benp44 / @RussellJoyce / @dlabun / @smg-bg / @mutability,
Do u guys still encounter same error "stage0/rootfs/proc: mount point does not exist." recently? If yes, can share your solution on this issue?
As I encounter same error today, but latest fix by @XECDesign on 29th October 2019 is already in the scripts/common file.
Here is error screenshot:
Here is scripts/common file code:
Thanks in advance!
I pulled the latest copy of the pi-gen project and builds are not completing due to missing file / folder issues. I assume this must be related to the move to Buster. This was run on a RPi 3B+ with a clean copy of Raspbian I just downloaded from the RPi website.