<?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>Ian Winter</title>
	<atom:link href="http://ianwinter.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianwinter.co.uk</link>
	<description>Have you found the instructions yet?</description>
	<lastBuildDate>Wed, 14 Sep 2011 22:16:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>A yummy replacement</title>
		<link>http://ianwinter.co.uk/2011/09/14/a-yummy-replacement/</link>
		<comments>http://ianwinter.co.uk/2011/09/14/a-yummy-replacement/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 22:14:59 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1236</guid>
		<description><![CDATA[Had a need to quickly (and easily) replace some yum packages this evening, namely getting mysql5.0 to 5.5 and php5.1 up to 5.3. I wasn&#8217;t looking forward to doing this manually as keeping the dependencies in check is a faff at best. A quick Google however led me to the package yum-plugin-replace. This very easily sorts [...]]]></description>
			<content:encoded><![CDATA[<p>Had a need to quickly (and easily) replace some yum packages this evening, namely getting mysql5.0 to 5.5 and php5.1 up to 5.3. I wasn&#8217;t looking forward to doing this manually as keeping the dependencies in check is a faff at best. A quick Google however led me to the package yum-plugin-replace. This very easily sorts all the plugins out, flips them in out, shakes them all about and quicker than you can say Robert&#8217;s your mother&#8217;s brother sorts it all out.</p>
<p>Getting it going is easy:</p>
<pre>yum install yum-plugin-replace
yum replace mysql --replace-with mysql55</pre>
<p>Do the usual confirmations and you&#8217;re done! Same goes with php to php53. This does of course assume you&#8217;ve already <a title="CentOS/Redhat YUM repositories" href="http://ianwinter.co.uk/2011/01/23/centosredhat-yum-repositories/" target="_blank">installed</a> the <a href="http://fedoraproject.org/wiki/EPEL" target="_blank">EPEL</a> and <a href="http://iuscommunity.org/Repos" target="_blank">IUS</a> channels to get this packages from.</p>
<p>On a side note, if you do mysql don&#8217;t forget to run the upgrade script.</p>
<pre>mysql_upgrade --password</pre>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2011/09/14/a-yummy-replacement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make me a sandwich</title>
		<link>http://ianwinter.co.uk/2011/08/08/make-me-a-sandwich/</link>
		<comments>http://ianwinter.co.uk/2011/08/08/make-me-a-sandwich/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 15:05:38 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1232</guid>
		<description><![CDATA[One for the geeks.]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://imgs.xkcd.com/comics/sandwich.png" title="Sandwich" class="alignnone" width="360" height="299" /></p>
<p>One for the geeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2011/08/08/make-me-a-sandwich/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ianteresting Info</title>
		<link>http://ianwinter.co.uk/2011/07/27/ianteresting-info/</link>
		<comments>http://ianwinter.co.uk/2011/07/27/ianteresting-info/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 13:22:53 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[ianteresting]]></category>
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1228</guid>
		<description><![CDATA[Nothing to do with Ian&#8217;s aside from the fact I found them. Also a post more for reference than anything else but a couple of interesting posts I&#8217;ve seen recently. From ArsTechnica a comprehensive Lion review and particularly interesting stuff around encryption. Mounting Rackspace Cloudfiles using cloudfuse (also here &#38; for CentOS). Hierarchical Rackspace Cloudfiles container structures. Great [...]]]></description>
			<content:encoded><![CDATA[<p>Nothing to do with Ian&#8217;s aside from the fact I found them. Also a post more for reference than anything else but a couple of interesting posts I&#8217;ve seen recently.</p>
<ul>
<li>From <a href="http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars">ArsTechnica</a> a comprehensive Lion review and particularly interesting stuff around <a href="http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars/13">encryption</a>.</li>
<li>Mounting Rackspace Cloudfiles using <a href="http://www.rackspace.com/knowledge_center/node/1873">cloudfuse</a> (also <a href="http://sandeepsidhu.wordpress.com/2011/03/07/mounting-cloud-files-using-cloudfuse-into-ubuntu-10-10-v2/">here</a> &amp; for <a href="http://community.spiceworks.com/how_to/show/2137">CentOS</a>).</li>
<li><a href="http://docs.rackspace.com/files/api/v1/cf-devguide/content/Pseudo-Hierarchical_Folders_Directories-d1e1580.html">Hierarchical</a> Rackspace Cloudfiles container structures.</li>
<li>Great post from <a href="http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages">ScoutApp</a> on understanding load averages.</li>
<li>Four Lion terminal <a href="http://www.macworld.com/article/161330/2011/07/four_lion_terminal_hacks.html">quick hacks</a>.</li>
</ul>
<p>News that Velocity are running an <a href="http://velocityconf.com/velocityeu/">EU conference</a> is also welcome news.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2011/07/27/ianteresting-info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bootable OS X Lion USB Drive</title>
		<link>http://ianwinter.co.uk/2011/07/27/bootable-os-x-lion-usb-drive/</link>
		<comments>http://ianwinter.co.uk/2011/07/27/bootable-os-x-lion-usb-drive/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 13:16:06 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1225</guid>
		<description><![CDATA[This has been done to death on the vast expanse of the interweb, but, I&#8217;m blogging it anyway more for my own reference than anything else. OS X Lion is distributed via the App Store however it&#8217;s really easy to make a USB drive that&#8217;s bootable which you can use to install Lion from. Load [...]]]></description>
			<content:encoded><![CDATA[<p>This has been done to death on the vast expanse of the interweb, but, I&#8217;m blogging it anyway more for my own reference than anything else.</p>
<p>OS X Lion is distributed via the App Store however it&#8217;s really easy to make a USB drive that&#8217;s bootable which you can use to install Lion from.</p>
<ol>
<li>Load up Mac App Store, login, purchase and download OS X Lion.</li>
<li>Once downloaded, open Finder and go to the Applications and locate the &#8220;Install Max OS X Lion&#8221; file</li>
<li>Right click on the downloaded file and select &#8220;Show Package Contents&#8221;.</li>
<li>Go to &#8220;Contents&#8221;, then inside the &#8220;SharedSupport&#8221; folder and you’ll find a file titled &#8220;InstallESD.dmg&#8221;. Copy this over to the desktop. Make sure you copy and paste rather than drag &amp; drop this file.</li>
<li>Plugin the USB drive you want to use. 4GB is enough, but, I&#8217;d do it on an 8GB one. I used <a href="http://www.amazon.co.uk/gp/product/B0047T6XPQ/ref=noref?ie=UTF8&amp;s=computers&amp;psc=1">one of these</a> with Amazon&#8217;s frustration free packaging, which rocks!.</li>
<li>Open up &#8220;Disk Utility&#8221; and drag InstallESD.dmg from wherever you copied it to in to the left-hand sidebar. Select the attached USB from left side and click on &#8220;Partition&#8221; tab.</li>
<li>Select &#8220;1 Partition&#8221; from the Volume Scheme dropdown menu. Choose &#8220;Mac OS Extended (Journaled)&#8221; from the left.</li>
<li>Now click on &#8220;Option&#8221; at the bottom. Select &#8220;GUID Partition Table&#8221; and press OK. Now click on Apply at the bottom right. Be warned this is will erase all data on your USB flash drive.</li>
<li>Once it&#8217;s done formatting click on &#8221;Restore&#8221; (it’s right next to where you clicked on &#8220;Partition&#8221; in Step 6).</li>
<li>Choose the USB drive you plugged-in in Step 5 as &#8220;Destination&#8221; with the InstallESD.dmg file as &#8220;Source&#8221;.</li>
<li>Click Restore and type in your password. This will create the Lion bootable USB flash drive.</li>
</ol>
<div>After it&#8217;s done, you&#8217;re pretty much set. You can either carry on and install Lion or you can reboot with your USB drive plugged in and whilst holding down the &#8220;Option&#8221; key select it and boot up to the installer.</div>
<p>Also, if you don&#8217;t back up your machine and loose everything, don&#8217;t blame me. Good article on backing up and more specifically cloning can be found over on <a href="http://reverttosaved.com/2011/07/19/mac-os-x-users-clone-your-macs-before-installing-lion/">Craig Grannell&#8217;s</a> site.</p>
<p>Thanks to articles on <a href="http://mashable.com/2011/07/20/lion-clean-install-guide/">Mashable</a>, <a href="http://www.informationweek.com/byte/howto/personal-tech/desktop-os/231002156">Information Week</a> and <a href="http://www.redmondpie.com/how-to-make-your-own-os-x-lion-bootable-usb-flash-drive-tutorial/">Redmond Pie</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2011/07/27/bootable-os-x-lion-usb-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS and Dropbox</title>
		<link>http://ianwinter.co.uk/2011/05/16/centos-and-dropbox/</link>
		<comments>http://ianwinter.co.uk/2011/05/16/centos-and-dropbox/#comments</comments>
		<pubDate>Mon, 16 May 2011 21:21:17 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[sync]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1216</guid>
		<description><![CDATA[Just because I can really I setup Dropbox syncing on one of my CentOS 5 servers. It&#8217;s a little bit of a faff, but, not that hard. The official guide is online, but, this is a shorten version and might not cover everything but it worked on my headless VM just fine. First up su [...]]]></description>
			<content:encoded><![CDATA[<p>Just because I can really I setup Dropbox syncing on one of my CentOS 5 servers. It&#8217;s a little bit of a faff, but, not that hard. The <a href="http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall">official guide</a> is online, but, this is a shorten version and might not cover everything but it worked on my headless VM just fine.</p>
<p>First up su to whichever user you want to install Dropbox as. You&#8217;ll need two terminal&#8217;s open so fire them both up now. You&#8217;ll also need lynx, gcc and python installed so if you don&#8217;t have, sort that out with yum.</p>
<p>In your home directory grab the correct binary for you (x86 or x86_64).</p>
<pre class="brush: plain; title: ; notranslate">
wget -O dropbox.tar.gz http://www.dropbox.com/download/?plat=lnx.x86
wget -O dropbox.tar.gz http://www.dropbox.com/download/?plat=lnx.x86_64
</pre>
<p>Now unpack it and start it up in your first terminal window.</p>
<pre class="brush: plain; title: ; notranslate">
tar xvfz dropbox.tar.gz
~/.dropbox-dist/dropboxd
</pre>
<p>Now in your second terminal go to http://dropbox.com using lynx (lynx http://dropbox.com) and login, then using the key shortcut &#8220;g&#8221; paste in the URL that your first window should now be prompted you to go to. This is to register the machine with your Dropbox account. You&#8217;ll need to scroll down the page to re-enter your password. Once done the first window should say hello to you and it&#8217;ll quit.</p>
<p>Next up sort out the init.d script. Put the following in /etc/init.d/dropbox and chown 755 it when you&#8217;re done.</p>
<pre class="brush: plain; title: ; notranslate">
# chkconfig: 345 85 15
# description: Startup script for dropbox daemon
#
# processname: dropboxd
# pidfile: /var/run/dropbox.pid
# config: /etc/sysconfig/dropbox
#

### BEGIN INIT INFO
# Provides: dropboxd
# Required-Start: $local_fs $network $syslog
# Required-Stop: $local_fs $syslog
# Should-Start: $syslog
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start up the Dropbox file syncing daemon
# Description:       Dropbox is a filesyncing sevice provided by dropbox.com
#                    This service starts up the dropbox daemon.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

# To configure, add line with DROPBOX_USERS=&quot;user1 user2&quot; to /etc/sysconfig/dropbox
# Probably should use a dropbox group in /etc/groups instead.

[ -f /etc/sysconfig/dropbox ] &amp;&amp; . /etc/sysconfig/dropbox
prog=dropboxd
lockfile=${LOCKFILE-/var/lock/subsys/$prog}
config=${CONFIG-/etc/sysconfig/dropbox}
RETVAL=0

start() {
    echo -n $&quot;Starting $prog&quot;
    if [ -z $DROPBOX_USERS ] ; then
        echo -n &quot;: unconfigured: $config&quot;
        echo_failure
        echo
        rm -f ${lockfile} ${pidfile}
        RETURN=6
        return $RETVAL
    fi
    for dbuser in $DROPBOX_USERS; do
        daemon --user $dbuser /bin/sh -c &quot;/home/$dbuser/.dropbox-dist/dropboxd&amp;&quot;
    done
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] &amp;&amp; touch ${lockfile}
    return $RETVAL
}

status() {
    for dbuser in $DROPBOX_USERS; do
        dbpid=`pgrep -u $dbuser dropbox | grep -v grep`
        if [ -z $dbpid ] ; then
            echo &quot;dropboxd for USER $dbuser: not running.&quot;
        else
            echo &quot;dropboxd for USER $dbuser: running (pid $dbpid)&quot;
        fi
    done
}

stop() {
    echo -n $&quot;Stopping $prog&quot;
    for dbuser in $DROPBOX_USERS; do
        killproc /home/$dbuser/.dropbox-dist/dropbox
    done
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] &amp;&amp; rm -f ${lockfile} ${pidfile}
}

# See how we were called.
case &quot;$1&quot; in
    start)
        start
        ;;
    status)
        status
        ;;
    stop)
        stop
        ;;
    restart)
        stop
        start
        ;;
    *)
        echo $&quot;Usage: $prog {start|status|stop|restart}&quot;
        RETVAL=3
esac
exit $RETVAL
</pre>
<p>Edit /etc/sysconfig/dropbox and add the following line to match your linux account where you&#8217;ve installed Dropbox.</p>
<pre class="brush: plain; title: ; notranslate">
DROPBOX_USERS=&quot;linux_user_name&quot;
</pre>
<p>Make sure it starts on boot.</p>
<pre class="brush: plain; title: ; notranslate">
chkconfig dropbox on.
</pre>
<p>That&#8217;s it. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2011/05/16/centos-and-dropbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CentOS/Redhat YUM repositories</title>
		<link>http://ianwinter.co.uk/2011/01/23/centosredhat-yum-repositories/</link>
		<comments>http://ianwinter.co.uk/2011/01/23/centosredhat-yum-repositories/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 21:05:03 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[repositories]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1206</guid>
		<description><![CDATA[There&#8217;s a bunch of stuff that you can&#8217;t always find in the standard CentOS/Redhat repositories. The main repositories I&#8217;ve used are EPEL, IUS, REMI and in a specific case Cloudera&#8217;s. I used the Cloudera one for flume, but, it&#8217;s a quick way to get it installed and the various Hadoop odd&#8217;s and end&#8217;s. The IUS one is good for [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a bunch of stuff that you can&#8217;t always find in the standard CentOS/Redhat repositories. The main repositories I&#8217;ve used are <a href="http://fedoraproject.org/wiki/EPEL/FAQ">EPEL</a>, <a href="http://iuscommunity.org/getting-started/">IUS</a>, <a href="http://blog.famillecollet.com/pages/Config-en">REMI</a> and in a specific case Cloudera&#8217;s. I used the <a href="https://docs.cloudera.com/display/DOC/CDH3+Installation#CDH3Installation-InstallingCDH3onRedHatSystems ">Cloudera</a> one for flume, but, it&#8217;s a quick way to get it installed and the various Hadoop odd&#8217;s and end&#8217;s. The IUS one is good for MySQL 5.1 and Percona builds, also Git 1.7. The EPEL repo has stuff like Redis and also other newer versions.</p>
<p>If you don&#8217;t want to use one you can alias commands to use repos, so, for instance if you have a CentOS build with all the above install you&#8217;d get output from yum repolist something like this:</p>
<pre>addons        CentOS-5 - Addons
base          CentOS-5 - Base
cloudera-cdh3 Cloudera's Distribution for Hadoop, Version 3
epel          Extra Packages for Enterprise Linux 5 - i386
extras        CentOS-5 - Extras
ius           IUS Community Packages for Enterprise Linux 5 - i38 enabled
updates       CentOS-5 - Updates</pre>
<p>If you want to install/search from a specific repo you can either disable them all in the /etc/yum.repos.d/*.repo files and then enable them when you run yum, or, you can leave them all enabled and disable them one by one. Something like this:</p>
<div id="_mcePaste">
<pre class="brush: plain; title: ; notranslate">
alias yum-ius='yum --disablerepo=addons,base,epel,extras,updates,cloudera-cdh3'
alias yum-cloudera='yum --disablerepo=addons,base,epel,extras,updates,ius'
alias yum-epel='yum --disablerepo=addons,base,extras,updates,ius,cloudera-cdh3'
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2011/01/23/centosredhat-yum-repositories/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VirtualBox &amp; CentOS</title>
		<link>http://ianwinter.co.uk/2011/01/23/virtualbox-centos/</link>
		<comments>http://ianwinter.co.uk/2011/01/23/virtualbox-centos/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 20:56:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1204</guid>
		<description><![CDATA[If you&#8217;ve installed CentOS 5.x using Oracle (Sun) VirtualBox then you&#8217;ll have probably had fun getting the guest additions to work. After doing this a few times, each time forgetting which commands I need I&#8217;m going to blog it if for nothing but refence! After you&#8217;ve rebooted you should be good to go, again. If [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve installed CentOS 5.x using Oracle (Sun) VirtualBox then you&#8217;ll have probably had fun getting the guest additions to work. After doing this a few times, each time forgetting which commands I need I&#8217;m going to blog it if for nothing but refence!</p>
<pre class="brush: plain; title: ; notranslate">
sudo yum -y install gcc kernel-devel kernel-headers
</pre>
<p>After you&#8217;ve rebooted you should be good to go, again. If you don&#8217;t have the right kernel it will moan about OpenGL support, but, you don&#8217;t need it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2011/01/23/virtualbox-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repair broken /etc/passwd on QNAP TS-409</title>
		<link>http://ianwinter.co.uk/2010/12/07/repair-broken-etcpasswd-on-qnap-ts-409/</link>
		<comments>http://ianwinter.co.uk/2010/12/07/repair-broken-etcpasswd-on-qnap-ts-409/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 23:10:01 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[qnap]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ts-409 pro]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1194</guid>
		<description><![CDATA[So, I was messing around with PS1 prompts on my QNAP TS-409 Pro and decided to add it into the .bash_profile. The shell wasn&#8217;t BASH so I edited the /etc/passwd to change it, however in my haste I hit save and quit with the shell being /etc/bas &#8211; missing an h. The result is you [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was messing around with PS1 prompts on my QNAP TS-409 Pro and decided to add it into the .bash_profile. The shell wasn&#8217;t BASH so I edited the /etc/passwd to change it, however in my haste I hit save and quit with the shell being /etc/bas &#8211; missing an h.</p>
<p>The result is you cannot login via SSH. As only the admin user can login remotely this is a bit of an issue.</p>
<p>A lot of frantic Googling led me to a post on the <a href="http://forum.qnap.com/viewtopic.php?f=35&amp;t=5838">QNAP forum</a> with a guide on how to fix it. I&#8217;m going to repeat these steps here as well with my modifications. I have a 4 disk RAID5 and what I noticed was that when I hot plugged all 4 drives back in the array rebuilt itself and basically kicked me off again.</p>
<p>— Shutdown the system and remove all drives<br />
— Boot, login using telnet to port 13131 (ensure you enable this via the web ui before shutdown)<br />
— Hot plug 3 of the 4 drives (assuming RAID5)<br />
— Assemble the system RAID partition:</p>
<pre class="brush: plain; title: ; notranslate"># mdadm -A /dev/md9 /dev/sda1 /dev/sdb1 /dev/sdc1 --run
# mkdir /mnt/HDA_ROOT
# mount /dev/md9 /mnt/HDA_ROOT
# cd /mnt/HDA_ROOT/.config</pre>
<p>— edit the passwd file and correct any mistakes</p>
<pre class="brush: plain; title: ; notranslate"># halt (shuts the unit down)</pre>
<p>— plug in 4th drive<br />
— power up</p>
<p>Turns out I hadn&#8217;t noticed the .profile file which I could have changed and saved a world of pain!</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2010/12/07/repair-broken-etcpasswd-on-qnap-ts-409/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Log response headers in apache</title>
		<link>http://ianwinter.co.uk/2010/11/18/log-response-headers-in-apache/</link>
		<comments>http://ianwinter.co.uk/2010/11/18/log-response-headers-in-apache/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 13:44:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1185</guid>
		<description><![CDATA[I&#8217;ve been working on tweaking some apache logging on a few servers and one of the things I needed to log was a response header. The response header in question is an identifier with information about where the request was served from. A quick look through the apache log docs doesn&#8217;t give any clue on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on tweaking some apache logging on a few servers and one of the things I needed to log was a response header. The response header in question is an identifier with information about where the request was served from.</p>
<p>A quick look through the apache <a href="http://httpd.apache.org/docs/2.2/logs.html">log docs</a> doesn&#8217;t give any clue on how to do this. I details request header logging but not response. A google search also didn&#8217;t really come up with anything that useful until I stumbled on <a href="http://www.apacheweek.com/features/logfiles">an article</a> over on the  apache week site.</p>
<p>A quick modification of the httpd.conf to duplicate the &#8220;common&#8221; log entry left me with this:</p>
<p><code>LogFormat "%h %l %u %t \"%r\" %>s %b <strong>\"%{HEADER_NAME}o\"</strong>" common2<br />
</code></p>
<p>The key element is the &#8220;o&#8221;, if you have %{HEADER_NAME}i you&#8217;ll get the request header, if you have %{HEADER_NAME}o you&#8217;ll get the response header.</p>
<p>This results in the following entry in the log file:</p>
<p><code>127.0.0.1 - - [18/Nov/2010:13:37:39 +0000] "GET / HTTP/1.1" 200 31006 "<strong>HEADER_VALUE</strong>"<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2010/11/18/log-response-headers-in-apache/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MAC apachectl ulimit error with 10.6.5</title>
		<link>http://ianwinter.co.uk/2010/11/18/mac-apachectl-ulimit-error-with-10-6-5/</link>
		<comments>http://ianwinter.co.uk/2010/11/18/mac-apachectl-ulimit-error-with-10-6-5/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 13:23:50 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[10.6.5]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1180</guid>
		<description><![CDATA[If you&#8217;ve upgraded to the latest MAC release of Snow Leopard, 10.6.5, and you use apache you may have noticed a bug when you try to control apache with apachectl. The release notes detail that apache has been upgraded to 2.2.15 to fix some security holes, however by doing so causes this bug. The fix [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve upgraded to the latest MAC release of Snow Leopard, 10.6.5, and you use apache you may have noticed a bug when you try to control apache with apachectl.</p>
<pre class="brush: plain; title: ; notranslate">
[ian@ian ~]$ sudo apachectl -t
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
</pre>
<p>The <a href="http://support.apple.com/kb/HT4435">release notes</a> detail that apache has been upgraded to 2.2.15 to fix some security holes, however by doing so causes this bug.</p>
<p>The fix is pretty easy and requires you to edit the /usr/sbin/apachectl file. The line you&#8217;re looking for is this:</p>
<pre class="brush: plain; title: ; notranslate">ULIMIT_MAX_FILES=&quot;ulimit -S -n `ulimit -H -n`&quot;</pre>
<p>All you need to do is simply remove the actual ulimit command and leave this in place:</p>
<pre class="brush: plain; title: ; notranslate">ULIMIT_MAX_FILES=&quot;&quot;</pre>
<p>Try apachectl again and it&#8217;ll work. In my case the offending line was in fact 64, not 82.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2010/11/18/mac-apachectl-ulimit-error-with-10-6-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

