debootstrap bullseye

flexyz

Well-Known Member
Sep 22, 2016
154
9
58
54
Hi

I am having problems running debootstrap with the bullseye:

Any clues?


Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.11.22-5-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
unshare: cannot change root filesystem propagation: Invalid argument
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for pve-ha-manager (3.3-1) ...
Errors were encountered while processing:
ifupdown2
pve-manager
proxmox-ve
pve-kernel-5.11.22-5-pve
pve-kernel-5.11
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
how exactly are you running debootstrap?

Code:
unshare: cannot change root filesystem propagation: Invalid argument
sounds like it runs into an issue running the bootloader helper in a new mount namespace..
 
Is there anything I can check do? - my goal is to be able to provision a PVE cluster remote with automation and the ISO installer don't have any automation option right?
 
it would help if you gave the steps you attempted, else it's a bit hard to say what's going on...
 
Yes of course, here is my steps:

01. mkdir /mnt/chroot
02. debootstrap bullseye /mnt/chroot
03. mount -t proc none /mnt/chroot/proc
04. mount -t sysfs none /mnt/chroot/sys
05. mount --bind /dev /mnt/chroot/dev
06. chroot /mnt/chroot /bin/bash
07.
cat <<EOF > $MNT_DIR/etc/hosts
127.0.0.1 localhost
10.10.10.10 pve1
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
EOF
08. apt install -y wget net-tools
09. echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
10. apt update && apt full-upgrade -y
11. apt install -y proxmox-ve postfix open-iscsi
 
works fine here (if I add in steps like 'add repo GPG key' and 'setup /etc/network/interfaces' ;)) - what is the host system you are running this on?
 
Really? great to hear, I tried it on a clean Ubuntu 20.x and a Debian 11.x Don't understand why it does not work for me. What additional steps did you do and what OS are u running it from?

Thanks!
 
Last edited:
PVE 7.x ;) I only added those that I mentioned above - configure the PVE repo key (else the repo can't be verified/used) and filling /etc/network/interfaces (else ifupdown2 will complain/fail to install)
 
Tried is from PVE 7.x and same problem :(

root@pve:/# cat /etc/debian_version
11.1

root@pve:/# uname -a
Linux pve 5.11.22-4-pve #1 SMP PVE 5.11.22-8 (Fri, 27 Aug 2021 11:51:34 +0200) x86_64 GNU/Linux

01. mkdir /mnt/chroot
02. debootstrap bullseye /mnt/chroot
03. mount -t proc none /mnt/chroot/proc
04. mount -t sysfs none /mnt/chroot/sys
05. mount --bind /dev /mnt/chroot/dev
06. chroot /mnt/chroot /bin/bash
07. apt install -y wget net-tools
08. echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
08. wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
09. apt update && apt full-upgrade -y
10. apt install -y proxmox-ve postfix open-iscsi

Can you post the files changed?


/etc/hosts
127.0.0.1 localhost.localdomain localhost

10.45.6.131 pve1

# The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/network/interfaces
auto lo
iface lo inet loopback

iface ens18 inet manual

auto vmbr0
iface vmbr0 inet static
address 10.45.6.131/24
gateway 10.45.6.6
bridge-ports ens18
bridge-stp off
bridge-fd 0

debootstrap:

root@pve:/# apt install -y proxmox-ve postfix open-iscsi
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
open-iscsi is already the newest version (2.1.3-5).
postfix is already the newest version (3.5.6-1+b1).
proxmox-ve is already the newest version (7.0-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LC_TERMINAL = "iTerm2",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
Setting up initramfs-tools (0.140) ...
update-initramfs: deferring update (trigger activated)
Setting up ifupdown2 (3.1.0-1+pmx3) ...

network config changes have been detected for ifupdown2 compatibility.
Saved in /etc/network/interfaces.new for hot-apply or next reboot.

Reloading network config on first install
error: Another instance of this program is already running.
dpkg: error processing package ifupdown2 (--configure):
installed ifupdown2 package post-installation script subprocess returned error exit status 89
Setting up pve-kernel-5.11.22-5-pve (5.11.22-10) ...
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.11.22-5-pve /boot/vmlinuz-5.11.22-5-pve
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.11.22-5-pve /boot/vmlinuz-5.11.22-5-pve
update-initramfs: Generating /boot/initrd.img-5.11.22-5-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
unshare: cannot change root filesystem propagation: Invalid argument
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/pve-kernel-5.11.22-5-pve.postinst line 19.
dpkg: error processing package pve-kernel-5.11.22-5-pve (--configure):
installed pve-kernel-5.11.22-5-pve package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of pve-manager:
pve-manager depends on ifupdown2 (>= 2.0.1-1+pve8) | ifenslave (>= 2.6); however:
Package ifupdown2 is not configured yet.
Package ifenslave is not installed.

dpkg: error processing package pve-manager (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of pve-kernel-5.11:
pve-kernel-5.11 depends on pve-kernel-5.11.22-5-pve; however:
Package pve-kernel-5.11.22-5-pve is not configured yet.

dpkg: error processing package pve-kernel-5.11 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of proxmox-ve:
proxmox-ve depends on pve-kernel-5.11; however:
Package pve-kernel-5.11 is not configured yet.
proxmox-ve depends on pve-manager; however:
Package pve-manager is not configured yet.

dpkg: error processing package proxmox-ve (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.11.22-5-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
unshare: cannot change root filesystem propagation: Invalid argument
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
ifupdown2
pve-kernel-5.11.22-5-pve
pve-manager
pve-kernel-5.11
proxmox-ve
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
ah, the problem is that your /mnt/chroot is not a mountpoint, but a plain directory..
 
well.. use a mountpoint for the root file system?