Updating Packages On Headless Machines

If you built a headless switch, you can still apply the latest patches to the system, despite the fact that most system updating is done nowdays with one of the GUI package managers. Under the covers, yum is still the base upon which all of the GUI package managers are built, so it is always possible to use it to apply package updates.

From the command propmpt of your telnet connection to the switch try this:

     su
     yum clean all
     yum check-update

This should give you a list of all the packages which can be updated. If you see any packages that you like and want to install, you can do it like this:

     su
     yum update package1 [package2] [...]

Where "package1", etc., are the names of the packages from the check-update list. Otherwise, if you want to go for broke, you can install all of the updates that are currently available like this:

     su
     yum update

You may have to reboot after some packages are installed:

     su
     /sbin/shutdown -r now

Also, note that, if any of the packages that you apply update the kernel, installing them will probably break DAHDI. This is because DAHDI installs many of its modules in the kernel tree and kernel updates change the configuration of this tree. If your switch doesn't come up properly, you should look in the Asterisk log for messages that look like this:

/var/log/asterisk/messages:

     Unable to open '/dev/dahdi/channel': No such file or directory

If you see such a message, you should shut down Asterisk and DAHDI and then try starting DAHDI on its own:

     su
     /etc/init.d/asterisk stop
     /etc/init.d/dahdi stop
     /etc/init.d/dahdi start

Check if this produces missing module error messages, for example:

     Loading DAHDI hardware modules:
     FATAL: Module dahdi not found.
     wct4xxp:  FATAL: Module wct4xxp not found.                    [FAILED]
     wcte12xp:  FATAL: Module wcte12xp not found.                  [FAILED]
          .
          .
          .

This indicates that the DAHDI modules can no longer be found in the kernel tree. You can check this by doing the following:

     su
     find /lib/modules -name wct\*

You should see a list of DAHDI modules that looks something like this:

     /lib/modules/2.6.18-164.11.1.el5/dahdi/wctc4xxp
     /lib/modules/2.6.18-164.11.1.el5/dahdi/wctc4xxp/wctc4xxp.ko
     /lib/modules/2.6.18-164.11.1.el5/dahdi/wctdm24xxp
     /lib/modules/2.6.18-164.11.1.el5/dahdi/wctdm24xxp/wctdm24xxp.ko
          .
          .
          .
     /lib/modules/2.6.18-164.15.1.el5/dahdi/wctc4xxp
     /lib/modules/2.6.18-164.15.1.el5/dahdi/wctc4xxp/wctc4xxp.ko
     /lib/modules/2.6.18-164.15.1.el5/dahdi/wctdm24xxp
     /lib/modules/2.6.18-164.15.1.el5/dahdi/wctdm24xxp/wctdm24xxp.ko
          .
          .
          .

In this case, we have DAHDI modules installed in two kernel trees. But, we need to verify that the DAHDI modules are in the current kernel tree. To do this, use the "uname -r" command to see what the current kernel is. You will see something like this:

     2.6.18-194.11.1.el5

This is bad news, since the DAHDI modules don't appear in the current kernel tree. To remedy this, you can try the following copy command:

     su
     cp -p -R /lib/modules/2.6.18-164.15.1.el5/dahdi /lib/modules/`uname -r`/

After you're done, you should now see an improved modules list, when you enter the command "find /lib/modules -name wct\*":

.

       .

/lib/modules/2.6.18-194.11.1.el5/dahdi/wctc4xxp /lib/modules/2.6.18-194.11.1.el5/dahdi/wctc4xxp/wctc4xxp.ko /lib/modules/2.6.18-194.11.1.el5/dahdi/wctdm24xxp /lib/modules/2.6.18-194.11.1.el5/dahdi/wctdm24xxp/wctdm24xxp.ko

       .
       .
       .

If so, reboot the system and see if DAHDI/Asterisk comes up. If not, you can do a rebuild of DAHDI and then reinstall it to fix the problem:

     cd .../asterisk/dahdi-linux-complete*
     make all
     su
     make install

You should now have no problem rebooting and DAHDI/Asterisk will come up.