Wednesday
Jul142010

Installation: Linux

Linux distributions differ greatly in the graphical tools they offer the user. However, the command line tools are quite uniform. This guide was written using an Ubuntu Linux system but utilizes only command line tools hopefully making it a universal document.

First, you must open your system's terminal program. In Ubuntu, it can be found here:

open the terminal program

Next, change into the directory where you've downloaded the firmware you'd like to install: 

ubuntu@ubuntu:~$ cd Downloads ubuntu@ubuntu:~/Downloads$ ls askozia-pbx-generic-pc-x86-i486-uclibc-2.0.1.img

Now, before attaching the target hard drive, usb stick or flash media we need to know which disks are present in the system and how they are named. The following command lists each disk recognized by the system

ubuntu@ubuntu:~/Downloads$ sudo fdisk -l | grep "Disk /dev/" Disk /dev/sda: 21.5 GB, 21474836480 bytes

Attach the media you wish to install the firmware onto. Re-running the previous command will reveal the new disk's name. In this case, it is /dev/sdb

ubuntu@ubuntu:~/Downloads$ sudo fdisk -l | grep "Disk /dev/" Disk /dev/sda: 21.5 GB, 21474836480 bytes Disk /dev/sdb: 1999 MB, 1999568384 bytes

If the disk was recognized by the system. It has probably already been automatically mounted. The firmware cannot be installed if the disk is already mounted. Execute the following command to find out where the disk is mounted (if it has more than one partition, it may be mounted in several locations).

ubuntu@ubuntu:~/Downloads$ df | grep "/dev/sdb" /dev/sdb1 1952192 1600 1950592 1% /media/KINGSTON

In this case, our disk has one partition. The partition name which needs to be unmounted is /dev/sdb1. To unmount that partition, execute the following command.

ubuntu@ubuntu:~/Downloads$ sudo umount /dev/sdb1

Now that the system is no longer directly using our disk, we can install the firmware on to it. The following command decompresses the image and writes it block-by-block onto the target device. The warning about trailing garbage is due to the digital signature on AskoziaPBX firmwares. Make sure to use the device name: /dev/sdb and not the partition name /dev/sdb1

ubuntu@ubuntu:~/Downloads$ sudo gunzip -c askozia-pbx-generic-pc-x86-i486-uclibc-2.0.1.img | sudo dd of=/dev/sdb bs=512 gzip: askozia-pbx-generic-pc-x86-i486-uclibc-2.0.1.img: decompression OK, trailing garbage ignored 63825+0 records in 63825+0 records out 32678400 bytes (33 MB) copied, 7.54102 s, 4.3 MB/s ubuntu@ubuntu:~/Downloads$

That's it. You now have the firmware on the target disk. Set your computer or embedded device to boot from this media and off you go. To check if the firmware was correctly written, detach and reattach it to your Linux system. There should be two partitions /system and /offload:

back to Installation

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>