- Package:
- debootstrap
- Source:
- debootstrap
- Submitter:
- "Kristian Klausen"
- Date:
- 2023-11-28 00:09:06 UTC
- Severity:
- normal
Hi When running debootstrap inside a Docker container, debootstrap umount both /proc and $TARGET/proc. This is due to a missing check at: https://salsa.debian.org/installer-team/debootstrap/blob/67a3c1c5f7ef44a6596f75b787289b3392c50759/scripts/debian-common#L104 Due to the missing check debootstrap umount "$TARGET/proc", which is a symlink to /proc [1]. I will open a MR shortly. [1] https://salsa.debian.org/installer-team/debootstrap/blob/67a3c1c5f7ef44a6596f75b787289b3392c50759/scripts/debian-common#L68 - Kristian Klausen
I have opened a MR: https://salsa.debian.org/installer-team/debootstrap/merge_requests/26
control: tags -1 +moreinfo Hi, How do I check it? - run docker - get debootstrap 1.0.110 and install it - debootstrap sid sid - /proc is there inside docker as below
control: tags -1 -moreinfo Hi Sorry for the late response. I wasn't subscribed to the bug (I assume?). regular non-privileged container. I just tried and "/proc" is unmounted: $ docker run --privileged --rm -t -i debian:stretch-backports bash $ apt-get update && apt-get install -y -t stretch-backports debootstrap $ debootstrap stretch chroot $ ls /proc # it is empty I also tried the debootstrap version in sid: $ docker run --privileged --rm -t -i debian:sid bash $ apt-get update && apt-get install -y debootstrap $ debootstrap sid chroot $ ls /proc # it is empty Also please see the MRs: https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/26 https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/27 https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/30 I'm not sure which approach is the best, but Eicke did a short analysis: https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/26#note_171042--- - Kristian Klausen
Dear Maintainer, Reproducable: $ docker run --rm -it --privileged debian:bullseye bash $ apt update && apt install debootstrap $ apt policy debootstrap # shows version 1.0.123 is installed $ debootstrap bullseye chroot Output: I: Target architecture can be executed I: Retrieving InRelease ... I: Extracting zlib1g... W: Failure trying to run: chroot "//chroot" mount -t proc proc /proc W: See //chroot/debootstrap/debootstrap.log for details I: Installing core packages... ... I: Base system installed successfully. Checking output: $ echo $? # return 0 $ ls /proc # its empty! I have noticed when you use a debian stretch container, everything is ok. This means the issue was not there in debootstrap 1.0.89
While triaging #919659, I found this bug report. I've tried with buster (oldstable): docker run --rm -it --privileged debian:buster bash apt-get update apt-get install debootstrap debootstrap --version -> debootstrap 1.0.114+deb10u1 debootstrap buster chroot It works, debootstrap reports: I: Base system installed successfully. With kind regards, Roland Clobus
reopen 921815 thanks […] But did you also test whether /proc was not umounted? bye, //mirabilos
Hello Thorsten, Before and after the debootstrap command, the output of mount inside the docker container is identical. Then I exit the docker container, and in the host (running sid) /proc is still mounted. So all is as expected. What did you see when you tested while reopening this bug report? With kind regards, Roland Clobus
Do you want to have a more exact version? Which I closed this issue, I used the version that is present in Buster. (Version: 1.0.114+deb10u1) Going deeper into older versions didn't seen necessary to me. With kind regards Roland Clobus
close 921815 1.0.114+deb10u1 thanks Yeah, that’s probably fine, thanks.