FreePBX / sng_freepbx_debian_install

FreePBX 17 Installation Script
51 stars 15 forks source link

[bug]: dahdi option leads script to fail #47

Closed schiffsratte closed 1 month ago

schiffsratte commented 1 month ago

FreePBX Version

FreePBX 17

Issue Description

On a fresh installation debian 12.5.0 kernel 6.1.0-21 using the --dahdi switch fails with Error at line: 664 exiting with code 100 (last command was: apt update >> $log 2>&1) A simple apt update fails also with Problem executing scripts APT::Update::Post-Invoke '/usr/bin/kernel-check --hold' which is the same cause for failure given in the log file . Trying to start the script again fails (line 640 this time) .

After deleting the file /etc/apt/apt.conf.d/05checkkernel the script would run again without but only without --dahdi.

I had the same problem before re-installation yesterday as I tried to add dahdi as I forgot it during the initial installation. The error is always the same:
Problem executing scripts APT::Update::Post-Invoke '/usr/bin/kernel-check --hold' also it may occur in different lines
I was not able to rerun the script or add an option without deleting the kernel check in /etc/apt/apt.conf.d/05checkkernel

Operating Environment

debian 12.5.0 netinstall freepbx17 freepbx17-install-2024.05.31-09.09.59-first-run.txt freepbx17-install-2024.05.31-09.15.26-second-run.txt

Relevant log output

No response

schiffsratte commented 1 month ago

apt update output after a failed run :

root@pbx:~# apt update
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://ftp.debian.org/debian stable InRelease
Hit:3 https://packages.sury.org/php bookworm InRelease
Ign:4 http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 InRelease
Hit:5 http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 Release
Hit:7 http://debian.proxad.net/debian bookworm InRelease
Hit:8 http://debian.proxad.net/debian bookworm-updates InRelease
Hit:9 http://debian.proxad.net/debian bookworm-backports InRelease
Hit:10 http://deb.freepbx.org/freepbx17-prod bookworm InRelease
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke '/usr/bin/kernel-check --hold'
E: Sub-process returned an error code
spurnasai commented 1 month ago

Hi @schiffsratte ,

We have tried to reproduce above mentioned issue with the OS which you have shared and executed the installation script by using "--dahdi" suffix. But we didn't find any issues with the installation part.

It would be great if you could share the step by step process and commands you have executed in the fresh debian system with us, so that we can check what is happening on your system where the script had failed.

Best regards, Purna

schiffsratte commented 1 month ago

This is the contents of my .bash_history :

apt install mc
mc -e /etc/ssh/sshd_config
systemctl restart sshd
apt install wget ack
wget https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh  -O /tmp/sng_freepbx_debian_install.sh
bash /tmp/sng_freepbx_debian_install.sh --dahdi   #<-- failed 
apt update                                        #<--failed
rm /etc/apt/apt.conf.d/05checkkernel              # OK
bash /tmp/sng_freepbx_debian_install.sh           # OK   
apt update                                        # OK   
bash /tmp/sng_freepbx_debian_install.sh --dahdi   #<-- fails again 
apt update                                        #<--fails again 
rm /etc/apt/apt.conf.d/05checkkernel              # OK
apt update                                        # OK   

I used the debian-12.5.0-amd64-netinst.iso downloaded on 28/05/2024 The kernel I choose during install was linux-image-amd64 I guess which gives me kernel 6.1.0-21. (The other choice would be linux-image-6.1.0-18-amd64) I'll try in a virtual machine if I get the same result

schiffsratte commented 1 month ago

Repeating the same installation in Virtualbox leads to the same result. I used the the graphical standard install option which installs a basic "debian desktop". Doing a minimal non graphical install in virtualbox does install freepbx17 with the dahdi option without any problem.

It seems that the graphical (desktop) installer installs some package which causes the script to fail I attached a diff of the packages lists between these two installation options. Maybe somebody will understand, which packages causes the failure. I could also provide the virtual machine if it is of any interest .

I will repeat the minimal installation on my hardware in order to confirm this. differences.txt

schiffsratte commented 1 month ago

It worked on the machine with actual dahdi hardware. So the choice of the installation options in the debian installer seems to matter to execute the installation script when using "--dahdi" suffix.

I close the bug as resolved