<?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>&#62;dade</title>
	<atom:link href="http://www.creamdesign.it/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.creamdesign.it/blog</link>
	<description>plans that either come to naught, or half a page of scribbled lines</description>
	<lastBuildDate>Fri, 20 Aug 2010 12:10:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Stepperino alpha version</title>
		<link>http://www.creamdesign.it/blog/archives/261</link>
		<comments>http://www.creamdesign.it/blog/archives/261#comments</comments>
		<pubDate>Fri, 20 Aug 2010 08:44:46 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[stepperino]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=261</guid>
		<description><![CDATA[Stepperino is a stepper motor controller based on arduino and cheap, commonly available components. This early version is capable of controlling an unipolar stepper motor (5, 6 or 8 wires) in full step mode and is the first step towards more sophisticated control to be achieved in firmware. ]]></description>
			<content:encoded><![CDATA[<p>Stepperino is a stepper motor controller based on arduino and cheap, commonly available components. This early version is capable of controlling an unipolar stepper motor (5, 6 or 8 wires) in half step mode and is the first step towards more sophisticated control to be achieved in firmware.</p>
<p>Here is the schematic [click to enlarge]:</p>
<p style="text-align: center;"><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/08/stepperino-schem.png"><img class="size-medium wp-image-262 aligncenter" title="schematic-stepperino" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/08/stepperino-schem-300x180.png" alt="schematic-stepperino" width="300" height="180" /></a></p>
<p>The top left connector is for input from a microcontroller, which determines which coils are turned on. The rest is divided in four identical sections, each having a BC337 NPN transistor driving a TIP122 power darlington pair, which in turn is attached to the motor coil through the bottom right connector. Collectors of the power transistors are connected to a sense power resistor which allows fixed current to flow in the motor, independently of the voltage.<br />
As for now the motor I am using is underpowered: its spec says 24v but I am giving this circuit a 18v supply, so speed and torque may be affected. For now I can reach a speed of about 10 revolutions per second of the stepper.</p>
<p>Here is how it came out on a breadboard, attached to an arduino and to a stepper motor [click to enlarge]:</p>
<p><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/08/stepperino-bread.jpg"><img class="aligncenter size-medium wp-image-264" title="Stepperino on breadboard" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/08/stepperino-bread-300x199.jpg" alt="circuit mounted on breadboard" width="300" height="199" /></a></p>
<p>The little trimmer in the picture has been added for controlling a delay in the firmware, so to test different speeds of the motor. In fact the speed can be raised until the motor reaches resonance, and just a tad before that point the motor is going at full speed. This is the code:</p>
<pre name="code" class="cpp">void setup()   {
 DDRB = DDRB | B11111111;
}

int sensorPin = 0;
int sensorValue = 10;

void loop()
{
  sensorValue = analogRead(sensorPin);

  PORTB = B00000001;
  delayMicroseconds(sensorValue*10);
  PORTB = B00000011;
  delayMicroseconds(sensorValue*10);
  PORTB = B00000010;
  delayMicroseconds(sensorValue*10);
  PORTB = B00000110;
  delayMicroseconds(sensorValue*10);
  PORTB = B00000100;
  delayMicroseconds(sensorValue*10);
  PORTB = B00001100;
  delayMicroseconds(sensorValue*10);
  PORTB = B00001000;
  delayMicroseconds(sensorValue*10);
  PORTB = B00001001;
  delayMicroseconds(sensorValue*10);
}</pre>
<p>As you can see the code is very simple: it just does a full step sequence delayed by the value read from the trimmer. It is good for testing different speeds and step sequences, to see which one is best for achieving maximum speed.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/4mYAfglFJN4?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/4mYAfglFJN4?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The next steps for beta version will be:</p>
<ul>
<li>add PWM to software</li>
<li>port software to avr-gcc and optimize timings</li>
<li>determine if BC337 are really necessary or not</li>
<li>add filtering caps for PWM</li>
<li>add diodes for coil protection</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/261/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>my wet iPhone dissection</title>
		<link>http://www.creamdesign.it/blog/archives/255</link>
		<comments>http://www.creamdesign.it/blog/archives/255#comments</comments>
		<pubDate>Sun, 11 Jul 2010 18:37:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iPod & iPhone]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=255</guid>
		<description><![CDATA[The disassembly of my 2g phone that I accidentally dropped into water (toilet water to be precise)]]></description>
			<content:encoded><![CDATA[<p>My iPhone has been doing great since 2007, and no matter which kind of  &#8221;essential&#8221; features apple threw out in newer models, I was still pretty happy with my 2G&#8230; until yesterday, when it accidentally fell out of my hands and was dropped into water! And not just any kind of water but&#8230; yes it was toilet water. Fortunately nobody had used that toilet yet that day! But you imagine the double frustration of having a wet phone that isn&#8217;t just wet, but it is toilet wet.</p>
<p>Apple did not do a fair thing here: I watched in horror the screen turn progressively white, while hastily trying to power off the device. I couldn&#8217;t make use of the software switch and so I had to watch with even more horror the phone get warm and stay on until I came home from work (50 minutes).</p>
<p>Damn&#8230; <strong>there should be a hardware switch to turn it off</strong>&#8230; and <strong>iPhones should be waterproof too</strong>. I mean what is the use of having a compass inside? Make it waterproof instead. These would be killer features I think&#8230;</p>
<p>However to turn it off I picked up one of the many disassembly videos and followed the instructions carefully. The phone eventually did turn off, when I unlatched some cable inside, and this nice picture is what I ended up with.</p>
<div id="attachment_256" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/07/DSC_0253.jpg"><img class="size-medium wp-image-256 " title="iPhone dissection results" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/07/DSC_0253-300x149.jpg" alt="my iPhone dissection results" width="300" height="149" /></a><p class="wp-caption-text">my iPhone dissection results: click to see bigger</p></div>
<p>I hope I will be able to put it back&#8230; just to disassemble it was pretty hard. For now it is soaked into <a title="water + gadget = rice" href="http://lifehacker.com/269427/dry-out-your-soaked-gadgets-in-rice" target="_blank">rice</a>, so that some humidity will go out, especially  from the screen. I do not expect miracles, however it is worth a try, while waiting for the iPhone4 here in italy&#8230;  wish me luck!</p>
<p><strong>UPDATE: </strong>I tried to revive the phone&#8230; unfortunately when I reassembled the motherboard to the display it got quite hot and no image popped up on the screen. I have to go for the iPhone 4. Or the 3GS maybe. For now I stick with my ancient nokia 6110&#8230; not quite what you call a smartphone, but it&#8217;ll do for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/255/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up mt-daapd/firefly</title>
		<link>http://www.creamdesign.it/blog/archives/244</link>
		<comments>http://www.creamdesign.it/blog/archives/244#comments</comments>
		<pubDate>Sun, 04 Apr 2010 15:39:15 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[firefly]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=244</guid>
		<description><![CDATA[mt-daapd, aka firefly, allows to serve a music folder directly to any iTunes running in your home network. This is great to share music across the house or to keep a music dump folder aside from your main itunes library. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-04-at-17.28.54.png"><img class="alignleft size-full wp-image-246" title="firefly" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-04-at-17.28.54.png" alt="" width="93" height="79" /></a><a href="http://www.fireflymediaserver.org/" target="_blank">mt-daapd, aka firefly</a>, allows to serve a music folder directly to any iTunes running in your home network. This is great to share music across the house or to keep a music dump folder aside from your main itunes library.</p>
<p><span id="more-244"></span></p>
<div style="display: block; padding: 10px; border: 2px solid #afa; background-color: #efe; margin-bottom: 1.2em;">This post belongs to a series detailing the services that can be set up on a home server. To view the full series head to the <a href="http://www.creamdesign.it/blog/archives/165" target="_self">master post</a></div>
<p>I personally use firefly to serve an enormous &#8216;music dump&#8217; folder which I keep on the NAS server, so that I am not forced to have all these songs into my iTunes library on my mac HD. This folder is for casual music i listen from time to time, and if I find some gem in it, I copy it on my main library to sync with ipods and iphone.</p>
<p>Installation in ubuntu is very simple: just</p>
<p><code>sudo apt-get install mt-daapd</code></p>
<p>and start the daemon by running</p>
<p><code>sudo /etc/init.d/mt-daapd start</code></p>
<p>If you want the program to start every time your server boots up execute the following:</p>
<p><code>sudo update-rc.d mt-daapd defaults</code></p>
<p>Now you should see in your iTunes a new shared library, like this:</p>
<div id="attachment_245" class="wp-caption aligncenter" style="width: 308px"><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-04-at-17.24.30.png"><img class="size-full wp-image-245 " title="firefly server as seen by iTunes" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-04-at-17.24.30.png" alt="firefly server as seen by iTunes" width="298" height="85" /></a><p class="wp-caption-text">firefly server as seen by iTunes</p></div>
<p>Now we are ready to configure a folder on the server for sharing. To do this there is the configuration file <strong>/etc/mtdaapd.conf</strong>, however it is more straightforward just to use the web interface at port 3689 on your server. The username is admin and the password is mt-daapd.</p>
<p>From the web interface you can set up the daemon and in the configuration section you can specify your music folders to be served. Just remember to make it perform a scan after you add something new. To be sure I configured some periodic scanning to go off every hour.</p>
<p>Performance of the server is very good. The library behaves as if it were local, if not even better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/244/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Avahi</title>
		<link>http://www.creamdesign.it/blog/archives/217</link>
		<comments>http://www.creamdesign.it/blog/archives/217#comments</comments>
		<pubDate>Fri, 02 Apr 2010 21:14:34 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[avahi]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=217</guid>
		<description><![CDATA[Avahi advertises the shares made available by netatalk to macs in your home network via bonjour, so that connecting to the file server means just clicking on its icon. This is how to set it up.]]></description>
			<content:encoded><![CDATA[<p>Avahi advertises the shares made available by netatalk to macs in your home network via bonjour, so that connecting to the file server means just clicking on its icon. This is how to set it up.</p>
<p><span id="more-217"></span></p>
<div style="display: block; padding: 10px; border: 2px solid #afa; background-color: #efe; margin-bottom: 1.2em;">This post belongs to a series detailing the services that can be set up on a home server. To view the full series head to the <a href="http://www.creamdesign.it/blog/archives/165" target="_self">master post</a></div>
<p>Avahi installation is almost hassle free; first you install the package:</p>
<p><code>sudo apt-get install avahi-daemon</code></p>
<p>Then edit your avahi configuration file located at /etc/avahi/services/afpd.service. The file should be empty, so you can</p>
<p><code>sudo gedit /etc/avahi/services/afpd.service</code></p>
<p>and then paste in the following XML</p>
<p><code><br />
<?xml version="1.0" standalone='no'?><!--*-nxml-*--><br />
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"><br />
<service-group><br />
<name replace-wildcards="yes">%h</name><br />
<service><br />
<type>_afpovertcp._tcp</type></p>
<port>548</port>
</service><br />
<service><br />
<type>_device-info._tcp</type></p>
<port>0</port>
<txt-record>model=Xserve</txt-record><br />
</service><br />
</service-group><br />
</code></p>
<p>After that just restart the daemon:</p>
<p><code>sudo /etc/init.d/avahi-daemon restart</code></p>
<p>Back on your mac you should now see the service advertised in the Finder sidebar, like this:</p>
<div id="attachment_218" class="wp-caption alignleft" style="width: 192px"><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-02-at-23.06.05.png"><img class="size-full wp-image-218" title="Share advertised by avahi" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/04/Screen-shot-2010-04-02-at-23.06.05.png" alt="Finder sidebar" width="182" height="156" /></a><p class="wp-caption-text">Share advertised by avahi</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/217/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up netatalk</title>
		<link>http://www.creamdesign.it/blog/archives/207</link>
		<comments>http://www.creamdesign.it/blog/archives/207#comments</comments>
		<pubDate>Mon, 29 Mar 2010 19:34:15 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[afp]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[NETATALK]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Ununtu]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=207</guid>
		<description><![CDATA[How to install and configure netatalk to serve files from ubuntu server to macs in your home network.]]></description>
			<content:encoded><![CDATA[<p><a href="http://netatalk.sourceforge.net/" target="_blank">Netatalk</a> is an open implementation of the afp protocol, needed to serve files to mac computers. This is how I installed it on my home server.</p>
<p><span id="more-207"></span></p>
<div style="display: block; padding: 10px; border: 2px solid #afa; background-color: #efe; margin-bottom:1.2em;">This post belongs to a series detailing the services that can be set up on a home server. To view the full series head to the <a href="http://www.creamdesign.it/blog/archives/165" target="_self">master post</a></div>
<p>Unfortunately the installation of netatalk in Karmic is a bit more complicated than an apt-get call. Due to licensing issues they could not distribute a package with SSL precompiled inside, and this security layer is mandatory if you try to connect from any mac running leopard or snow leopard.</p>
<p>Many tutorials exist (<a href="http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/" target="_blank">here</a>, <a href="http://www.zaphu.com/2008/04/29/ubuntu-guide-configure-a-netatalk-file-server-based-on-apple-filing-protocol-afp/" target="_blank">here</a>) which explain how to recompile netatalk from source code, adding SSL support. But neither of these worked for me: no matter how i did configuration or compilation, my mac always failed to connect at the username/password screen, so still an authentication problem in spite of ssl.</p>
<p>So I had to remove netatalk completely (apt-get autoremove netatalk) and upgrade to a newer version, not yet distributed in the official repositories: 2.0.5.</p>
<p>This new version works out of the box: just install it, configure the folders you want to share and you are done. It also has a special option for setting up some space to work as a drive for time machine.  Thanks to <a href="http://sidikahawa.blogspot.com/2010/03/setting-up-time-machine-server-on-my.html" target="_blank">this article</a> we can find the packages to install for the new version. <strong>Just download and double click</strong> the packages <strong>in the listed order</strong>, say yes to any message recommending an older version.</p>
<p><a href="http://ftp.us.debian.org/debian/pool/main/d/db/libdb4.8_4.8.26-1_i386.deb"><strong>libdb4.8</strong></a><strong><br />
</strong><a href="http://ftp.us.debian.org/debian/pool/main/libg/libgcrypt11/libgcrypt11_1.4.5-2_i386.deb"><strong>libgcrypt11</strong></a><strong><br />
</strong><a href="http://ftp.us.debian.org/debian/pool/main/n/netatalk/netatalk_2.0.5-3_i386.deb"><strong>netatalk2.0.5</strong></a></p>
<p>now edit your <strong>/etc/netatalk/AppleVolumes.default</strong> file, appending a line for every share you want to export to your home macs, with this format <strong>for a generic share</strong>:</p>
<p><code>/full/path/on/linux/box   "name of the share"</code></p>
<p>or for <strong>time machine drive</strong>:</p>
<p><code>/full/path/on/linux/box   "TimeMachine"    options:tm</code></p>
<p>then restart the netatalk daemon:</p>
<p><code>/etc/init.d/netatalk restart</code></p>
<p>Finally you can check on your mac if everything went fine:<br />
open Finder and do &lt;command-k&gt;, enter the IP address of your server and your (ubuntu) username and password.<br />
You should now be connected and capable of browsing files, like this:</p>
<div id="attachment_208" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/03/connected_nas.png"><img class="size-medium wp-image-208" title="connected_nas" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/03/connected_nas-300x221.png" alt="connected NAS" width="300" height="221" /></a><p class="wp-caption-text">connected nas</p></div>
<p>Moreover, if you specified a time machine share, you will be able to set it up directly into time machine preferences pane without any terminal hacks on mac side. </p>
<p>The next step is to configure avahi, to advertise services on the network so that they come up in the finder sidebar (no more command-k to connect).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/207/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enabling ssh access</title>
		<link>http://www.creamdesign.it/blog/archives/190</link>
		<comments>http://www.creamdesign.it/blog/archives/190#comments</comments>
		<pubDate>Sun, 21 Mar 2010 22:03:19 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=190</guid>
		<description><![CDATA[ssh enables remote terminal access to a linux box, and is the first step towards an headless machine. This is how to configure it for the first time in ubuntu]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-191" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/03/gnome-terminal-150x150.png" alt="gnome-terminal" width="150" height="150" /><br />
ssh enables remote terminal access to a linux box, and is the first step towards an headless machine. <span id="more-190"></span></p>
<div style="display: block; padding: 10px; border: 2px solid #afa; background-color: #efe; margin-bottom:1.2em;">This post belongs to a series detailing the services that can be set up on a home server. To view the full series head to the <a href="http://www.creamdesign.it/blog/archives/165" target="_self">master post</a></div>
<p>Setting up ssh access is very easy:</p>
<p>first of all install the ssh package:</p>
<p><code>sudo apt-get install ssh</code></p>
<p>then append the following line to your /etc/hosts.allow file, telling to allow incoming connection on ssh port 22. In this case I&#8217;ve configured it to accept incoming connections from all the IPs of my local network. Edit the line to suit your IP configuration.</p>
<p><code>sshd: 192.168.0.*</code></p>
<p>That&#8217;s it! Now open a terminal (in mac/unix) and do</p>
<p>ssh &lt;username&gt;@&lt;server-IP&gt;</p>
<p>If you&#8217;re on Windows, you can use <a title="PuTTY" href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTY</a> to connect to the server. Have fun!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/190/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up MDADM</title>
		<link>http://www.creamdesign.it/blog/archives/173</link>
		<comments>http://www.creamdesign.it/blog/archives/173#comments</comments>
		<pubDate>Sat, 20 Feb 2010 12:22:39 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[NAS]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=173</guid>
		<description><![CDATA[MDADM (multi disk admin) is the software implementation of RAID on linux. It can be used to take a bunch of disks and make them into a single, powerful drive. This leads to several advantages, depending on the raid configuration you choose to implement.]]></description>
			<content:encoded><![CDATA[<div style="text-align: left;">
<p><a title="wikipedia MDADM" href="http://en.wikipedia.org/wiki/Mdadm" target="_blank">MDADM</a> (multi disk admin) is the software implementation of RAID on linux. It can be used to take a bunch of disks and make them into a single, powerful drive. This leads to several advantages, depending on the raid configuration you choose to implement.<br />
<span id="more-173"></span></p>
<div style="display: block; padding: 10px; border: 2px solid #afa; background-color: #efe; margin-bottom: 1.2em;">This post belongs to a series detailing the services that can be set up on a home server. To view the full series head to the <a href="http://www.creamdesign.it/blog/archives/165" target="_self">master post</a></div>
<p>For my setup I had chosen RAID5 with three disks. This means that if I loose one of them, I will not lose my data: pop in a fresh disk and go on, without even interrupting data availability.</p>
</div>
<p style="text-align: left;">MDADM does not come with ubuntu by default.</p>
<p><code> sudo apt-get mdadm<br />
</code></p>
<p style="text-align: left;">will take care of installation. Actually on my new system it took care of more: it automatically detected and assembled the array I had from a previous machine (that one had been built with MDADM as well), giving me this nice little icon on the desktop with all the content ready to go. This array is made up of three 250GB disks.</p>
<p style="text-align: center;"><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/02/autodetect.png"><img class="size-full wp-image-176 aligncenter" title="Raid autodetect" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/02/autodetect.png" alt="Raid autodetect" width="151" height="92" /></a></p>
<p style="text-align: left;">However, the work needed to setup the array if you have only new disks is a bit more complicated than just popping in the disks and let linux autodetect everything for you. Here you can find the process to set up the array:</p>
<p><strong>1) Prepare the drives</strong><br />
Connect the disks and create an ext3 partition on each one. Partitions should be the same size and filesystem. You would want to span each drive with a single primary partition. Use <strong>fdisk</strong> and <strong>mkfs.ext3</strong> or <strong>gparted</strong> to do that. You should now have many partitions as your disks named for example /dev/sda1, /dev/sda2 and so on (if you are using IDE disks those will be /dev/hda1, /dev/hdb1&#8230;)</p>
<p><strong>2) Create the array</strong><br />
Merge the partitions into an array using mdadm:</p>
<p><code>mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1/dev/sdc1</code></p>
<p>This for example will create an array, accessible at /dev/md0, made up of your three partitions, using raid 5 as the level<br />
check the status of mdadm with:</p>
<p><code>cat /proc/mdstat</code></p>
<p><strong>3) Mount the array and use it</strong></p>
<p><code>sudo mkdir /media/raid<br />
sudo mount  /dev/md0 /media/raid</code></p>
<p>if the mount fails, you have to use format the new created drive md0, use again <strong>mkfs.ext3</strong>.</p>
<p><strong>4) Edit/check configuration files</strong><br />
for automatic recognition and mount in the next boot sequences edit the following files:</p>
<p><code>sudo gedit /etc/mdadm/mdadm.conf<br />
sudo gedit /etc/fstab</code></p>
<p>Now data written in /media/raid is safely stored, and an hard disk failure cannot compromise it. Being on a NAS server, this can be a solid foundation for all automatic backup needs of the home network;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/173/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ATOM/ION nas home server</title>
		<link>http://www.creamdesign.it/blog/archives/165</link>
		<comments>http://www.creamdesign.it/blog/archives/165#comments</comments>
		<pubDate>Wed, 17 Feb 2010 22:34:18 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[drives]]></category>
		<category><![CDATA[homeserver]]></category>
		<category><![CDATA[HTPC]]></category>
		<category><![CDATA[ION]]></category>
		<category><![CDATA[Nvidia]]></category>
		<category><![CDATA[sata]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=165</guid>
		<description><![CDATA[Build and configure a cheap NAS/HTPC box based around the new Intel Atom processor and Nvidia ION chipset. Low power consumption, your files everywhere, torrenting, automated backups, reproduction of 1080p video, all for under 400$: how could you do without?]]></description>
			<content:encoded><![CDATA[<p>The replacement motherboard for my home server has finally arrived! This is the &#8216;master&#8217; post in which I&#8217;ll detail the configuration of the system, from software services to integration in the home network (MAC/WIN/LIN).<br />
<span id="more-165"></span><br />
This is the server in its actual form. As you can see it is quite &#8216;unpleasant&#8217; :)</p>
<div id="attachment_167" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/02/dsc_0246-Modified.jpg"><img class="size-medium wp-image-167" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/02/dsc_0246-Modified-300x225.jpg" alt="atom NAS server assembled (well... almost)" width="300" height="225" /></a><p class="wp-caption-text">atom NAS server assembled (well... almost)</p></div>
<h2>The Hardware</h2>
<p>The motherboard: <a title="review" href="http://www.anandtech.com/mb/showdoc.aspx?i=3630" target="_blank">asus AT3N7A-I</a>: based upon the new combination of Intel Atom processor and Nvidia ION chipset. This little thing is capable of low power consumption and reproduction of 1080p video. Given this it will double as a HTPC, which is the segment it was designed for.</p>
<p>The major limitations of the board for becoming an expandable NAS server are the small number of SATA II ports (three) and the reduced expansion capabilities (a single PCI slot). The 3 RAID hard drives in the picture are attached through a SATA expansion card, which sports four additional sata ports, while the main drive for the OS and additional space is attached to the motherboard. With this configuration I have a spare on the expansion card and two spares on the motherboard. Will do some performance tests to find the perfect combination.</p>
<p>Then the board has gigabit ethernet, bluetooth and HDMI out. Perfect for HTPC. I tested it with <a title="http://xbmc.org/" href="http://xbmc.org/" target="_blank">XMBC</a> and the overall system turns out to be ideal as a media center. With plenty of disk space attached it will provide an endless supply of video! cool!</p>
<p>A bad point of the motherboard is surely that nasty little fan that runs over the heatsink. I will have to find a way to reduce RPM, or to cut it off completely. The system must be very silent and up 24/7. It cannot be a noise machine as it currently is. I mean the fan noise is tolerable, but steady and in the long run can be annoying, at least for me. Right now &#8211; however &#8211; it is overtaken by the PSU fan, which is a cheapo one and for that very very noisy. I&#8217;ll find a way to silence that too!</p>
<h2>The software</h2>
<p>Everything will run upon the latest Ubuntu OS (regular version, not server, so to run XBMC or boxee). Right now I am using <a title="karmic" href="http://releases.ubuntu.com/karmic/" target="_blank">Karmic</a>, which installed flawlessly off an usb drive. The only minor thing has been installation of the latest Nvidia driver: the one installed by default by Ubuntu at this point was too old and did not play well (at least at 1080p): compiz was not able to run, and the overall performance was slow and buggy. The latest Nvidia driver fixed this, but it had to be <a href="http://tuxicity.wordpress.com/2008/06/04/howto-install-nvidia-manually-in-ubuntu-and-debian/" target="_blank">installed manually</a>.</p>
<p>These are the components i&#8217;ve set up so far. Each has its own dedicated post with instructions, just click on the big buttons. If you&#8217;d like, you can suggest more home server sw in the comments!</p>
<table>
<tbody>
<tr>
<td><a class="bigbut" href="http://www.creamdesign.it/blog/archives/173">mdadm</a></td>
<td>Merge some hard drives into a single, speedier, bigger and more reliable drive with software RAID</td>
</tr>
<tr>
<td><a class="bigbut" href="http://www.creamdesign.it/blog/archives/190">ssh</a></td>
<td>Enable remote access to the server via any terminal of your network</td>
</tr>
<tr>
<td><a class="bigbut" href="http://www.creamdesign.it/blog/archives/207" target="_self">netatalk</a></td>
<td>Share any folder of the server with macs in your network, set some networked storage to function as a drive for Leopard time machine</td>
</tr>
<tr>
<td><a class="bigbut" href="http://www.creamdesign.it/blog/archives/217">avahi</a></td>
<td>Advertise the folders served to macs so that they show up in finder</td>
</tr>
<tr>
<td><a class="bigbut" href="http://www.creamdesign.it/blog/archives/244">mt-daapd</a></td>
<td>Share music folders on the servers to iTunes in your local network</td>
</tr>
<tr>
<td><a class="bigbut" href="#">XBMC</a></td>
<td>Set up the best media center out there and squeeze out the power of the atom/ion platform</td>
</tr>
</tbody>
</table>
<p>The installs have been made with Karmic, so some distribution specific workarounds apply (netatalk, xbmc). If you are using a newer version these workarounds may not be applicable anymore and installing might be as simple as doing  apt-get install.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/165/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress upgrade to 2.9.1: error 500</title>
		<link>http://www.creamdesign.it/blog/archives/156</link>
		<comments>http://www.creamdesign.it/blog/archives/156#comments</comments>
		<pubDate>Mon, 18 Jan 2010 22:14:56 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[Tinkering]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=156</guid>
		<description><![CDATA[Just got through a wordpress upgrade and got a 500 internal server error instead of your site? Here is my quick fix! Maybe it can save your site too. ]]></description>
			<content:encoded><![CDATA[<p>Just got through a wordpress upgrade and got a 500 internal server error instead of your site? Here is my quick fix! Maybe it can save your site too.</p>
<p>Just a word before everything else: remember to backup just right before an upgrade. It&#8217;s been said millions of times, but for sure it&#8217;s never enough.</p>
<p><span id="more-156"></span>I could not bear the &#8216;upgrade me&#8217; banner on top of wordpress any longer: I was itching to upgrade. So, after a backup, and deactivating every plugin I tried the magic button to upgrade automatically.</p>
<p>You guess it&#8230; that gave me no upgrade and the dreaded internal server error 500.</p>
<p>What next? Go on wordpress.org, download the latest version, unzip, upload <strong>being careful not to overwrite wp-config.php or the wp-content folder</strong>, reload page and cross fingers.</p>
<p>You guess it again: the error 500 persisted on my pages. Awww!! Admin interface worked, though, but the site was still down.</p>
<p>So i had to resort to my host control panel: it has a small utility called <strong>repair filesystem permissions</strong>. I launched it and&#8230; that did the trick. The site is now up and running again.</p>
<div id="attachment_157" class="wp-caption aligncenter" style="width: 374px"><a href="http://www.creamdesign.it/blog/wp-content/uploads/2010/01/Screen-shot-2010-01-18-at-22.58.11.png"><img class="size-full wp-image-157" title="Repair Permissions" src="http://www.creamdesign.it/blog/wp-content/uploads/2010/01/Screen-shot-2010-01-18-at-22.58.11.png" alt="my provider's tool to repair permissions on the server" width="364" height="131" /></a><p class="wp-caption-text">Repair Permissions</p></div>
<p>I use <a title="cyberduck" href="http://cyberduck.ch/" target="_blank">cyberduck</a> as my FTP client. Probably the permission structure of the WP install on my disk was different than the one required by PHP on the server. I don&#8217;t know exactly how the script of my host behaves, but a similar thing could save your day too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/156/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Put that old stereo of yours to good use</title>
		<link>http://www.creamdesign.it/blog/archives/147</link>
		<comments>http://www.creamdesign.it/blog/archives/147#comments</comments>
		<pubDate>Mon, 24 Aug 2009 19:22:11 +0000</pubDate>
		<dc:creator>dade</dc:creator>
				<category><![CDATA[Tinkering]]></category>

		<guid isPermaLink="false">http://www.creamdesign.it/blog/?p=147</guid>
		<description><![CDATA[If you are like me you spent all of your teen years listening to music like mad, with your best friend from the past: a big, bulky and weirdly shaped stereo system with speakers. Here&#8217;s mine. I never use it now: all my music is on the server or on my macbook, and thinking of [...]]]></description>
			<content:encoded><![CDATA[<p>If you are like me you spent all of your teen years listening to music like mad, with your best friend from the past: a big, bulky and weirdly shaped stereo system with speakers. Here&#8217;s mine.</p>
<div id="attachment_148" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-148" src="http://www.creamdesign.it/blog/wp-content/uploads/2009/08/IMG_0484-300x187.jpg" alt="My old stereo system" width="300" height="187" /><p class="wp-caption-text">My old stereo system</p></div>
<p>I never use it now: all my music is on the server or on my macbook, and thinking of CD&#8217;s and tape decks looks so retro these days. But what to do with it? I&#8217;ve turned mine in a fancy pair of bluetooth enabled speakers. With 10$.</p>
<p>I&#8217;ve bought a bluetooth headset from Hong Kong, off ebay. The quality is what you should expect: plastic feeling and headphones that break upon the moment you put them in your ear. But who cares: the headset is the important part. Even more important is that the headset you buy off ebay is <a title="A2DP" href="http://en.wikipedia.org/wiki/A2DP#Advanced_Audio_Distribution_Profile_.28A2DP.29" target="_blank">A2DP</a> capable, that is capable of delivering stereo sound.</p>
<p>Second step is making sure your hardware (phone, PC, MAC) supports the A2DP protocol as well. My black macbook does, and most likely your average 2-3 years old mac does too. And also make sure that your old beast has an auxiliary audio in port, but, again, most of them had this option.</p>
<p>Third step is to have a RCA to headphone jack cable (YMMV according to your stereo model), in order to link the headset to the stereo.</p>
<div id="attachment_149" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-149" src="http://www.creamdesign.it/blog/wp-content/uploads/2009/08/IMG_0482-300x187.jpg" alt="A junk headset and an old cable." width="300" height="187" /><p class="wp-caption-text">A junk headset and an old cable.</p></div>
<p>Finally it&#8217;s a matter of pairing the headset with the computer, plug it into your stereo and enjoy wireless music with a decent quality.</p>
<p>Well&#8230; to tell the truth quality is not the best feature of this setup&#8230; but surplisingly not because of the headset: I realized just how bad sounded my dusty stereo after years of in-ear headphone crystal-clearness. No dinamycs at all: I just had to shut it down. Probably its place is the junkyard now.</p>
<p>But I have also an <a title="iHome home audio" href="http://www.ihomeaudio.com/" target="_blank">iHome</a> with a more decent sound output: the sound quality came back ok after trying the headset with it, and now I&#8217;m happy with my new bluetooth speakers. Next step is to integrate everything in order to keep that piece of plastic from HK always on, leeching supply from the iHome. But that&#8217;s for another time.</p>
<p>Sorry, old bulky dusty stereo, but modern tech has beaten you off one more time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.creamdesign.it/blog/archives/147/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
