0

I create a shell scripts for unattended install proxmox-ve.

chroot $pve_target apt update
DEBIAN_FRONTEND=noninteractive chroot $pve_target apt install init systemd  -y 
DEBIAN_FRONTEND=noninteractive chroot $pve_target apt install ifenslave ifupdown proxmox-ve  -y

It will be ok when i enter commond and run it in tty3.But,in tty2,it will stuck at processing triggers for .

invoke-rc.d: policy-rc.d denied execution of start .
Setting up dbus (1. 12.24-0+deb11u1)
invoke-rc.d: policy-rc.d denied execution of start .
Setting up 1ibpam-systemd : amd64 (247.3-7+deb11u1)
Processing triggers for libc-bin (2.31- 13+deb11u5)
Progress:[98%][#####并###################################

I read the proxinstall ,I can use this commond and install deb from cdrom.


proxmox_libdir="/var/lib/proxmox-installer"
cp $proxmox_libdir/policy-disable-rc.d $pve_target/usr/sbin/policy-rc.d
cp $proxmox_libdir/fake-start-stop-daemon $pve_target/sbin/

diversion_add(){
    chroot $1 dpkg-divert --package proxmox --add --rename $2
    ln -sf $3 $1/$2
}

diversion_add $pve_target /sbin/start-stop-daemon /sbin/fake-start-stop-daemon
diversion_add $pve_target /usr/sbin/update-grub /bin/true
diversion_add $pve_target /usr/sbin/update-initramfs /bin/true
xxxxx
xxxxx
DEBIAN_FRONTEND=noninteractive chroot $pve_target dpkg --force-depends --no-triggers --force-unsafe-io --force-confold  --unpack /media/proxmox/packages/*;
DEBIAN_FRONTEND=noninteractive chroot $pve_target dpkg --force-confold --configure --force-unsafe-io -a 

The proxmox-ve packages will not latest by this way. So i want use apt to install proxmox-ve. I have pushed my code ,see github

Could anyone here help me please?

thanks a lot!

jiangcuo
  • 1
  • 1

0 Answers0