Can't reboot system after install_prereq execution

Hi to all!

I’m trying to install Asterisk on a fresh-installed Ubuntu server 16.04, without any desktop, running in a VirtualBox virtual machine.
After executing install_prereq install, if I try to reboot the system, I get the GRUB shell, and can’t start the server anymore. install_prereq has done something destructive, please help me understand what happens.

Follwing are all the steps I have executed:

  • Create a new VirtualBox virtual machine, and install Ubuntu server 16.04 on it

  • Stop and remove the apparmor service

  • Install automake, autoconf and libtool

  • Download asterisk-certified-16.3-cert1 source archive, in /usr/local/src directory

  • Entering the asterisk-certified..../contrib/scripts directory, and execute ./install_prereq install command

The process ends with

Current status: 206 (-62) upgradable
install completed successfully

At this point (without shutting down the system) I take a snapshot of the vm, then I shutdown.
When I restart the vm, this can no longer boot, and I only have the GRUB shell.

If I restore the snapshot and (without ever rebooting) go on with Asterisk build and installation, all is ok, and I can start Asterisk.
Configuring it as indicated in the wiki Getting started --> Hello world section, it works correctly, and I can correctly call Asterisk from a ZoiPer soft-telephone.
But I can no longer reboot my server.

During install_prereq execution, I can see that a lot of packages are installed, but also a lot of packages are removed, maybe even something that shouldn’t have been removed, I don’t know.

Is there someone who can help me? Thanks in advance!

On a vanilla system, that script should not remove anything. Please, post all the packages which are in conflict. By the way, you can test the script by going for
sudo ./contrib/scripts/install_prereq test
Only ‘aptitude’ has to be installed. Furthermore, you might not need all packages. I recommend to open that script and look at the line ‘basic requirements’. Only those packages (and the once above) are really required. Finally, I recommend to go not for a certified release (because those are terrible old and only required if you have a support contract with Sangoma/Digium) but the long-term support release Asterisk 16 LTS.

I had similar problems installing Asterisk on Ubuntu server 16.04 and 18.04, with or without desktop installed on it, both on virtual machine and on “real” hardware. I was going crazy…

Then I tried to install Asterisk on a LUbuntu 18.04 fresh installed system (thus a desktop version, not a server one), on a “real” hardware (Advantech aimb-285 motherboard), and all is ok, no problem during all installation steps, and now Asterisk is working correctly, with also DAHDI, LibPRI and Wanpipe driver installed (I have also a Sangoma ISDN PRI card).

May be Asterisk have problem when installed on Ubuntu server version?

Issues like your yours are important to know because not only you but many more are facing exactly the same issue. However, they never report. Therefore, this is valuable information and worth an investigation. The first step is to reproduce the issue. Thanks to your last reply, I was able to reproduce it with Ubuntu Server 16.04 LTS. and Asterisk 16 LTS. The script ./contrib/scripts/install_prereq assumes that you executed:

sudo apt upgrade

This fixed the issue for me and should be sufficient for all Debian based systems. By the way, for a virtual machine installation of a Ubuntu system, I recommend to do:

sudo apt upgrade && sudo snap refresh

after the first start because the automatic updater of snap might never kick in. Anyway, I am going to discuss this issue and fix with the Asterisk Team. Currently, this is mentioned (hidden and not explicitly but implicitly worded) in one of the Wiki guides. Perhaps we find a better approach so this issue is avoided. In other words, please, give it a try again and test whether my fix above solves this issue for you too. Then, the fix is confirmed and we can proceed.

By the way: Why do you remove apparmor but install automake, autoconf, and libtool. The latter three should not be needed for Asterisk itself, only for the optional DAHDI.

I will try your fix asap, and I will post results, thank you.

I have a Sangoma ISDN PRI board, thus I need DAHDI, LibPRI and Wanpipe.
I removed apparmor after the first failed tests, thinking that the problems could came from there.

1 Like

@traud

I restarted the installation process from scratch, on the same hardware that I used previously (Advantech aimb-285 motherboard), on Ubuntu server 16.04, using the fix that you already tried, and all seems ok.

I executed the following steps:

  • I installed Ubuntu server 16.04.

  • On the very first boot of the o.s., I executed following commands:

    $ sudo apt update
    $ sudo apt upgrade

then I rebooted the system.

  • I installed LUbuntu desktop

Then I downloaded DAHDI 3.1, LibPRI 1.6 and Asterisk 16.9 LTS and installed them exactly in this order.

I had an issue while running make for DAHDI: I got a “Syntax error at line 18566” in dahdi tools/configure file. Then I commented out a group of lines in that file (from 18564 to 18610, related to LIBUSBX and LIBUSB), and ran make again: DAHDI installed succesfull.

No other issues installing other packages, then I also installed Sangoma Wanpipe driver.

All is working ok. Thank you for your fix!

Thanks for the feedback.

Please, report …
However, I did not replicate that because I do not need/use DAHDI.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.