<?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>cenolan.com &#187; Linux</title>
	<atom:link href="http://www.cenolan.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cenolan.com</link>
	<description>What you looking at?</description>
	<lastBuildDate>Sun, 14 Jun 2009 20:03:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple time lapse video in Linux</title>
		<link>http://www.cenolan.com/2009/05/simple-time-lapse-video-in-linux/</link>
		<comments>http://www.cenolan.com/2009/05/simple-time-lapse-video-in-linux/#comments</comments>
		<pubDate>Sun, 10 May 2009 16:24:37 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora 10]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[stop-motion]]></category>
		<category><![CDATA[timelapse]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=104</guid>
		<description><![CDATA[Time lapse (or stop-motion) video is really cool, and this post explains how to make a simple time lapse style video in Linux using entirely free open source software. 
There is more than one way to skin a cat and when I was searching for how to do this I came across many different methods [...]]]></description>
			<content:encoded><![CDATA[<p>Time lapse (or stop-motion) video is <a href="http://www.youtube.com/watch?v=qBjLW5_dGAM">really cool</a>, and this post explains how to make a simple time lapse style video in Linux using entirely free open source software. </p>
<p>There is more than one way to skin a cat and when I was searching for how to do this I came across many different methods and suggestions but not really anything that suited what I wanted. Andrew Wells suggests <a href="http://wp.pr0gr4mm3r.com/linux/how-to-create-a-time-lapse-video-using-ffmpeg/">making a movie and then processing it with ffmpeg</a> to only store 1 in every n frames. That seems a neat solution but I wanted to take a series of still shots and string those together into a movie. Tim Nugent published a teaser of some nice looking <a href="http://ultrawide.wordpress.com/2009/01/27/timelapse-photography-on-linux/">time lapse software</a> he wrote but as yet there is no published source or binary. There were <a href="http://www.linux.com/feature/127059">various</a> other <a href="http://www.ludumdare.com/compo/2008/08/09/no-love-linux-timelapse-howto/">suggestions</a> dotted around the web but each one I tried had <a href="http://forums.fedoraforum.org/showthread.php?p=1211408">some problem</a> or other. So here's how I did it.</p>
<p><span id="more-104"></span></p>
<p>First of all, you need a working webcam. Webcam support has really improved recently in Linux and I found the built-in iSight on my MacBook and my cheapo Logitech USB webcam work just fine without any intervention from me. </p>
<p>Next we need some way to save an image from the webcam every x seconds. I found that <a href="http://www.smcc.demon.nl/camstream/index.html">camstream</a> does the trick just fine despite it's sucky 1996-looking website and lack of a release since 2006. Under Fedora 10 to install camstream just use yum or your favourite GUI package manager:</p>
<pre><code>yum install camstream</code></pre>
<p>Camstream is pretty easy to use. Really, a child could do it. Just use the "File" menu to open up your webcam device. Then click the little configuration icon (it looks like a spanner) to adjust the file settings you'd like to use for capture. I found that JPG images work much better than PNG. </p>
<p>As the "Basename" enter the <em>full path</em> of the filename you'd like to save your images as, for example if you want to save your images as "/home/yourname/Pictures/Webcam/MyTimeLapse/image001.jpg" (and so on) then set the basename as "/home/yourname/Pictures/Webcam/MyTimeLapse/image" then choose "Number sequence" and set the maximum sequence number to something pretty big (like 100000). Close the settings. Click the icon to "show last snapshot". </p>
<p>Now click "take snapshot at regular intervals" and set your interval. I chose 3 seconds. Choose whatever you think is appropriate. Now you're all set. Camstream will take images at the interval chosen and save them into the directory you configured. Sweeeeet.</p>
<p>Ok, so now we have a directory full of images that looks something like this:</p>
<pre><code>$ ls
image000.jpg  image003.jpg  image006.jpg  image009.jpg  image012.jpg  image015.jpg  image018.jpg
image001.jpg  image004.jpg  image007.jpg  image010.jpg  image013.jpg  image016.jpg
image002.jpg  image005.jpg  image008.jpg  image011.jpg  image014.jpg  image017.jpg</code></pre>
<p>We're gonna feed these files to mencoder for it to pull together into a movie. To do this we need a text file containing a list of the files in the order that we want them. You could write this file yourself (boring) but we can create it using something like this:</p>
<p>ls -1tr > files.txt </p>
<p>This provides a listing (ls) of the current working directory outputting 1 file per line (1) sorted by modification time (t) in reverse order (r) and sends the output (>) to a file named files.txt. In the example above my files.txt looks like this:</p>
<pre><code>image000.jpg
image001.jpg
image002.jpg
image003.jpg
image004.jpg
image005.jpg
image006.jpg
image007.jpg
image008.jpg
image009.jpg
image010.jpg
image011.jpg
image012.jpg
image013.jpg
image014.jpg
image015.jpg
image016.jpg
image017.jpg
image018.jpg</code></pre>
<p>Now download and install <a href="http://www.mplayerhq.hu/">mencoder</a>. Again it's available on nearly all modern distros. For Fedora 10 just do "yum install mencoder". Now all we need do to make our move is issue a command like this:</p>
<pre><code>mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o test.avi -mf type=jpeg:fps=20 mf://@files.txt</code></pre>
<p>This will encode all the files listed in files.txt into a movie called test.avi using the mpeg4 encoder with no sound and a framerate of 20 frames per second. Messing with the fps gives very different results. See "<a href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html">Encoding from multiple input image files</a>" in the mencoder documentation for more info.</p>
<p>Here's an example video made using this method:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/c6nk64D584s&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/c6nk64D584s&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2009/05/simple-time-lapse-video-in-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Installing Fedora 10 on a MacBook</title>
		<link>http://www.cenolan.com/2008/11/installing-fedora-10-macbook/</link>
		<comments>http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 16:55:45 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora 10]]></category>
		<category><![CDATA[Leisure]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[Broadcom]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mactel-linux]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=22</guid>
		<description><![CDATA[

What works and what doesn't?
Basic installation instructions
Post installation
Fixing the wireless
Fixing the touchpad
Disable touchpad while typing
iSight camera
Bluetooth
Apple SMC (Optional)
Plymouth graphical boot (Optional)
What next?


This guide will help you through all the steps necessary for installing Fedora 10 on a MacBook Santa Rosa. This guide is currently aimed at Fedora 10 x86_64 but will also work on i386 [...]]]></description>
			<content:encoded><![CDATA[<div class="toc">
<ol>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-what-works-and-what-doesnt">What works and what doesn't?</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-basic-installation-instructions">Basic installation instructions</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-post-installation">Post installation</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-fixing-the-wireless">Fixing the wireless</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-fixing-the-touchpad">Fixing the touchpad</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-disable-touchpad-while-typing">Disable touchpad while typing</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-isight-camera">iSight camera</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-bluetooth">Bluetooth</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-apple-smc-optional">Apple SMC (Optional)</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-plymouth-graphical-boot-optional">Plymouth graphical boot (Optional)</a></li>
<li><a href="http://www.cenolan.com/2008/11/installing-fedora-10-macbook/#toc-what-next">What next?</a></li>
</ol>
</div>
<p>This guide will help you through all the steps necessary for installing Fedora 10 on a MacBook Santa Rosa. This guide is currently aimed at Fedora 10 x86_64 but will also work on i386 version (adjust as necessary). Most of the steps equally apply to pre-Santa Rosa models too.</p>
<p>These instructions will work with the MacBook 3,1 (Late 2007) and newer but will NOT work with the new aluminium MacBooks since they have different hardware (especially the graphics card). These instructions are not suitable for the MacBook Pro either!!</p>
<p>This guide is based largely around my <a href="http://www.mactel-linux.org/wiki/Fedora8OnMacBookSantaRosa">previous guide for Fedora 8</a>, and again much credit goes to the people who created the original <a href="https://help.ubuntu.com/community/MacBook_Santa_Rosa">Ubuntu wiki guide</a>.</p>
<h3 id="toc-what-works-and-what-doesnt">What works and what doesn't?</h3>
<p>There are a few things that need fixing (covered in detail below) but the following all work "out of the box" with Fedora 10: video/graphics, compiz effects, firewire, CD/DVD reading and writing, function keys (brightness, volume etc), sound, and ethernet. Even the new "plymouth" graphical boot screen works fine once activated.</p>
<p>I have yet to try the infrared or connecting an external monitor. Everything else works with the tweaks described below, except for suspend and hibernate which seem generally pretty broken in F10 (as it was in F9 too). <em>Update 7 November 2008: Suspend and hibernate are fixed with 2.6.27.7-134 kernel and newer. <a href="https://bugzilla.redhat.com/show_bug.cgi?id=473542">See bug report</a>.</em></p>
<p><span id="more-22"></span></p>
<h3 id="toc-basic-installation-instructions">Basic installation instructions</h3>
<p>If you're new to installing Linux then these steps should help you. If you're an old hand then skip below to view the post-installation steps necessary to fix the things that don't "just work".</p>
<ol>
<li>Update the MacBook firmware to the latest version. If you prefer, you may use the standard "Software Update" in OS X.</li>
<li>Get your Fedora 10 installation DVD ready. Note: you should use the x86_64 version of Fedora 10 and that I have only tested this using the Install Media, not the Live DVD.</li>
<li>Install <a href="http://refit.sourceforge.net/">rEFIt</a> on OS X if you want a boot menu to select between OS X/Fedora to appear on every boot. This is highly recommended but optional - this guide assumes you have installed rEFIt. You can make Fedora boot by default and change the menu timeout by editing the "refit.conf" file (described on the rEFIt website).</li>
<li>Use the OS X partition manager in Disk Utility to resize your OS X partition and make space for Fedora. On my 260GB hard drive, I shrank the OS X (hfs+) partition to 120GB to leave about 130GB for Fedora. Insert your Fedora 10 installation DVD in the drive and reboot.</li>
<li>If you have rEFIt installed, then on boot you will be given the option to boot from the DVD, choose it. If you don't have rEFIt installed, then hold down "C" to boot from the DVD.</li>
<li>Install Fedora as usual, except:</li>
<ol>
<li>In the partitioner, select to manually edit partition table</li>
<li>Create a 200MB boot partition with mountpoint '/boot' (this will be /dev/sda3)</li>
<li>Create a new ext3 partition with mountpoint '/' - this will be your main Fedora partition on /dev/sda4. Make sure to leave 2GB free space after this partition for your swap partition</li>
<li>With the remaining 2GB, create a linux swap partition - this will be /dev/sda5</li>
</ol>
<li>Finish the installation and reboot.</li>
<li>If you installed rEFIt, you should have a choice between booting OS X and Linux. Use the arrow keys and Enter to select Linux.</li>
<li>Log in to Fedora</li>
<li>Follow the steps in the sections below to work around things that still do not work out-of-the-box in Fedora 10.</li>
</ol>
<h3 id="toc-post-installation">Post installation</h3>
<p>Note: The wireless on the MacBook doesn't work out of the box in Fedora, so you're going to need an ethernet internet connection available until we get round to fixing the wireless later in this guide.</p>
<p>It is very important now to update your Fedora installation to the latest packages using yum. To do so:</p>
<pre><code>su -
yum update</code></pre>
<p>Once yum has finished updating, reboot, and then do a yum update again. Repeat this process until yum finds no more packages to update.</p>
<h3 id="toc-fixing-the-wireless">Fixing the wireless</h3>
<p>The MacBook comes with a Broadcom 4328 wireless chipset. This is not supported by default in Fedora 10 and there are two options to make it work: using ndiswrapper and Windows drivers or using the new official Broadcom STA wireless driver. In this guide we will use the official Broadcom driver because it is easier and more reliable.</p>
<p><strong>1) Enable the rpmfusion non-free repository.</strong></p>
<p>The broadcom-wl and wl-kmod RPMs that we need are in the <a href="http://rpmfusion.org">rpmfusion.org</a> non-free repository which also requires the rpmfusion.org free repository. To enable these repos in Fedora simply do this:</p>
<pre><code>su -c 'rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'</code></pre>
<p><strong>2) Update and install the driver package</strong></p>
<p>Now that you have the appropriate repository enabled, to install the driver package we first ensure that we have the latest updates and then install the "broadcom-wl" package which will bring with it the required "kmod-wl" package:</p>
<pre><code>su -
yum update
yum install broadcom-wl</code></pre>
<p>That's all there is to it. At this stage you may need to reboot in order to enable the new driver and any new kernel that was installed during the update. For more details or if you have any difficulties <a href="http://www.cenolan.com/2008/11/rpm-install-broadcom-wireless-sta-driver-fedora/">see this post</a>.</p>
<p>When future kernels are released a simple "yum update" command should install the new kernel and also pull in the updated Broadcom driver for that new kernel.</p>
<h3 id="toc-fixing-the-touchpad">Fixing the touchpad</h3>
<p>(Thanks to <a href="http://bd-things.net/fedora-10-thank-you-very-much-macbook-review-and-fixes/">bodom_lx</a> for this tip)</p>
<p>The touchpad works out of the box but there is no way to right or middle click. Traditionally this was fixed by adding the appropriate options to /etc/X11/xorg.conf but the new xorg-server in F10 doesn't use the traditional xorg.conf file. Instead it is configured through <a href="http://www.freedesktop.org/wiki/Software/hal">HAL</a> fdi configuration files. </p>
<p>To create the appropriate file for configuring the touchpad:</p>
<pre><code>su -
gedit /etc/hal/fdi/policy/appletouch.fdi</code></pre>
<p>Copy and paste the following into the empty file:</p>
<pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;deviceinfo version="0.2"&gt;
  &lt;device&gt;
    &lt;match key="info.capabilities" contains="input.touchpad"&gt;
      &lt;match key="info.product" contains="appletouch"&gt;
        &lt;merge key="input.x11_driver" type="string"&gt;synaptics&lt;/merge&gt;
        &lt;merge key="input.x11_options.SendCoreEvents" type="string"&gt;true&lt;/merge&gt;
        &lt;merge key="input.x11_options.HorizEdgeScroll" type="string"&gt;0&lt;/merge&gt;
        &lt;merge key="input.x11_options.VertEdgeScroll" type="string"&gt;0&lt;/merge&gt;
        &lt;merge key="input.x11_options.VertTwoFingerScroll" type="string"&gt;1&lt;/merge&gt;
        &lt;merge key="input.x11_options.HorizTwoFingerScroll" type="string"&gt;0&lt;/merge&gt;
        &lt;merge key="input.x11_options.VertScrollDelta" type="string"&gt;10&lt;/merge&gt;
        &lt;merge key="input.x11_options.HorizScrollDelta" type="string"&gt;10&lt;/merge&gt;
        &lt;merge key="input.x11_options.VertScrollDelta" type="string"&gt;10&lt;/merge&gt;
        &lt;merge key="input.x11_options.TapButton1" type="string"&gt;0&lt;/merge&gt;
        &lt;merge key="input.x11_options.TapButton2" type="string"&gt;3&lt;/merge&gt;
        &lt;merge key="input.x11_options.TapButton3" type="string"&gt;2&lt;/merge&gt;
        &lt;merge key="input.x11_options.ClickFinger1" type="string"&gt;1&lt;/merge&gt;
        &lt;merge key="input.x11_options.ClickFinger2" type="string"&gt;3&lt;/merge&gt;
        &lt;merge key="input.x11_options.ClickFinger3" type="string"&gt;2&lt;/merge&gt;
        &lt;merge key="input.x11_options.FingerLow" type="string"&gt;10&lt;/merge&gt;
        &lt;merge key="input.x11_options.FingerHigh" type="string"&gt;20&lt;/merge&gt;
        &lt;merge key="input.x11_options.PressureMotionMinZ" type="string"&gt;10&lt;/merge&gt;
        &lt;merge key="input.x11_options.SHMConfig" type="string"&gt;On&lt;/merge&gt;
      &lt;/match&gt;
    &lt;/match&gt;
  &lt;/device&gt;
&lt;/deviceinfo&gt;</code></pre>
<p>Save the file and reboot. You should now be able to right-click by using a two finger tap on the touchpad and middle-click by using a three finger tap. You can also right-click by holding two fingers on the touchpad and clicking the button, and middle-click by holding three fingers and clicking the button.</p>
<p>If you want to adjust any of the options (or add new ones) see "man synaptics" for an explanation of what they do.</p>
<h3 id="toc-disable-touchpad-while-typing">Disable touchpad while typing</h3>
<p>The placement and sensitivity of the MacBook touchpad means that it is prone to moving your cursor while you're typing which is very annoying. We can fix this:</p>
<p>To disable the touchpad while typing use this command:</p>
<pre><code>syndaemon -i 1 -d</code></pre>
<p>This disables the touchpad for 1 second after you type something. This works well but if you go back and forth a lot it can be a hassle to wait that one second. NOTE you can use ".5" for half a seconf instead and it works much better.</p>
<p>Alternatively,</p>
<pre><code>syndaemon -t -d</code></pre>
<p>This disables tapping motions but not movement while typing.</p>
<p>Both work fine, and the one that works best for you will likely be determined by the type of computing you do. Try them both and decide for yourself.</p>
<p>Once you've found the one you want to use, add it as an application to start in your gnome session. </p>
<h3 id="toc-isight-camera">iSight camera</h3>
<p>First of all, you will need a copy of the firmware from Apple. You can either <a href="http://www.i-nz.net/files/projects/linux-kernel/isight/against-revision-140/firmware/AppleUSBVideoSupport">download this here</a>, or copy it from a Mac OS X partition. While the latter is usually preferred I can't guarantee that the firmware distributed with your MacBook will be supported, so sometimes its easier just to download it.</p>
<p>To acquire the firmware, save the file AppleUSBVideoSupport to your home directory. Next, we need to convert the AppleUSBVideoSupport to a useable firmware file. The isight-firmware-tools will do this for us so we need to install that package:</p>
<pre><code>su -c "yum install isight-firmware-tools"</code></pre>
<p>Now, finally, we can convert the AppleUSBVideoSupport to a useable firmware file. From your home directory where you downloaded the AppleUSBVideoSupport file: </p>
<pre><code>su -c ift-extract --apple-driver AppleUSBVideoSupport</code></pre>
<p>Reboot and your webcam should be fully functionally. Test it with Cheese, Ekiga, or Skype2.</p>
<h3 id="toc-bluetooth">Bluetooth</h3>
<p>Bluetooth works out of the box but due to some <a href="https://bugzilla.redhat.com/show_bug.cgi?id=371061#c2">kernel bug</a> it needs to be enabled properly first.</p>
<p>Edit /etc/sysconfig/bluetooth and make sure it says 'HID2HCI_ENABLE=true'.</p>
<p>That'll fix it on subsequent reboots. For now, just run '/sbin/hid2hci' as root.</p>
<h3 id="toc-apple-smc-optional">Apple SMC (Optional)</h3>
<p>This is an optional but recommended step. The <a href="http://www.mactel-linux.org/wiki/AppleSMC">Apple SMC</a> (System Management Controller) provides an interface to devices such as fans, temperature sensors, motion sensors, leds and controls these.</p>
<p>The applesmc kernel module is not loaded by default - I guess this is a bug. The correct way to load a module on boot in Fedora 10 is to create a .modules file in /etc/sysconfig/modules/ - here is how to do it for applesmc:</p>
<pre><code>su -
gedit /etc/sysconfig/modules/applesmc.modules</code></pre>
<p>Paste the following into the file: </p>
<pre><code>#!/bin/sh

if [ ! -d /sys/devices/platform/applesmc.768 ] ; then
        exec /sbin/modprobe applesmc >/dev/null 2>&#038;1
fi</code></pre>
<p>Save and exit, then change the file permissions as follows:</p>
<pre><code>chmod 755 /etc/sysconfig/modules/applesmc.modules</code></pre>
<p>On next boot the applesmc module will load. Meanwhile, just do "modprobe applesmc" as root. </p>
<h3 id="toc-plymouth-graphical-boot-optional">Plymouth graphical boot (Optional)</h3>
<p>To activate the plymouth graphical boot you must edit /boot/grub/grub.conf and add your framebuffer resolution at the end of the kernel line. For the MacBook with Intel graphics the resolution that works is "0x318". So, become root and edit the kernel line to look something like this:</p>
<pre><code>title Fedora (2.6.27.5-117.fc10.x86_64)
	root (hd0,2)
	kernel /vmlinuz-2.6.27.5-117.fc10.x86_64 ro root=UUID=afb18b52-bfdf-49aa-95f0-234d3013f87d rhgb quiet <strong>vga=0x318</strong>
	initrd /initrd-2.6.27.5-117.fc10.x86_64.img</code></pre>
<p>By default only the solar and text themes are installed. To add additional plymouth themes type:</p>
<pre><code>su -
yum install plymouth-plugin-{fade-in,pulser,spinfinity}</code></pre>
<p>Now you can try any theme you want like shown below, just replace pluginname with one of the following: solar, fade-in, pulser, spinfinity, text:</p>
<pre><code>su -
plymouth-set-default-plugin pluginname
/usr/libexec/plymouth/plymouth-update-initrd</code></pre>
<p>After that just reboot your computer to enjoy a lovely graphical boot. </p>
<h3 id="toc-what-next">What next?</h3>
<p>Now your MacBook hardware should be fully functional so it is time to get busy adding the software you want and tweaking the system to your needs. </p>
<p><a href="http://www.mjmwired.net/resources/mjm-fedora-f10.html">This guide by Mauriat Miranda</a> is a great place to look for details of how to install common media players, codecs and fonts. </p>
<p>For the native 64bit flash plugin see <a href="http://forums.fedoraforum.org/showpost.php?p=1112258&#038;postcount=3">this post</a>.</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/11/installing-fedora-10-macbook/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Some useful linux commands</title>
		<link>http://www.cenolan.com/2008/06/some-useful-linux-commands/</link>
		<comments>http://www.cenolan.com/2008/06/some-useful-linux-commands/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 12:46:32 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[commands]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=15</guid>
		<description><![CDATA[A few useful linux commands and their explanations.

Recursively find in files...
find . -name \*.php -exec grep -inH discount {} \;
This finds all files ending with .php (-name \*.php) starting in the current path (.) and recurse through all subdirectories, then search (grep) case-insensitive (i) within those files ({}) for the word "discount" and outputs the [...]]]></description>
			<content:encoded><![CDATA[<p>A few useful linux commands and their explanations.</p>
<p><span id="more-15"></span></p>
<p><strong>Recursively find in files...</strong></p>
<pre><code>find . -name \*.php -exec grep -inH discount {} \;</code></pre>
<p>This finds all files ending with .php (-name \*.php) starting in the current path (.) and recurse through all subdirectories, then search (grep) case-insensitive (i) within those files ({}) for the word "discount" and outputs the filename (H), line number (n), and the line for any matches.</p>
<p><strong>Find all files older than 14 days...</strong></p>
<pre><code>find /home/*/Maildir/.Junk/cur -type f -mtime +14 -exec ls {} \;
find /home/*/Maildir/.Trash/cur -type f -mtime +14 -exec ls {} \;</code></pre>
<p>These two commands find files within system users' Maildir .Junk and .Trash folders that are older than 14 days. You could change the "-exec ls" to "-exec rm -rf" to remove the files.</p>
<p><strong>Find top 10 directories using disk space...</strong></p>
<pre><code>du -x --block-size=1024K | sort -nr | head -10</code></pre>
<p>This finds and lists the top 10 directories using disk space in the current path. Useful if you're trying to track down what is filling up your disk.</p>
<p><strong>Create and extracting a tar.gz archive of a directory...</strong></p>
<pre><code>tar -czvf (output filename) (directory to archive)</code></pre>
<p>e.g. tar -czvf myhome.tar.gz /home/myhome/</p>
<p>To extract this archive while preserving permissions, use:</p>
<pre><code>tar --preserve -zxvf (filename)</code></pre>
<p><strong>Change permissions of directories and files...</strong></p>
<pre><code>find . -type d -exec chmod 755 {} \;</code></pre>
<p>This finds all directories (indicated by the -type d) in the current path (.) and then chmods them to 755. If you wanted to recursively chmod files, you could issue this:</p>
<pre><code>find . -type f -exec chmod 644 {} \;</code></pre>
<p>This is really for my own reference, but you may find it useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/06/some-useful-linux-commands/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mounting an FTP filesystem under Yellow Dog Linux 6</title>
		<link>http://www.cenolan.com/2008/05/mounting-an-ftp-filesystem-on-ydl6/</link>
		<comments>http://www.cenolan.com/2008/05/mounting-an-ftp-filesystem-on-ydl6/#comments</comments>
		<pubDate>Tue, 13 May 2008 15:18:25 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Yellow Dog Linux]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ydl]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=12</guid>
		<description><![CDATA[This guide shows how to use FUSE and CurlFtpFs to mount an FTP filesystem on Yellow Dog Linux 6. This guide presumes that you have already built and installed your own FUSE capable kernel for YDL 6.

Unless otherwise specified, all commands are run as a normal user, NOT root!
1) Install the FUSE userspace tools
wget http://downloads.sourceforge.net/fuse/fuse-2.7.3.tar.gz?modtime=1203456610&#038;big_mirror=0
tar [...]]]></description>
			<content:encoded><![CDATA[<p>This guide shows how to use <a href="http://fuse.sourceforge.net/">FUSE</a> and <a href="http://curlftpfs.sourceforge.net/">CurlFtpFs</a> to mount an FTP filesystem on Yellow Dog Linux 6. This guide presumes that you have already <a href="http://www.cenolan.com/2008/05/building-custom-kernel-rpm-fuse-ydl-6/">built and installed your own FUSE capable kernel</a> for YDL 6.</p>
<p><span id="more-12"></span><br />
Unless otherwise specified, all commands are run as a normal user, NOT root!</p>
<p><strong>1) Install the FUSE userspace tools</strong></p>
<pre><code>wget http://downloads.sourceforge.net/fuse/fuse-2.7.3.tar.gz?modtime=1203456610&#038;big_mirror=0
tar xvzf fuse-2.7.3.tar.gz
cd fuse-2.7.3
./configure
make
su -c "make install"</code></pre>
<p>This should all go smoothly and you should now have the FUSE tools such as "fusermount" installed.</p>
<p><strong>2) Install CurlFtpFs</strong></p>
<pre><code>wget http://downloads.sourceforge.net/curlftpfs/curlftpfs-0.9.1.tar.gz?modtime=1175788159&#038;big_mirror=0
tar zxvf curlftpfs-0.9.1.tar.gz
cd curlftpfs-0.9.1
jm_cv_func_working_malloc=yes
export jm_cv_func_working_malloc
ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_malloc_0_nonnull
jm_cv_func_working_realloc=yes
export jm_cv_func_working_realloc
ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull
./configure
make
su -c "make install"</code></pre>
<p>Again, this should all go smoothly and you should now have the "curlftpfs" program installed.</p>
<p><strong>3) Mounting the FTP server</strong></p>
<p>Mounting procedure is as follows:</p>
<p>mkdir MountPoint (eg: mkdir /backup)<br />
curlftpfs -o user=USERNAME:PASSWORD ftp://FTPHost/ MountPoint/<br />
eg: curlftpfs -o user=testusr:mypass ftp://127.0.0.1/ /backup/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/05/mounting-an-ftp-filesystem-on-ydl6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a custom kernel RPM with FUSE support on YDL 6</title>
		<link>http://www.cenolan.com/2008/05/building-custom-kernel-rpm-fuse-ydl-6/</link>
		<comments>http://www.cenolan.com/2008/05/building-custom-kernel-rpm-fuse-ydl-6/#comments</comments>
		<pubDate>Tue, 13 May 2008 13:39:29 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Yellow Dog Linux]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ydl]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=11</guid>
		<description><![CDATA[This guide explains how to build and install a custom kernel RPM with FUSE support on Yellow Dog Linux 6. The guide is written based on my experience with YDL on an Apple XServe G4 using kernel-2.6.23-9 on ppc architecture. If your system is different then adjust the guide as required.

Follow all the commands as [...]]]></description>
			<content:encoded><![CDATA[<p>This guide explains how to build and install a custom kernel RPM with FUSE support on Yellow Dog Linux 6. The guide is written based on my experience with YDL on an Apple XServe G4 using kernel-2.6.23-9 on ppc architecture. If your system is different then adjust the guide as required.</p>
<p><span id="more-11"></span><br />
Follow all the commands as a normal user, NOT root!</p>
<p><strong>1) Create an rpm build environment</strong></p>
<pre><code>cd ~
mkdir ~/rpmbuild
mkdir ~/rpmbuild/BUILD
mkdir ~/rpmbuild/RPMS
mkdir ~/rpmbuild/SOURCES
mkdir ~/rpmbuild/SPECS
mkdir ~/rpmbuild/SRPMS

echo "%_topdir /home/`whoami`/rpmbuild" &gt; ~/.rpmmacros</code></pre>
<p><strong>2) Download and install the source rpm of the current kernel.</strong></p>
<p>Note: this is not the kernel-source rpm!</p>
<pre><code>wget http://www.mirrorservice.org/sites/ftp.yellowdoglinux.com/pub/yellowdog/releases/yellowdog-6.0/SRPMS/kernel-2.6.23-9.ydl6.1.src.rpm
rpm -ivh kernel-2.6.23-9.ydl6.1.src.rpm</code></pre>
<p><strong>3) Prepare the kernel source tree</strong></p>
<pre><code>cd ~/rpmbuild/SPECS
rpmbuild -bp --target=`uname -m` kernel.spec</code></pre>
<p><strong>4) Configure the kernel</strong></p>
<pre><code>cd ~/rpmbuild/BUILD/kernel-2.6.23/linux-2.6.23.9/
cp configs/kernel-2.6.23-ppc.config .config
make oldconfig
make menuconfig</code></pre>
<p>Using the down arrow key navigate to "File systems" then press Enter and then scroll down to "Filesystem in Userspace support" and press "M" to select it as a module. Press Tab to select Exit in the bottom bar, then do it again, then press Y when prompted to save the configuration.</p>
<p>Copy the config file to ~/rpmbuild/SOURCES/:</p>
<pre><code>cp .config ~/rpmbuild/SOURCES/kernel-2.6.23-ppc.config</code></pre>
<p><strong>5) Prepare the build files</strong></p>
<pre><code>cd ~/rpmbuild/SPECS</code></pre>
<p>Open up the kernel.spec file for editing and ensure the kernel has a unique name by changing the following line (line 32)</p>
<pre><code>%define release %{subrev}.ydl6.%{rpmrev}</code></pre>
<p>to</p>
<pre><code>%define release %{subrev}.ydl6fuse.%{rpmrev}</code></pre>
<p><strong>6) Build the new kernel</strong></p>
<pre><code>rpmbuild -bb --with baseonly --without debuginfo --target=`uname -m` kernel.spec</code></pre>
<p>The build process takes a long time to complete. A lot of messages will be printed to the screen. These messages can be ignored, unless the build ends with an error. If the build completes successfully, the new kernel packages in the ~/rpmbuild/RPMS directory.</p>
<p><strong>7) Install the new kernel</strong></p>
<pre><code>cd ~/rpmbuild/RPMS/ppc
su -c "rpm -ivh kernel-2.6.23-9.ydl6fuse.1.ppc.rpm kernel-headers-2.6.23-9.ydl6fuse.1.ppc.rpm --oldpackage"</code></pre>
<p><strong>8) Make the new kernel boot by default</strong></p>
<p>As root, open up /boot/etc/yaboot.conf for editing. You should now see two kernel images listed as boot options. Change the label of the ydl6fuse image to something friendly like "linuxfuse". Now change the "default" line to the same.</p>
<p>For example:</p>
<pre><code>default=linuxfuse
image=/vmlinux-2.6.23-9.ydl6fuse.1
label=linuxfuse
read-only
initrd=/initrd-2.6.23-9.ydl6fuse.1.img
append="root=LABEL=/"

image=/vmlinux-2.6.23-9.ydl6.1
label=linux
read-only
initrd=/initrd-2.6.23-9.ydl6.1.img
append="root=LABEL=/"</code></pre>
<p>Important: Ensure you also have a line that says "delay=5" (or a greater number) so if your new kernel won't boot you can still access the yaboot menu to boot your old kernel!</p>
<p>Save and exit the file.</p>
<p>Now run "ybin" (again, as root) to commit the changes. Reboot!</p>
<p><strong>9) Load the fuse module</strong></p>
<pre><code>su -
modprobe fuse</code></pre>
<p>To make the fuse module load on boot. Create the file /etc/sysconfig/modules/my.modules and give it the following contents:</p>
<pre><code>#!/bin/sh
modprobe fuse &gt;/dev/null 2&gt;&amp;1</code></pre>
<p>Save and exit. Now make it executable:</p>
<pre><code>chmod +x /etc/sysconfig/modules/my.modules</code></pre>
<p><strong>10) Finished!</strong></p>
<p>Your kernel now supports FUSE. Now you can use any of the various userspace tools to mount the various filesystems supported by FUSE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/05/building-custom-kernel-rpm-fuse-ydl-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple Linux to Amazon S3 backup script</title>
		<link>http://www.cenolan.com/2008/05/simple-linux-to-amazon-s3-backup-script/</link>
		<comments>http://www.cenolan.com/2008/05/simple-linux-to-amazon-s3-backup-script/#comments</comments>
		<pubDate>Mon, 05 May 2008 13:05:53 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[backup]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=10</guid>
		<description><![CDATA[There are many tools available to help backup Linux systems to Amazon S3 but finding the right one to use can be difficult. Jeremy Zawodny made a good list of various S3 backup tools which is very helpful, if a little outdated. I experimented with a few tools, including some of the standard scripts published [...]]]></description>
			<content:encoded><![CDATA[<p>There are many tools available to help backup Linux systems to Amazon S3 but finding the right one to use can be difficult. Jeremy Zawodny made a <a title="S3 backup Tools" href="http://jeremy.zawodny.com/blog/archives/007641.html">good list of various S3 backup tools</a> which is very helpful, if a little outdated. I experimented with a few tools, including some of the standard scripts published by Amazon but I found each had their own shortcomings.</p>
<p>One tool that is very simple to use is <a href="http://s3tools.logix.cz/s3cmd">s3cmd</a> which is a linux command line tool to upload, retrieve, and manage data in Amazon S3. The tool is written in python so should install and run on pretty much any modern linux distro and I have found it works very nicely and seems to be an ideal tool to use if you want to write a basic backup script.</p>
<p><span id="more-10"></span></p>
<p>Once installed you just run "s3cmd --configure" to configure the script with your Amazon S3 access keys. You can then use s3cmd from the command line to manage your S3 buckets and their contents. Full details of the various options can be obtained through running "s3cmd --help".</p>
<p>I have used s3cmd to create automated daily rotated backups of a single directory (e.g. /home) using a simple bash script which I adapted from the <a href="http://sourceforge.net/projects/automysqlbackup/">automysqlbackup</a> script. The script I have used is shown below, and provides rotated backups of the previous 7 days, each day individually archived in a single tar.gz file. This is a fairly limited solution as it only provides a backup of a single directory, does not do incremental backups, and it will break if your tar.gz file exceeds the S3 individual file storage limit of ~6GB. However, if you just need a simple solution to maintain daily backups of a single folder then its a nice tidy option. It will also email you the results, and can optionally include jobs to run pre- and post- backup.</p>
<pre><code>#!/bin/bash
#
# Backup Script
#
#=====================================================================
#=====================================================================
# Set the following variables to your system needs
#=====================================================================

# Directory to save daily tar.gz backup files to e.g /backups
BACKUPDIR="/backups"

# Directory to backup
BACKUPSRCDIR="/home"

# Maximum size of backup files in MB (larger files will be split into separate archives)
# Note: not implemented yet
MAXTARSIZE="1000"

# S3 Settings
# The name of the S3 bucket to upload to e.g. "my_s3_bucket"
S3BUCKET="my_s3_bucket"

# Mail setup
# What would you like to be mailed to you?
# - log   : send only log file
# - files : send log file and tar.gz files as attachments
# - stdout : will simply output the log to the screen if run manually.
# - quiet : Only send logs if an error occurs to the MAILADDR.
MAILCONTENT="log"

# Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
MAXATTSIZE="4000"

# Email Address to send mail to? (user@domain.com)
MAILADDR="user@domain.com"

# Command to run before backups (uncomment to use)
#PREBACKUP="/etc/backup-pre"

# Command run after backups (uncomment to use)
#POSTBACKUP="/etc/backup-post"

#=====================================================================
#=====================================================================
#=====================================================================
#
# Should not need to be modified from here down!!
#
#=====================================================================
#=====================================================================
#=====================================================================
PATH=/usr/local/bin:/usr/bin:/bin:
DATE=`date +%Y-%m-%d_%Hh%Mm`                            # Datestamp e.g 2002-09-21
DOW=`date +%A`                                          # Day of the week e.g. Monday
DNOW=`date +%u`                                         # Day number of the week 1 to 7 where 1 represents Monday
DOM=`date +%d`                                          # Date of the Month e.g. 27
M=`date +%B`                                            # Month e.g January
W=`date +%V`                                            # Week Number e.g 37
VER=0.1                                                 # Version Number
HOST=`hostname`                                         # Hostname for LOG information
LOGFILE=$BACKUPDIR/$HOST-`date +%N`.log                 # Logfile Name
LOGERR=$BACKUPDIR/ERRORS_$HOST-`date +%N`.log           # Error log Name
BACKUPFILES=""

# Create required directories
if [ ! -e "$BACKUPDIR" ]                # Check Backup Directory exists.
then
mkdir -p "$BACKUPDIR"
fi

# IO redirection for logging.
touch $LOGFILE
exec 6&gt;&amp;1           # Link file descriptor #6 with stdout.
# Saves stdout.
exec &gt; $LOGFILE     # stdout replaced with file $LOGFILE.
touch $LOGERR
exec 7&gt;&amp;2           # Link file descriptor #7 with stderr.
# Saves stderr.
exec 2&gt; $LOGERR     # stderr replaced with file $LOGERR.

# Functions

# Backup function: removes last weeks archive from S3, creates new tar.gz and sends to S3
SUFFIX=""
dobackup () {
s3cmd ls s3://"$S3BUCKET" | grep s3 | sed "s/.*s3:\/\/$S3BUCKET\//s3:\/\/$S3BUCKET\//" | grep "$DOW" | xargs s3cmd del
tar cfz "$1" "$2"
echo
echo Backup Information for "$1"
gzip -l "$1"
echo
s3cmd put "$1" s3://"$S3BUCKET"
return 0
}

# Run command before we begin
if [ "$PREBACKUP" ]
then
echo ======================================================================
echo "Prebackup command output."
echo
eval $PREBACKUP
echo
echo ======================================================================
echo
fi

echo ======================================================================
echo BackupScript VER $VER
echo http://www.cenolan.com/
echo
echo Backup of Server - $HOST
echo ======================================================================

echo Backup Start Time: `date`
echo ======================================================================
# Daily Backup
echo Daily Backup of Directory \( $BACKUPSRCDIR \)
echo
echo Rotating last weeks Backup...
eval rm -fv "$BACKUPDIR/*.$DOW.tar.gz"
echo
dobackup "$BACKUPDIR/$DATE.$DOW.tar.gz" "$BACKUPSRCDIR"
BACKUPFILES="$BACKUPFILES $BACKUPDIR/$DATE.$DOW.tar.gz"
echo
echo ----------------------------------------------------------------------
echo Backup End Time: `date`
echo ======================================================================
echo Total disk space used for backup storage..
echo Size - Location
echo `du -hs "$BACKUPDIR"`
echo
echo ======================================================================
echo ======================================================================

# Run command when we're done
if [ "$POSTBACKUP" ]
then
echo ======================================================================
echo "Postbackup command output."
echo
eval $POSTBACKUP
echo
echo ======================================================================
fi

#Clean up IO redirection
exec 1&gt;&amp;6 6&gt;&amp;-      # Restore stdout and close file descriptor #6.
exec 1&gt;&amp;7 7&gt;&amp;-      # Restore stdout and close file descriptor #7.

if [ "$MAILCONTENT" = "files" ]
then
if [ -s "$LOGERR" ]
then
# Include error log if is larger than zero.
BACKUPFILES="$BACKUPFILES $LOGERR"
ERRORNOTE="WARNING: Error Reported - "
fi
#Get backup size
ATTSIZE=`du -c $BACKUPFILES | grep "[[:digit:][:space:]]total$" |sed s/\s*total//`
if [ $MAXATTSIZE -ge $ATTSIZE ]
then
BACKUPFILES=`echo "$BACKUPFILES" | sed -e "s# # -a #g"` #enable multiple attachments
mutt -s "$ERRORNOTE MySQL Backup Log and SQL Files for $HOST - $DATE" $BACKUPFILES $MAILADDR &lt; $LOGFILE       #send via mutt
else
cat "$LOGFILE" | mail -s "WARNING! - Backup exceeds set maximum attachment size on $HOST - $DATE" $MAILADDR
fi
elif [ "$MAILCONTENT" = "log" ]
then
cat "$LOGFILE" | mail -s "Backup Log for $HOST - $DATE" $MAILADDR
if [ -s "$LOGERR" ]
then
cat "$LOGERR" | mail -s "ERRORS REPORTED: MySQL Backup error Log for $HOST - $DATE" $MAILADDR
fi
elif [ "$MAILCONTENT" = "quiet" ]
then
if [ -s "$LOGERR" ]
then
cat "$LOGERR" | mail -s "ERRORS REPORTED: Backup error Log for $HOST - $DATE" $MAILADDR
cat "$LOGFILE" | mail -s "Backup Log for $HOST - $DATE" $MAILADDR
fi
else
if [ -s "$LOGERR" ]
then
cat "$LOGFILE"
echo
echo "###### WARNING ######"
echo "Errors reported during Backup execution.. Backup failed"
echo "Error log below.."
cat "$LOGERR"
else
cat "$LOGFILE"
fi
fi

if [ -s "$LOGERR" ]
then
STATUS=1
else
STATUS=0
fi

# Clean up Logfile
eval rm -f "$LOGFILE"
eval rm -f "$LOGERR"

exit $STATUS</pre>
<p></code><br />
I have posted this largely for my own information but maybe somebody else will find this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/05/simple-linux-to-amazon-s3-backup-script/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Converting a MySQL database to UTF-8</title>
		<link>http://www.cenolan.com/2008/04/converting-a-mysql-database-to-utf-8/</link>
		<comments>http://www.cenolan.com/2008/04/converting-a-mysql-database-to-utf-8/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 12:57:44 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=8</guid>
		<description><![CDATA[I occasionally need to convert a mysql database to UTF-8. This can be a painful process and if it goes wrong can result in a nightmare of character-set collisions. Some digging around on the lazyweb led me to a nice solution I found over at oscarm.org that shows you how to quickly convert the actual [...]]]></description>
			<content:encoded><![CDATA[<p>I occasionally need to convert a mysql database to UTF-8. This can be a painful process and if it goes wrong can result in a nightmare of character-set collisions. Some digging around on the lazyweb led me to a nice solution I found over at <a title="HOWTO: Convert mysql data to UTF-8 quickly" href="http://oscarm.org/news/detail/1894-howto_convert_mysql_data_to_utf8_quickly">oscarm.org</a> that shows you how to quickly convert the actual data, but I wanted to convert the database too.</p>
<p><span id="more-8"></span><br />
Here's what I did:</p>
<p>1) Dump the database into a sql file using mysqldump:</p>
<pre><code>mysqldump --opt --quote-names -u username -p password my_database &gt; my_database.sql</code></pre>
<p>2) Convert the dumped sql data from the current character set to utf-8, for example:</p>
<pre><code>iconv -f ISO_8859-1 -t UTF-8 my_database.sql &gt; my_database-utf-8.sql</code></pre>
<p>3) Change the CHARSET definitions in the sql file to utf8. You could do this by manually editing the file, but this little perl snippet will do it for you (here we're going from latin1 to utf8 - change to fit your needs):</p>
<pre><code>perl -pi -w -e 's/CHARSET=latin1/CHARSET=utf8/g;' my_database-utf-8.sql</code></pre>
<p>4) Import the database back into mysql:</p>
<pre><code>mysql -u username -p password my_database &lt; my_database-utf-8.sql</code></pre>
<p>Voila. Your database and data is now converted to utf-8.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/04/converting-a-mysql-database-to-utf-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora kernel fixes and files for MacBook 3,1 (Santa Rosa)</title>
		<link>http://www.cenolan.com/2008/04/fedora-kernel-fixes-and-files-for-macbook/</link>
		<comments>http://www.cenolan.com/2008/04/fedora-kernel-fixes-and-files-for-macbook/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 18:03:00 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora 8]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mactel-linux]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=7</guid>
		<description><![CDATA[Following on from my previous post, I have been making some RPM packages available for Fedora 8 and the MacBook 3,1 Santa Rosa.
The kernel packages are not needed now since Fedora 8 kernel 2.6.24.3-50 (and newer) already contains the MacBook specific fixes. However, at the time of writing the gstreamer packages are still required if [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my previous post, I have been making some RPM packages available for Fedora 8 and the MacBook 3,1 Santa Rosa.</p>
<p>The kernel packages are not needed now since Fedora 8 kernel 2.6.24.3-50 (and newer) already contains the MacBook specific fixes. However, at the time of writing the gstreamer packages are still required if you want to use gstreamer based applications with the MacBook iSight camera.</p>
<p>Before downloading, please take care of my bandwidth. If you don't need the package, please don't download it.</p>
<p>You can <a title="Fedora 8 kernel fixes and files for MacBook 3,1 (Santa Rosa)" href="http://www.cenolan.com/fedora8/">download the packages here</a>.</p>
<p>There is also <a title=" Guide: Fedora 8 on Macbook 3,1 Santa Rosa" href="http://forums.fedoraforum.org/forum/showthread.php?t=179233">this thread at fedoraforum.org</a> which may be helpful.</p>
<p>If you find any problems or have any suggestions please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/04/fedora-kernel-fixes-and-files-for-macbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Fedora 8 on a MacBook</title>
		<link>http://www.cenolan.com/2008/04/installing-fedora-8-on-a-macbook/</link>
		<comments>http://www.cenolan.com/2008/04/installing-fedora-8-on-a-macbook/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 16:16:18 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Fedora 8]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mactel-linux]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=4</guid>
		<description><![CDATA[The MacBook is great, but OS X is not really my cup of tea and I choose not to use Windows. Luckily Fedora 8 works like a charm on the MacBook and with a bit of configuring you can get all the hardware working properly.
I couldn't find any information on the lazyweb about installing Fedora [...]]]></description>
			<content:encoded><![CDATA[<p>The MacBook is great, but OS X is not really my cup of tea and I choose not to use Windows. Luckily Fedora 8 works like a charm on the MacBook and with a bit of configuring you can get all the hardware working properly.</p>
<p>I couldn't find any information on the lazyweb about installing Fedora 8 on a MacBook so I recorded what I did and made a detailed how-to which is posted in the wiki over at <a title="How to install Fedora 8 on Macbook 3,1" href="http://www.mactel-linux.org/wiki/Fedora8OnMacBookSantaRosa">mactel-linux.org</a>. The guide shows you step-by-step how to install and configure Fedora 8 x86_64 on the MacBook and works with both MacBook version 3,1 (from late 2007) or version 4,1 (from early 2008).</p>
<p>Big up to the guys at Fedora who gave in to my relentless nagging and integrated some of the mactel-linux patches into the latest Fedora kernels. Without them I'd still be spending my weekends rolling kernels!</p>
<p>If you find the guide useful or have any comments or suggestions then let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/04/installing-fedora-8-on-a-macbook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
