<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Elastix Blogs &#187; Serial</title>
	<atom:link href="http://blogs.elastix.org/en/tag/serial/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.elastix.org/en</link>
	<description>Elastix Community Blog</description>
	<lastBuildDate>Tue, 06 Jul 2010 09:54:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Elastix on Embedded (Alix) hardware</title>
		<link>http://blogs.elastix.org/en/2009/11/installing-elastix-on-embedded-alix-hardware/</link>
		<comments>http://blogs.elastix.org/en/2009/11/installing-elastix-on-embedded-alix-hardware/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 09:15:57 +0000</pubDate>
		<dc:creator>Josiah Spackman</dc:creator>
				<category><![CDATA[Elastix]]></category>
		<category><![CDATA[Alix]]></category>
		<category><![CDATA[Compact Flash]]></category>
		<category><![CDATA[CompactFlash]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Geode]]></category>
		<category><![CDATA[Serial]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[Virtualbox]]></category>

		<guid isPermaLink="false">http://blogs.elastix.org/en/?p=172</guid>
		<description><![CDATA[There have been quite a few un-answered questions about getting Elastix working on embedded x86 hardware, such as PCEngines Alix hardware. In this tutorial we want to install Elastix on the Alix.6b2, however other Alix hardware will work fine. The aim is to have a fully working Elastix system booting on an embedded x86 system [...]]]></description>
			<content:encoded><![CDATA[<p>There have been quite a few un-answered questions about getting Elastix working on embedded x86 hardware, such as PCEngines Alix hardware. In this tutorial we want to install Elastix on the Alix.6b2, however other Alix hardware will work fine. The aim is to have a fully working Elastix system booting on an embedded x86 system without a monitor ever being plugged into the hardware. You will need one attached to your desktop however.</p>
<p>I was incredibly surprised at how easy it was to install Elastix on an embedded system. Very little tweaking was required when I found out where to go and what to do. Now you too can install Elastix on your Alix hardware with ease!</p>
<p>Be warned, there&#8217;s a few screenshots after the break (Around 20)!</p>
<p><span id="more-172"></span></p>
<h2>Requirements:</h2>
<ul>
<li>Alix.6b2 or similar embedded system, preferably with 256MB RAM</li>
<li>Compact Flash USB Card Reader, or IDE -&gt; CF adapter for your Desktop PC. Either will suffice</li>
<li>4GB CompactFlash Card</li>
<li>The latest Elastix-1.6 ISO (Well older ISO&#8217;s work too, but the latest is nice)</li>
<li>VirtualBox</li>
<li>Teraterm or similar application (Optional for viewing boot process over serial cable)</li>
</ul>
<p>Allow at least 90 minutes for this whole procedure, you don&#8217;t want to rush it, and installing Elastix in a VM can take longer than usual. It took around 60 minutes for Elastix just to install the packages, though thats possibly my slow &amp; cheap CompactFlash card.</p>
<p>Firstly, we want to install <a title="Virtualbox Downloads" href="http://www.virtualbox.org/wiki/Downloads" target="_blank">Virtualbox</a>, with the latest version being 3.0.12 at the time of writing. This can also work with VMWare, but due to Virtualbox being <strong>free</strong> I figured it was easiest for all if the guide was written with it in mind.</p>
<p>Once Virtualbox is installed, you want to plug in your USB Compact Flash reader with your 4GB CompactFlash Card inserted. If windows asks &#8220;Do you want to format&#8221;, just ignore / cancel it for now.</p>
<p>Now, we&#8217;re going to bring up Windows Disk Management. Right-click on My Computer &#8211;&gt; Manage &#8211;&gt; Storage &#8211;&gt; Disk Management</p>
<p>Where it says &#8220;Disk 0&#8243;, &#8220;Disk 1&#8243;, is the Physical Disk ID. Make a note of the Physical Disk ID of your CompactFlash Card. For me, it was &#8220;Disk 4&#8243;:</p>
<p><img class="alignnone size-full wp-image-195" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/0-diskid.jpg" alt="Physical Disk ID" width="566" height="344" /></p>
<p>Now we&#8217;re going to open a command window, click Start &#8211;&gt; (then click Run for Win9X / 2K / XP) &#8211;&gt; type in: cmd</p>
<p>Hit Enter and you should see a new Command Prompt Window.</p>
<p>Type in the following:</p>
<pre style="padding-left: 30px">cd "\Program Files\Sun\VirtualBox"</pre>
<p>You should now be in the directory you installed VirtualBox into.</p>
<p>What we&#8217;re now going to do is create a Virtual Disk Image for VirtualBox to use, but this Disk Image will use the physical CompactFlash card as it&#8217;s drive.</p>
<p>Now, type in:</p>
<pre style="padding-left: 30px">VBoxManage.exe internalcommands createrawvmdk -filename</pre>
<pre style="padding-left: 30px">c:\cf.vmdk -rawdisk \\.\PhysicalDrive4 -register</pre>
<p>(I had to put in a line-break in order for it to fit in the blog window width, but this should all be done on one line)</p>
<p>Where it says &#8220;\\.\PhysicalDrive4&#8243; replace the number with the Physical Disk ID you made a note of earlier.</p>
<p>It should say &#8220;RAW host disk access VMDK file c:\cf.vmdk created successfully.&#8221;:</p>
<p><img class="alignnone size-full wp-image-196" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/1_make-raw-disk.jpg" alt="Make RAW disk" width="542" height="274" /></p>
<p>If it did, then great! Now you can fire up VirtualBox and get ready to create a new Virtual Machine.</p>
<p>In VirtualBox, click on &#8220;New&#8221;, it will welcome you to the Wizard, click on Next.</p>
<p>Name your VirtualMachine &#8220;Elastix Embedded&#8221;, tell its Linux &#8211;&gt; Other Linux. Click Next:</p>
<p><img class="alignnone size-full wp-image-197" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/2_name-vm.jpg" alt="Name your VM" width="461" height="413" /></p>
<p>Give it 256MB RAM, just like your final system will have, and click Next:</p>
<p><img class="alignnone size-full wp-image-198" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/3-vm-ram.jpg" alt="VM RAM" width="461" height="413" /></p>
<p>Tell it to use an Existing Hard Disk and click on the little Folder button. In the Virtual Media Manager, add c:\cf.vmdk to the list and select it. Hit Next to continue:</p>
<p><img class="alignnone size-full wp-image-199" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/4-add-disk-to-manager.jpg" alt="Add disk to Manager" width="572" height="448" /></p>
<p><img class="alignnone size-full wp-image-200" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/5-selected-disk.jpg" alt="Selected RAW Disk" width="461" height="413" /></p>
<p>It&#8217;ll give you a quick run-down of your system, click on Finish.</p>
<p>Now, before you power it on you need to tell it to boot the Elastix DVD first. Right-click on the Elastix Embedded Virtual Machine and go to Settings. Click CD / DVD-ROM and tick &#8220;Mount CD/DVD Drive&#8221;. Choose ISO Image, then find your Elastix ISO. Select it and it should now boot it by default when you turn on your Virtual Machine:</p>
<p><img class="alignnone size-full wp-image-201" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/7-mount-elastix-disc.jpg" alt="Mount Elastix ISO" width="529" height="460" /></p>
<p>I also go into the Audio and USB and disable them both:</p>
<p><img class="alignnone size-full wp-image-202" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/6-untick-enable-audio.jpg" alt="Disable Audio" width="529" height="460" /></p>
<p><img class="alignnone size-full wp-image-203" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/8-disable-usb.jpg" alt="Disable USB" width="529" height="460" /></p>
<p>Click OK to close the Settings, then Start the Elastix Embedded Virtual Machine.</p>
<p><img class="alignnone size-full wp-image-204" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/9-boot-vm.JPG" alt="Boot Elastix VM" width="590" height="505" /></p>
<p><strong><em><span style="font-style: normal;font-weight: normal">When the Virtual Machine starts and you&#8217;re at the boot prompt for Elastix (As above), enter:</span></em></strong></p>
<pre>linux text resolution=800×600 mem=256M</pre>
<p>Otherwise the install hangs during startup, and we don&#8217;t want that.</p>
<p>Follow through the install, most of the defaults seem to be fine.</p>
<p>When it comes to partitionging, try it like this (Give it some SWAP just in-case):</p>
<p><img class="alignnone size-full wp-image-205" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/10-partitioning.JPG" alt="Partitioning" width="588" height="386" /></p>
<p>Once installed, let the Virtual Machine restart and login as root.</p>
<p>We&#8217;re now going to tidy up the install a little and make it boot from the Alix system by &#8220;disabling&#8221; the GUI and sending output over the Serial interface.</p>
<address><strong>Note</strong>: If you&#8217;ve never used Nano before, then just remember that if you make any mistakes, or to save the file when you&#8217;re done just press Ctrl + X to exit. It&#8217;ll ask you if you want to save the file or not. Choose yes or no. If you choose Yes, it&#8217;ll ask you what the filename is and if you want to overwrite. Naturally you&#8217;re going to press Enter to overwrite. Feel free to use Vi or anything else you&#8217;re comfortable with.</address>
<h2>Changes to a standard Elastix distribution to make it boot on an Alix system</h2>
<pre style="padding-left: 30px">yum install nano</pre>
<pre style="padding-left: 30px">nano -w /etc/sysconfig/kudzu</pre>
<p>Set:</p>
<pre style="padding-left: 30px">safe=yes</pre>
<p><img class="alignnone size-full wp-image-211" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/11-kudzu.JPG" alt="nano -w /etc/sysconfig/kudzu" width="589" height="384" /></p>
<p>This will stop Elastix from probing serial / ps2 hardware and potentially failing on boot.</p>
<pre style="padding-left: 30px">nano -w /boot/grub/grub.conf</pre>
<p>Comment out the following line by adding a # in front of it:</p>
<pre style="padding-left: 30px">splashimage=(hd0,0)/grub/splash.xpm.gz</pre>
<p>So it should now look like:</p>
<pre style="padding-left: 30px">#splashimage=(hd0,0)/grub/splash.xpm.gz</pre>
<p>Add in the following two lines after it:</p>
<pre style="padding-left: 30px">serial -unit=0 -speed=9600 -word=8 -parity=no -stop=1</pre>
<pre style="padding-left: 30px">terminal -timeout=10 serial console</pre>
<p>Also, add the following to the <strong><span style="text-decoration: underline">end</span></strong> of every line that starts with &#8220;kernel&#8221;:</p>
<pre style="padding-left: 30px">CONSOLE=TTY0 CONSOLE=TTYS0,9600N8</pre>
<p><img class="alignnone size-full wp-image-212" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/12-grub.JPG" alt="nano -w /boot/grub/grub.conf" width="588" height="385" /></p>
<p>This tells Grub that you want to see everything both over the serial interface and your regular screen. Ctrl + X to quit, and save the file.</p>
<p>Next you want to run:</p>
<pre style="padding-left: 30px">nano -w /etc/inittab</pre>
<p>Add a line at the very bottom:</p>
<pre style="padding-left: 30px">S0:12345:respawn:/sbin/agetty ttyS0 9600 linux</pre>
<p><img class="alignnone size-full wp-image-213" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/13-inittab.JPG" alt="nano -w /etc/inittab" width="590" height="385" /></p>
<p>To be honest I&#8217;m not 100% certain why this is needed, but it seems to be required, so let me know if you know <img src='http://blogs.elastix.org/en/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Next, run:</p>
<pre style="padding-left: 30px">nano -w /etc/securetty</pre>
<p>Add a line at the very bottom:</p>
<pre style="padding-left: 30px">ttyS0</pre>
<p>That&#8217;s S then a Zero, not S then the letter &#8220;o&#8221;</p>
<p><img class="alignnone size-full wp-image-214" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/14-securetty.JPG" alt="nano -w /etc/securetty" width="590" height="384" /></p>
<p>This lets you login as root via the serial cable.</p>
<p>Lastly run:</p>
<pre style="padding-left: 30px">nano -w /etc/sysconfig/init</pre>
<p>Change &#8220;BOOTUP=color&#8221; to:</p>
<pre style="padding-left: 30px">BOOTUP=serial</pre>
<p><img class="alignnone size-full wp-image-215" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/15-init.JPG" alt="nano -w /etc/sysconfig/init" width="589" height="383" /></p>
<p>That&#8217;s it! All done!</p>
<p>Now, run:</p>
<pre style="padding-left: 30px">shutdown -h now</pre>
<p><img class="alignnone size-full wp-image-216" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/16-shutdown.JPG" alt="shutdown -h now" width="588" height="386" /></p>
<p>That&#8217;ll shut down the virtual machine. Safely eject the CompactFlash Card, whip it out, pop it in your Alix system.</p>
<p><img class="alignnone size-full wp-image-217" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/17-safely-eject.jpg" alt="Safely Eject the CF Card" width="264" height="224" /></p>
<p>Remember that the LAN Cable goes in the port <strong><span style="text-decoration: underline">closest to the Power</span></strong> if you have more than one.</p>
<p>Plug in the power and let it boot! Success!</p>
<p><img class="alignnone size-full wp-image-227" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/18-lan-port-2.jpg" alt="Alix LAN Port eth0" width="562" height="369" /></p>
<address><strong>Note</strong>: It could take 3-4 minutes for it to power up, so if it doesn&#8217;t start up immediately then just be patient. I statically assigned mine an address via DHCP on my Tomato Router so I knew what IP it was going to get. I suggest you do likewise if possible, or use the Advanced LAN Scanner from radmin.com to scan your LAN for new machines. That, or check your router logs.</address>
<p>You should be all finished with a fully functional embedded system that boots from CompactFlash with no display. You can ssh in, boot into the WebGUI, anything you like!</p>
<p><img class="alignnone size-full wp-image-219" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/19-webgui.jpg" alt="Elastix WebGUI on Alix Hardware with Geode CPU" width="590" height="470" /></p>
<p><img class="alignnone size-full wp-image-221" src="http://blogs.elastix.org/en/wp-content/uploads/2009/11/20-ssh-hardware.jpg" alt="Elastix via SSH - Hardware details" width="590" height="636" /></p>
<p>Now if you run:</p>
<pre style="padding-left: 30px">asterisk -r</pre>
<p>Then type:</p>
<pre style="padding-left: 30px">core show translation recalc 10</pre>
<p>You should see a terribly slow system like mine:</p>
<pre style="padding-left: 30px">*CLI&gt; core show translation recalc 10
         Recalculating Codec Translation (number of sample seconds: 10)

         Translation times between formats (in milliseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

          g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722
     g723    -   -    -    -        -     -    -     -    -     -    -    -    -
      gsm    -   -   13   13       29    14   12    46  150   255  214   29    -
     ulaw    -  41    -    1       18     3    1    35  139   244  203   18    -
     alaw    -  41    1    -       18     3    1    35  139   244  203   18    -
 g726aal2    -  56   17   17        -    18   16    50  154   259  218    1    -
    adpcm    -  41    2    2       18     -    1    35  139   244  203   18    -
     slin    -  40    1    1       17     2    -    34  138   243  202   17    -
    lpc10    -  62   23   23       39    24   22     -  160   265  224   39    -
     g729    -  74   35   35       51    36   34    68    -   277  236   51    -
    speex    -  71   32   32       48    33   31    65  169     -  233   48    -
     ilbc    -  78   39   39       55    40   38    72  176   281    -   55    -
     g726    -  56   17   17        1    18   16    50  154   259  218    -    -
     g722    -   -    -    -        -     -    -     -    -     -    -    -    -</pre>
<p>As you can see there&#8217;s not much room for anything to be done in terms of transcoding. My LX800 (500Mhz) won&#8217;t handle much but I&#8217;ll run a few tests over the coming week and see how many calls I can squeeze out of the little sucker. Opening up the WebGUI immediately shoots the CPU up to 50% as it generates the graphs and things, so it&#8217;s probably not a good idea to be always on the WebGUI when you put it in to production, even just for a small home-office scenario or call quality may quickly deteriorate.</p>
<p>I&#8217;d love to hear any feedback you have, how it went for you, and what use you&#8217;ve found for Elastix on the hardware. So please, post your comments!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblogs.elastix.org%2Fen%2F2009%2F11%2Finstalling-elastix-on-embedded-alix-hardware%2F&amp;linkname=Installing%20Elastix%20on%20Embedded%20%28Alix%29%20hardware"><img src="http://blogs.elastix.org/en/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blogs.elastix.org/en/2009/11/installing-elastix-on-embedded-alix-hardware/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>
