Online Upgrades

A few improvements and additions are already in the pipeline, but I was looking for a convenient way to get new enhancements to existing installations for some time. System upgrades should be capable of:

  • Delivering bug fixes and security patches for all installed software packages
  • Add new software and configuration improvements to further enhance the system
  • Avoid the hassle of re-flashing the SD card and manually transferring all settings and customisations people made.

To achieve this, I wrote a small upgrade tool that is using an additional Debian repository specific to the RasPBX project. Bug fixes and security patches for software that was installed through the Raspbian repositories are already delivered through apt-get dist-upgrade. Patches for additional, non-Raspbian software will be delivered through the RasPBX Debian repository. On top, the upgrade tool also installs new packages to deliver enhancements and additions as well.

To take part in the upgrades, first-time installation needs to be done running this command on the console:

wget -O /tmp/raspbx-upgrade && chmod 755 /tmp/raspbx-upgrade && /tmp/raspbx-upgrade

This step is required only once, subsequent upgrades can be performed by just running:


The downloads page will be continuously updated with short descriptions whenever new upgrades become available.

The new system has only been tested with the latest raspbx-12-09-2012 release, no guarantee if it works with previous versions as well.

Some additional background information:
The raspbx-upgrade tool calls apt-get dist-upgrade, thus security fixes of all Raspbian originated software will be installed. This is the recommended way to keep your system up to date anyhow. Raspbx-upgrade is installed as Debian package as well, thus if you manually run apt-get dist-upgrade, upgrades to raspbx-upgrade will be installed as well. This will however not directly install new software, you need to call raspbx-upgrade to get new additions on top. If you do not run raspbx-upgrade, nothing new will be installed to your system and you can still use apt-get dist-upgrade in the way you are used to it. There are no automatic upgrades happening for now.

Concerning expected installation lifetime: Debian Wheezy will be officially released as stable soon. From this day, Wheezy will be the stable distribution for at least 2 years. This is the expected time span during which upgrades can keep your installation up to date, maybe even for longer.

15 thoughts on “Online Upgrades

  1. I believe you should add the fake-hwclock pre installed…. it really helps on quite a lot of cases.

    • Can you tell me a bit more about those cases? I decided against adding fake-hwclock by default, for several reasons:
      1. In almost all use cases Asterisk runs VoIP calls through the Internet, therefore an Internet connection is present anyway. Ntpd retrieves local time from the network, there is no real need for fake-hwclock
      2. When testing the setup, I found a jump in time caused by ntpd retrieving the time after Asterisk started caused severe instabilities to Asterisk. I had a lot of jitter on calls, and dropped calls. So I decided to have this startup script that ensures Asterisk is started only with correct time. When fake-hwclock is installed, I cannot reliably detect the time is correct or not, and it is highly possible the time jumps later when ntpd suddenly retrieves the correct time. Therefore, with fake-hwclock installed, I have to fear jitters and drops are happening often with peoples RPis.

      So I decided against fake-hwclock installed by default. People can install it easily with “apt-get install fake-hwclock” if they need it.

      • I didn’t know that it was causing unpredicted behavior. I haven’t noticed something myself anyway and it really bugged me to see my server uptime to be 30+ years.

  2. Now that Asterisk 11 has been released and there’s a beta for FreePBX using Asterisk 11, would you be up for having a beta image too?

    I’d love to be able to use Asterisk 11 on my Pi using a standard image

    • Thank you for asking, I’ve been working on Asterisk 11 already. If you want to try it, use the latest image from the downloads page (or if you already have the September version, make sure to have the upgrades installed). Then call
      apt-get update
      apt-get install asterisk11

      Asterisk 11 seems to work so far, but I could not test much yet. Therefore, your feedback is highly appreciated!

  3. Fixed… Never upgrade a running system if you don’t need to.

    Try sudo apt-get purge raspbx-upgrade.


  4. Hi there,
    Question please re the update.
    I applied the update to the previous installation and now eth0 does not find an IP adresse from a DHCP server anymore.

    Is there any way to reverse this upgrade?

    • Ups, sorry for this! Remove the update by editing /etc/default/dhcpcd, change the line
      OPTIONS=( -I 'raspbx')
      OPTIONS=( -I '')
      Let me know if this helped. I will fix the corresponding upgrade immediately.

  5. Will this update tool work if I use my own image with Asterisk and FreePBX installed on it? (using instruction posted earlier)
    The Asterisk image doesn’t seem to load on my Pi.

    • The upgrade tool was written for the RasPBX image from the download page and will most probably fail on other installations.
      I have just updated the image: Let me know if this works for you.

  6. Thank you, but…
    If I try this, I get some errors (I do it via SSH..)

    My output in PuTTY:

    root@raspbx:~# wget -O /tmp/raspbx-upgrade && chmod 755 /tmp/raspbx-upgrade && /tmp/raspbx-upgrade
    –2012-10-24 23:32:44–
    Resolving (…
    Connecting to (||:80… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 5518 (5.4K) [text/plain]
    Saving to: `/tmp/raspbx-upgrade’

    100%[=====================================================================================================================================================================>] 5,518 –.-K/s in 0.02s

    2012-10-24 23:32:44 (223 KB/s) – `/tmp/raspbx-upgrade’ saved [5518/5518]

    RasPBX upgrade tool
    Run “/tmp/raspbx-upgrade –help” for additional options
    Installing repository.
    Hit wheezy InRelease
    Get:1 wheezy InRelease [12.5 kB]
    Err wheezy InRelease

    Err wheezy InRelease

    Fetched 12.5 kB in 0s (36.6 kB/s)
    Reading package lists… Done
    W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: wheezy InRelease: File /var/lib/apt/lists/repo.raspbx.org_apt_debian_dists_wheezy_InRelease doesn’t start with a clearsigned message

    W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: wheezy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E

    W: Failed to fetch

    W: Failed to fetch

    W: Some index files failed to download. They have been ignored, or old ones used instead.
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package raspbx-upgrade
    Error running apt-get install raspbx-upgrade

    Can you help me please, I don’t what I’m doing wrong?

    • It looks like it could not update the repositories. The error happens here:

      Err wheezy InRelease
      Err wheezy InRelease

      Also the Raspbian repository could not be updated. Maybe a network error happened during this update. Can you just re-run the upgrade tool? Can you try the command

      apt-get update

      to see if this works?

  7. Thanks! Just run the update and there is no smoke. 🙂

    Would also like to know where the donate button is.

    • Thanks for asking, but there is no donate button (yet). Maybe I’ll add it one day, but for now, just feel invited! 🙂