PlugPBX Forums
May 19, 2012, 01:51:11 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: Dockstar Debian/Asterisk Install Instructions - Part 1  (Read 13595 times)
klingon
Newbie
*
Posts: 41


« on: July 25, 2010, 10:42:21 AM »

Here are my notes for a working Debian and Asterisk install.  Hope it works for you too.

Kernel 2.6.34.1
Asterisk 1.6.2.6
Dahdi Complete 2.2.1+2.2.1
Add-ons 1.6.2.0
Libpri 1.4.10.2

#####  USUAL DISCLAIMERS about bricking your Dockstar #######

STEP 1 :
Install Debian as per instructions at jeff.doozan.com/debian.  Use below script instead of the one provided at jeff's site.  This will install kernel 2.6.34.1

INSTALL Debian (executable script)
Code:
#!/bin/sh
#
# Install Debian Lenny on DockStar

# Copyright (c) 2010 Jeff Doozan
# based on work by John Tocher
# many thanks for his installation method
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.


# Version 1.2   [7/23/2010] Re-enable dropbear on pogoplug 1.2.1 firmware
# Version 1.1   [7/21/2010] Add option to automatically cleanup pogoplug scripts
# Version 1.0.2 [7/18/2010] More path fixes
# Version 1.0.1 [7/17/2010] Fixed typo in mirror URLs
# Version 1.0   [7/16/2010] Initial Release

# Much of this is shamelessly borrowed from the following sources:
#
# http://www.plugapps.com/index.php5?title=PlugApps:Pogoplug_Setboot
# http://www.cyrius.com/debian/kirkwood/sheevaplug/
# http://ahsoftware.de/dockstar/
# http://bzed.de/posts/2010/05/installing_debian_on_the_guruplug_server_plus/

# Many thanks to DogBoy and everyone else in #plugapps on freenode

echo ""
echo ""
echo ""
echo ""
echo "This script will configure your Dockstar to boot Debian Lenny"
echo "from a USB device.  Before running this script, you should have"
echo "used fdisk to create the following partitions:"
echo ""
echo "/dev/sda1 (Linux ext2, at least 400MB)"
echo "/dev/sda2 (Linux swap, recommended 256MB)"
echo ""
echo ""
echo "This script will DESTROY ALL EXISTING DATA on /dev/sda1"
echo "Please double check that the device on /dev/sda1 is the correct device."
echo ""
echo -n "If everything looks good, type 'ok' to continue: "

read IS_OK
if [ "$IS_OK" != "OK" -a "$IS_OK" != "Ok" -a "$IS_OK" != "ok" ];
then
  echo "Exiting..."
  exit
fi

# Stop the pogoplug engine
killall -q hbwd

# Definitions

# Original package sources
#URL_MKE2FS=http://plugapps.com/os/pogoplug/mke2fs
#URL_BLPARAM=http://plugapps.com/os/pogoplug/uboot/blpararm
#URL_POGO_UBOOT=http://plugapps.com/os/pogoplug/uboot/pogo_u-boot_install.sh
#URL_DEBIAN_BASE=http://people.debian.org/~tbm/sheevaplug/lenny/base.tar.bz2
URL_SHEEVA_UIMAGE=http://sheeva.with-linux.com/sheeva/2.6.34.1/sheeva-2.6.34.1-uImage
URL_SHEEVA_MODULES=http://sheeva.with-linux.com/sheeva/2.6.34.1/sheeva-2.6.34.1-Modules.tar.gz

# Download from package mirror
URL_MKE2FS=http://jeff.doozan.com/debian/mke2fs
URL_BLPARAM=http://jeff.doozan.com/debian/uboot/blparam
URL_POGO_UBOOT=http://jeff.doozan.com/debian/uboot/pogo_u-boot_install.sh
URL_DEBIAN_BASE=http://jeff.doozan.com/debian/lenny/base.tar.bz2
#URL_SHEEVA_UIMAGE=http://jeff.doozan.com/debian/lenny/sheeva-2.6.33-uImage
#URL_SHEEVA_MODULES=http://jeff.doozan.com/debian/lenny/sheeva-2.6.33-Modules.tar.gz


# Where should the temporary 'debian root' be mounted
ROOT=/tmp/debian

#########################################################
#  There are no user-serviciable parts below this line
#########################################################

ROOT_DEV=/dev/sda1 # Don't change this, uboot expects to boot from here
SWAP_DEV=/dev/sda2

# Create the mount point if it doesn't already exist
if [ ! -f $ROOT ];
then
  mkdir -p $ROOT
fi


# Get the source directory
SRC=
SRC_OPT=$ROOT
while [ "$SRC" == "" ]; do

  echo ""
  echo ""
  echo ""
  echo "SOURCE FILES"
  echo ""
  echo "Please enter the path to the install files"
  echo "If the install files are not found in the specified directory, they will be downloaded there"
  echo "If you don't care, just press Enter"
  echo ""
  echo -n "Source Path: [$SRC_OPT] "
  read SRC_IN

  if [ "$SRC_IN" != "" ];
  then
    if [ -d "$SRC_IN" ];
    then
      SRC=$SRC_IN
    else
      SRC_OPT=$SRC_IN
    fi
  # User pressed enter, check SRC_OPT
  else
    if [ "$SRC_OPT" != "" -a -d "$SRC_OPT" ];
    then
      SRC=$SRC_OPT
    fi
  fi

done


echo ""
echo ""
echo ""
echo "DISABLE POGOPLUG SERVICES"
echo ""
echo "The pogoplug service includes an auto-update feature which could"
echo "be used to cripple or disable your device.  It is recommended"
echo "that you disable this service."
echo ""
echo "NOTE: The pogoplug service is proprietary software"
echo "created by Cloud Engines.  It is not available for use"
echo "in other distributions and will not be available in"
echo "your new debian installation even if you choose not to disable it."
echo ""
echo -n "Would you like to disable the pogoplug services? [Y/n] "
read DISABLE
if [ "$DISABLE" == "" -o "$DISABLE" == "y" -o "$DISABLE" == "Y" ];
then

  echo "Applying fixes to the pogoplug environment..."

  mount -o rw,remount /

  # Add /sbin to the path and cleanup the shell prompt
  if [ ! -f /root/.bash_profile ]; then
    echo -e \
"export PS1='\h:\w\$ '
export PATH='/usr/bin:/bin:/sbin'
" > /root/.bash_profile
  fi

  chmod go+w /dev/null

  # Re-enable dropbear (1.2.1 dockstars only)
  sed -i 's/^#\/usr\/sbin\/dropbear/\/usr\/sbin\/dropbear/' /etc/init.d/db > /dev/null 2>&1


  echo "Disabling the pogoplug service..."

  # Comment out the line that starts hmbgr.sh
  sed -i 's/^\/etc\/init.d\/hbmgr.sh start/#Uncomment the line below to enable the pogoplug service\n#\/etc\/init.d\/hbmgr.sh start/' /etc/init.d/rcS
  
  
  mount -o ro,remount /
fi

##########
##########
#
# Format /dev/sda
#
##########
##########

umount $ROOT > /dev/null 2>&1

if [ ! -f $SRC/mke2fs ];
then
  wget -P $SRC $URL_MKE2FS
  chmod +x $SRC/mke2fs
fi

$SRC/mke2fs $ROOT_DEV
/sbin/mkswap $SWAP_DEV

mount $ROOT_DEV $ROOT

##########
##########
#
# Configure uBoot, per the directions at http://www.plugapps.com/index.php5?title=PlugApps:Pogoplug_Setboot
#
##########
##########


# Install blparam
if [ ! -f /usr/local/cloudengines/bin/blparam ];
then
mount -o rw,remount /
  wget -P /usr/local/cloudengines/bin $URL_BLPARAM
  chmod +x /usr/local/cloudengines/bin/blparam
  mount -o ro,remount /
fi

echo ""
echo ""

bootcmd=`/usr/local/cloudengines/bin/blparam | grep "bootcmd="`
if [ "$bootcmd" == "bootcmd=run bootcmd2" ]; then
  echo "Custom boot sequence detected, skipping installation..."
else
  
  # Get the uBoot install script
  if [ ! -f $SRC/pogo_u-boot_install.sh ];
  then
    wget -P $SRC $URL_POGO_UBOOT
    chmod +x $SRC/pogo_u-boot_install.sh
  fi

  echo "Installing Bootloader"
  # install chained pogobox uBoot on mtd3
  $SRC/pogo_u-boot_install.sh

fi                                                          
                                                          

##########
##########
#
# Download Packages
#
##########
##########

echo ""
echo ""
echo ""
echo "Downloading packages to $SRC"
echo ""
echo "Downloading Debian base"

if [ ! -f $SRC/base.tar.bz2 ];
then
  wget -P $SRC $URL_DEBIAN_BASE
fi


echo ""
echo "Downloading sheeva kernel"

# Get sheeva kernel
if [ ! -f $SRC/sheeva-2.6.34.1-uImage ];
then
  wget -P $SRC $URL_SHEEVA_UIMAGE
fi

# Get sheeva modules
if [ ! -f $SRC/sheeva-2.6.34.1-Modules.tar.gz ];
then
  wget -P $SRC $URL_SHEEVA_MODULES
fi

##########
##########
#
#
# Install Packages
#
#
##########
##########

# Extract Debian base
tar -xjv -C $ROOT -f $SRC/base.tar.bz2

# Remove old debian boot and modules
rm -rf $ROOT/boot
rm -rf $ROOT/lib/modules
mkdir $ROOT/boot

## Generate /etc/fstab
echo \
"# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
none           /dev/pts        devpts  defaults          0       0
none           /dev/shm        tmpfs   nodev,nosuid      0       0
$ROOT_DEV      /               ext2    errors=remount-ro 0       1
$SWAP_DEV      none            swap    sw                0       0
" > $ROOT/etc/fstab

#proc           /proc           proc    defaults          0       0

cp $SRC/sheeva-2.6.34.1-uImage $ROOT/boot/uImage
chmod 644 $ROOT/boot/uImage
tar -xzv -C $ROOT -f $SRC/sheeva-2.6.34.1-Modules.tar.gz


##### All Done

umount $ROOT > /dev/null 2>&1

echo ""
echo ""
echo ""
echo ""
echo "Installation complete"
echo ""
echo "You can now reboot your device into Debian."
echo "If your device does not start Debian after rebooting,"
echo "you may need to restart the device by disconnecting the power."
echo ""
echo -n "Reboot now? [Y/n] "

read IN
if [ "$IN" == "" -o "$IN" == "y" -o "$IN" == "Y" ];
then
  /sbin/reboot
fi


STEP 2 : Install Kernel files (manual install)
Code:
POST INSTALL STEPS:
===================
ntpdate pool.ntp.org
dpkg-reconfigure tzdata
dpkg-reconfigure locales
edit /etc/hostname to change the hostname.

change /etc/sources.list to closest repository
apt-get update
apt-get dist-upgrade - to make sure you have the latest updates.

Install build environment
=========================

apt-get -y install make gcc
apt-get -y install g++ 
apt-get -y install libxml2 libxml2-dev

apt-get -y install ssh libncurses5 libncursesw5 libncurses5-dev libncursesw5-dev linux-libc-dev sqlite libnewt-dev libusb-dev zlib1g-dev libmysqlclient15-dev
apt-get -y install libsqlite0 libsqlite0-dev bison openssl libssl-dev libeditline0 libeditline-dev libedit-dev mc sox libedit2 libedit-dev

apt-get -y install curl libcurl4-gnutls-dev

apt-get -y install apache2 libapache2-mod-php5 php-pear
apt-get -y install php5 php5-cli mysql-server php5-mysql php-db libapache2-mod-php5 php5-gd php5-curl mysql-client

apt-get -y install openssh-server build-essential openssh-client

apt-get -y install zlib1g zlib1g-dev libtiff4 libtiff4-dev
apt-get -y install libnet-telnet-perl mime-construct libipc-signal-perl libmime-types-perl libproc-waitstat-perl
apt-get -y install mpg123

/etc/init.d/apache2 restart

NOTE : wherever it says 2.6.34.1, replace with your own kernel version which you can get from "uname -r"

>> cd /usr/src

DOWNLOAD kernel -
>> wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.1.tar.gz
>> tar -zxvf linux-2.6.34.1.tar.gz

Once you have downloaded and unpacked the kernel source code, executing the command:
>> ls -ld /usr/src/linux*
should give you something like:
   lrwxrwxrwx  1 root root   12 Feb 10 2003 /usr/src/linux -> linux-2.6.34.1
   drwxr-xr-x 17 root root 4096 Jan 27 2003 /usr/src/linux-2.6.34.1

DOWNLOAD config and kernel headers -
>> wget http://sheeva.with-linux.com/sheeva/2.6.34.1/sheeva-2.6.34.1.config
copy to /usr/src/linux-2.6.34.1/ and Rename file to ".config"
>> cp sheeva-2.6.34.1.config /usr/src/linux-2.6.34.1/.config

>> cd /
>> wget http://sheeva.with-linux.com/sheeva/2.6.34.1/sheeva-2.6.34.1-KernelHeaders.tar.gz
>> tar -zxvf sheeva-2.6.34.1-KernelHeaders.tar.gz

Now make sure your config file is fully conformant with your kernel source. Do this:
>> cd /usr/src/linux-2.6.34.1
>> make menuconfig
When the menuconfig program starts up, it reads the .config file automatically. Simply tell the menuconfig program to quit, and have it save the .config file when you are asked.

Check Makefile - If needed, modify the EXTRAVERSION statement in Makefile so it matches what you see in "uname -r". It should look like :
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 34
EXTRAVERSION = .1

>> rm /lib/modules/`uname -r`/build
>> rm /lib/modules/`uname -r`/source
>> ln -s /usr/src/linux-2.6.34.1 /lib/modules/`uname -r`/build
>> ln -s /usr/src/linux-2.6.34.1 /lib/modules/`uname -r`/source

>> make modules_prepare

STEP 3 : Install Asterisk etc (manual install)
Code:
>> cd /usr/src
>> wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.6.2.6.tar.gz
>> wget http://downloads.digium.com/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.2.1+2.2.1.tar.gz
>> wget http://downloads.digium.com/pub/asterisk/releases/asterisk-addons-1.6.2.0.tar.gz
>> wget http://downloads.asterisk.org/pub/telephony/libpri/releases/libpri-1.4.10.2.tar.gz    

>> tar -zxvf asterisk-1.6.2.6.tar.gz
>> tar -zxvf dahdi-linux-complete-2.2.1+2.2.1.tar.gz
>> tar -zxvf asterisk-addons-1.6.2.0.tar.gz
>> tar -zxvf libpri-1.4.10.2.tar.gz    

Install Dahdi -
**** START - ONLY REQ for dahdi version below 2.3 ****
>> cd /usr/src/dahdi-linux-complete-2.2.1+2.2.1/linux/include/dahdi
edit dahdi_config.h

REPLACE :
#ifndef _DAHDI_CONFIG_H
#define _DAHDI_CONFIG_H

#ifdef __KERNEL__
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#include <linux/config.h>
#else
#include <linux/autoconf.h>
#endif
#endif

WITH :
#ifndef _DAHDI_CONFIG_H
#define _DAHDI_CONFIG_H

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/proc_fs.h>

#ifdef __KERNEL__
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#include <linux/config.h>
#endif
#endif

>> cd /usr/src/dahdi-linux-complete-2.2.1+2.2.1/linux/drivers/dahdi/wcb4xxp
Modify base.c
Remove #include <linux/autoconf.h>

cd ..
cd wct4xxp
Modify vpm450m.c
Remove
#else
#include <linux/autoconf.h>
**** END - ONLY REQ for dahdi version below 2.3 ****

>> cd /usr/src/dahdi-linux-complete-2.2.1+2.2.1
>> make clean
>> make
>> make install
>> make config <-- creates startup scripts
>> modprobe dahdi_dummy

Install libpri -
>> cd /usr/src/libpri-1.4.10.2
>> make clean
>> make
>> make install


Install Asterisk -
>> cd /usr/src/asterisk-1.6.2.6
>> sed -i 's/PROC=@HOST_CPU@/PROC=arm/g' /usr/src/asterisk-1.6.2.6/makeopts.in
>> make clean
>> ./configure  - this checks for all required pkgs before it can compile - Must be clean - will see Asterisk logo if OK
>> make menuconfig - this will allow you to select options to install with Asterisk

>> make
 
 If the building ran fine, you should read on the screen:
 +--- Asterisk Build Complete ---
 + Asterisk has successfully been built, and
 + can be installed by running:
 +
 + make install
 +--------------------
 
>> make install

You should then read something like:
+-- Asterisk Installation Complete ---+
...
...

>> make samples - To install sample config files

Having Asterisk to start at boot is as simple as running, in the /asterisk-1.6.2.1 folder, run the command:
>> make config
which will choose the right init files for your distribution, and copy them in /etc/asterisk
For your information, those files are located in the contrib/init.d/ folder

Install asterisk-addons
>> cd /usr/src/asterisk-addons-1.6.2.0
>> ./configure
>> make menuselect
>> make
>> make install
>> make samples (use only for a fresh install, might overwrite your config!)
>> ln -s /lib/modules/`uname -r`/ /lib/modules/`uname -r`/asterisk
>> depmod


TEST ASTERISK
=============
As the superuser root, from whatever folder you are in, run:
>> asterisk
>> asterisk -rvvvvv
Asterisk will load it’s modules and it’s configuration, you should then read:
Asterisk Ready.
*CLI>
this is the command line interface of Asterisk, to logout run the command:
*CLI> core stop now
« Last Edit: July 25, 2010, 11:02:21 AM by klingon » Logged
lowkey
Newbie
*
Posts: 6


Email
« Reply #1 on: July 25, 2010, 10:19:35 PM »

Hi, I tried the 1st script. It does not install uImage in /boot. I installed it manually and then it booted debain OK. Thanks.
Logged
klingon
Newbie
*
Posts: 41


« Reply #2 on: July 26, 2010, 04:34:12 AM »

Hi, I tried the 1st script. It does not install uImage in /boot. I installed it manually and then it booted debain OK. Thanks.

Thats weird. I've tried Jeff's script many times and its always installed correctly.

For all others who will be trying this, Pls report success/failure back so that I can fine tune it as needed.
Logged
txcas
Newbie
*
Posts: 13


« Reply #3 on: July 26, 2010, 03:48:27 PM »

Trying right now...  You might need to change this on the script:

From mattmc97"

//Apparently Jeff forgot to copy a file to his mirror as the file that URL_POGO_UBOOT does not exist

vi dockstar.debian-lenny.sh

Under # Original package sources

URL_POGO_UBOOT  //Take out #

Under # Download from package mirror

#URL_POGO_UBOOT  //Add #

ETA:  I made the above changes, ran the script, and Debian 2.6.34.1 installed just fine.  After the script reboot the Docstar booted to the built-in Linux version.  I issued the /sbin/reboot command and it then booted to Debian.  Trying steps 2 and 3 next...
« Last Edit: July 26, 2010, 06:04:12 PM by txcas » Logged
klingon
Newbie
*
Posts: 41


« Reply #4 on: July 26, 2010, 05:00:00 PM »

Thats old. Jeff fixed his script and these are the latest from his site.
Logged
txcas
Newbie
*
Posts: 13


« Reply #5 on: July 26, 2010, 07:15:52 PM »

Steps 2 & 3 also worked for me.  Moving to Part 2.
Logged
jjoshua
Newbie
*
Posts: 13


« Reply #6 on: July 26, 2010, 09:43:40 PM »

Once you have downloaded and unpacked the kernel source code, executing the command:
>> ls -ld /usr/src/linux*
should give you something like:
   lrwxrwxrwx  1 root root   12 Feb 10 2003 /usr/src/linux -> linux-2.6.34.1
   drwxr-xr-x 17 root root 4096 Jan 27 2003 /usr/src/linux-2.6.34.1

Are we missing?
>> ln -s linux-2.6.34.1 linux
Logged
real goose
Newbie
*
Posts: 7


« Reply #7 on: July 27, 2010, 07:44:55 AM »

At the end of the first script /sbin/reboot booted into PogoPlug.  I pulled the power and now nothing seems to boot.  Sounds like it is time to build a serial cable to see what is happening. 
Logged
klingon
Newbie
*
Posts: 41


« Reply #8 on: July 27, 2010, 08:47:22 AM »

When playing with this, you really need a RS232-TTL cable. I've learned a lot from the weird booting sequence of this unit.  This is the cable I bought - http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=390093929662

This site has a good picture of the pins - http://ahsoftware.de/dockstar/

Cut the phone end connector.  You will see 3 cables - White to pin6, Green to pin4, Blue to pin2
Logged
jjoshua
Newbie
*
Posts: 13


« Reply #9 on: July 28, 2010, 09:46:53 AM »

In step 2, if you change your hostname...

>>edit /etc/hostname to change the hostname.

Be sure to also edit /etc/hosts to add your hostname to the 127.0.0.1 line or you will fail later on.
Logged
real goose
Newbie
*
Posts: 7


« Reply #10 on: July 30, 2010, 01:58:01 PM »

klingon - Thanks for the wealth of useful information.  It's a real cool idea and got me excited about installing a PBX on the DockStar.  I've gotten through end of Part 1 and have some random comments that I hope are helpful to someone. 

I've been unable to get STEP 1 to work as a script on the DockStar so I cut and paste sections onto the command line.  The first time I tried it did not boot into Debian. I must have missed something because when I tried again from scratch it booted fine.   

Near the end of STEP 3 I ran out of space on my 2 GB memory.  I went back and removed the tar.gz files and was able to finish.  But there is no way I can add anything else without a bigger memory device. 

I plan to restart again and just install enough of Debian to compile and install Asterisk.  This will leave plenty of space.  I'm happy editing the .conf files by hand and was ambivalent about running a GUI and the full LAMP suite in addition to Asterisk on the DockStar.   
Logged
klingon
Newbie
*
Posts: 41


« Reply #11 on: July 31, 2010, 06:22:25 AM »

You really need a 4GB stick/drive to properly compile and install all the needed stuffs.  I did 3.2GB for main and remaining for swap.  From a RAM perspective, you shld not have issues eventhough its only 128M.  You need to fine tune Apache and MySQL as these are memory hoggers. Do a google for this and you will get a wealth of info.  Also, looking at just the Free memory is not a good indication as Linux likes to use up as much memory as it can for cache. Mine generally uses about 50-60M for running apps (Asterisk, FOP, Fail2ban, Webmin) and the balance is in cache. Look at the second line (+/-) when you do a "free".

Also, if anyone wants to take a stab, lighttpd is a good replacement for Apache as it uses less memory.  I may look at this later.
Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #12 on: July 31, 2010, 10:36:36 AM »

Lightttp works fine with FreePBX and Asterisk. When I used to run it on my Buffalo Linkstation Pro (which had 128 meg ram) lighthttp worked fine, to conserve ram use.
Logged

-Greg
real goose
Newbie
*
Posts: 7


« Reply #13 on: August 03, 2010, 03:25:05 PM »

I am currently running Asterisk on an ASUS router which does not have enough memory to support both SIP & IAX2 so this is tremendous improvement.  I am excited about have a 'real Linux' rather than hoping I can find an appropriate Optware package.  Twice I have bricked the router by installing a package and I needed to reset and reload from scratch to recover. 

In make menuselect I checked LOW_MEMORY in compiler flags, but I really haven't deselected packages I don't need.  Now top reports Mem: 63896k used, 59756k free and no swap. 

One problem was apparently caused by make config.  On Debian boot Asterisk takes 98% of the CPU.  If I kill Asterisk and start it via asterisk on the command line it takes 1% of the CPU and 8.5% of memory.  I went into the /etc/rc*.d directories and removed the asterisk start and stop scripts. Once I find a way to boot directly into Debian after a power failure I will add a cron job that starts asterisk every minute which is how I get it started on the router.

My next quest is to get all logging off the USB memory either by turning it off or moving it to /tmp. I also plan to setup a tftp server for my Aastra phone. (Could not get tftp to work from any Optware package on the router.)  Currently I run tftpd on a Windows PC that is not always up.   

The major issue I have is the need for double booting to get Debian booted.  The first boot is always to Pogoplug and then after /sbin/reboot I get into Debian.  It's easy for me, but certainly not wife friendly.
Logged
klingon
Newbie
*
Posts: 41


« Reply #14 on: August 04, 2010, 05:37:04 AM »

real goose - if you have high CPU usage when Asterisk starts up with default script, then you missed step 5 in the instructions.  I've also changed from the asterisk script to amportal start rather than using the default /etc/init.d/asterisk.

If you have serial console access, then you can set the bootcmd to boot directly to USB rather than doing the 2 step boot process.  Just do the following :

./blparam 'bootcmd=run bootcmd_usb'

This allows me to easily switch back to dual boot if needed. Make sure you have serial console access before doing this else you will NEVER boot back to nand if USB does not work.
Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Install SimpleMachinesForum web hosting Valid XHTML 1.0! Valid CSS!