<?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>The HyRax Macrocosm &#187; Applications</title>
	<atom:link href="http://www.serenux.com/tag/applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serenux.com</link>
	<description>Life, the Universe and Ubuntu.</description>
	<lastBuildDate>Mon, 21 Jun 2010 10:45:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>HowTo: Use lxbdplayer &#8211; the Open Source Blu-Ray Disc player for Linux</title>
		<link>http://www.serenux.com/2010/06/howto-use-lxbdplayer-the-open-source-blu-ray-disc-player-for-linux/</link>
		<comments>http://www.serenux.com/2010/06/howto-use-lxbdplayer-the-open-source-blu-ray-disc-player-for-linux/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 10:45:51 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Blu-ray]]></category>
		<category><![CDATA[High-Definition]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[MPlayer]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=738</guid>
		<description><![CDATA[Yes, you read that right &#8211; there is finally an Open Source Blu-Ray Disc player GUI for Linux, albeit unofficial and certainly very grey in legality depending on which country you are in. lxbdplayer is the collaborative effort of four French Engineering students. What they have written is basically a frontend that combines the apps [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, you read that right &#8211; there is finally an Open Source Blu-Ray Disc player GUI for Linux, albeit unofficial and certainly very grey in legality depending on which country you are in.</p>
<p><em>lxbdplayer</em> is the collaborative effort of four French Engineering students. What they have written is basically a frontend that combines the apps <em>DumpHD</em> and <em>AACSKeys</em> which I have used in previous Blu-Ray articles into one easy to use GUI. Decrypted BD streams are then piped into <em>MPlayer</em> for playback.</p>
<p>The end result is that you can now watch your BD movies almost as simply as a regular video player without the need to go through the process of ripping them into an MKV file first, or chewing up loads of drive space.</p>
<p><span id="more-738"></span>Now before you get all excited, this is a work in progress and you are ultimately limited to the decryption keys that have been discovered so far. You have no better ability to watch BD titles than you have with doing it all manually with <em>DumpHD</em> and <em>AACSKeys</em>. In fact, <em>lxbdplayer</em> already falls over in one area (for now), and that is it has no ability to process BD+ protected discs. Attempting to watch such movies will show a partially or fully corrupted video stream.</p>
<p>I tried using <em>lxbdplayer</em> with several of my BD titles under Ubuntu 10.04, and found that it played all my older titles pretty much perfectly. It&#8217;s only newer titles, especially those featuring BD+ protection that are problematic.</p>
<p>In short, this tool will only let you play older BD titles easily, but no doubt as <em>DumpHD</em> and <em>AACSKeys</em> progress in development, we will see those improvements filter down to <em>lxbdplayer</em>. I should also point out that <em>lxbdplayer</em> does not actually play the <em>disc</em> as such &#8211; it pulls out the <em>titles</em> available on the disc and allows you to play them by choosing them from a menu. It will not actually allow you to play the menu interfaces provided on the disc.</p>
<p>Your BD optical drive will also need to have been hacked with custom firmware to ignore the Player certificate, or use an imported BD drive that already ignores the Player certificates, or <em>AACSKeys</em> will not be able to retrieve the decryption key to decrypt the disc with.</p>
<p>Anyway, to use <em>lxbdplayer</em>, you will need to download the following:</p>
<ul>
<li>The <a title="lxbdplayer for Ubuntu and Debian" href="http://sourceforge.net/projects/lxbdplayer/files/ubuntu_deb/lxbdplayer_0.2.1_all.deb"><em>lxbdplayer</em></a> itself. This package is a .deb for Ubuntu and Debian.</li>
<li>The <a title="AACSKeys Plugin for lxbdplayer" href="http://www.mediafire.com/?d1n3zyyhz2h"><em>AACSKeys</em> plugin</a> for <em>lxbdplayer</em>.</li>
<li>The <em><a title="The MakeMKV package" href="http://www.mediafire.com/?rnjoym0q1q4">MakeMKV</a></em> package (this is the 64-bit version. To get the 32-bit version, click <a title="32-bit version of MakeMKV" href="http://www.mediafire.com/?mdimv3yobwo">here</a>).</li>
<li>The <a title="The ShowKeys library package" href="http://www.mediafire.com/?yz2yj3it3il"><em>ShowKeys</em> library</a> (again, this is the 64-bit version. To get the 32-bit version, click <a title="32-bit version of ShowKeys" href="http://www.mediafire.com/?5ynetmrww21">here</a>).</li>
</ul>
<ol>
<li>Install the packages by either double-clicking on them and let the GDebi installer install them, or use a terminal as follows:
<pre><span style="color: #000080;">$ sudo dpkg -i lxbdplayer_0.2.1_all.deb lxbdaacs_0.2.1_all.deb makemkv_1.5.5b_amd64.deb libshowkeys_v1.5.5_amd64.deb</span></pre>
</li>
<li>A couple of dependencies will need to be downloaded, but otherwise the installation is small and quick.<br />
.</li>
<li>Once the install is complete, import the decryption keys needed by typing in the following command (you do not need to use sudo here):
<pre><span style="color: #000080;">$ bdkey-install</span></pre>
</li>
<li>Now you are ready to rock and/or roll.<br />
.</li>
<li>Insert your BD movie disc into your BD drive. Within seconds you should be prompted by Gnome about what to do with the disc, and you will notice that there is a new default action for BD discs to launch <em>lxbdplayer</em>. Go ahead and allow <em>lxbdplayer</em> to launch, or alternatively launch it manually from <em>Applications-&gt;Sound &amp; Video-&gt;lxBDPlayer</em>. If you manually launch, you need to tell the player where your BD title is mounted. Under Ubuntu Lucid, this will be under the <em>/media</em> directory.<br />
.</li>
<li>Once your BD disc is located, <em>lxbdplayer</em> will process the disc for a short while before presenting you with a chapter list. To play a title, simply choose it from the list and hit the Play button. Almost right away you will see the video appear on your screen.</li>
</ol>
<p>The player showing the video itself is simply <em>MPlayer</em>, and all its standard controls apply here.</p>
<p>Pat yourself on the back &#8211; and enjoy your movies. <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>More information about <em>lxbdplayer</em> including screenshots, can be found on the <a title="lxbdplayer Home Page" href="http://doc.ubuntu-fr.org/lxbdplayer?rev=1276774959">project&#8217;s home page</a>, but be warned, it&#8217;s all in French.</p>
<div class='wp_likes' id='wp_likes_post-738'><a class='like' href="javascript:wp_likes.like(738);" title='' ><img src="http://www.serenux.com/wp-content/plugins/wp-likes/images/like.gif" alt='' border='0'/>Like</a><span class='text'></span>
<div class='unlike'><a href="javascript:wp_likes.unlike(738);">Unlike</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/06/howto-use-lxbdplayer-the-open-source-blu-ray-disc-player-for-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Get an Ubuntu Live CD to boot off a PXE server</title>
		<link>http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/</link>
		<comments>http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/#comments</comments>
		<pubDate>Sun, 30 May 2010 15:09:22 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PXE]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=717</guid>
		<description><![CDATA[Following my article about creating your own PXE network boot server, here is the first practical use you can put it to &#8211; taking the Ubuntu Live CD and turning it into a network-bootable version! Network booting the Live CD has obvious advantages &#8211; aside from booting faster than CD (especially on a gigabit network), [...]]]></description>
			<content:encoded><![CDATA[<p>Following my article about <a title="How to setup your own PXE boot server" href="http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/" target="_blank">creating your own PXE network boot server</a>, here is the first practical use you can put it to &#8211; taking the Ubuntu Live CD and turning it into a network-bootable version!</p>
<p>Network booting the Live CD has obvious advantages &#8211; aside from booting faster than CD (especially on a gigabit network), it is indispensable as an emergency boot medium in a workplace environment, especially for broken Windows systems, and allows for Ubuntu effortless installations on netbook PC&#8217;s that don&#8217;t have optical drives and saves you having to have a USB stick handy.</p>
<p><span id="more-717"></span><em><strong>Pre-requisites</strong></em></p>
<ul>
<li>You need a working Linux PXE boot server. Doesn&#8217;t have to be Ubuntu, but it needs to be Linux. You cannot use a Windows PXE server.</li>
<li>An Ubuntu 10.04 Live CD ISO or physical CD. Can be the 32-bit or 64-bit ISO, but you can also setup both of them at once!</li>
<li>At least 700MB of drive space on your PXE server, more if you want to have more than one CD available.</li>
<li>This tutorial was put together using Ubuntu Server 10.04 Lucid Lynx, but should work with all future releases and older versions to at least Ubuntu Server 8.04 Hardy Heron.</li>
</ul>
<p><em><strong>Getting it together</strong></em></p>
<ol>
<li>Login to your PXE server and mount the CD or ISO image (in this example we are copying the 32-bit disc). Assuming the CD is mounted at /media/cdrom, copy the CD&#8217;s files to your server as follows:
<pre><span style="color: #000080;">$ sudo mkdir -p /srv/tftp/ubuntu-livecd-boot/i386
$ sudo mkdir -p /srv/ubuntu-livecd/i386
$ sudo cp -av /media/cdrom/* /srv/ubuntu-livecd/i386
$ sudo cp -av /media/cdrom/casper/initrd.lz /srv/tftp/ubuntu-livecd-boot/i386
$ sudo cp -av /media/cdrom/casper/vmlinuz /srv/tftp/ubuntu-livecd-boot/i386</span></pre>
<p>(if you want to setup the 64-bit disc, then replace all instances of &#8220;i386&#8243; with &#8220;amd64&#8243;, or you can setup both architectures by setting up both directories)<br />
.</li>
<li>Make sure the permissions of the files to be loaded by TFTP are correct:
<pre><span style="color: #000080;">$ sudo chmod 777 -R /srv</span></pre>
</li>
<li>The astute of you will have noticed that we have copied the Ubuntu CD outside of the TFTP directory and that we have made a separate copy of only two of the disc&#8217;s files inside the TFTP directory. Why is this? Well, the <em>vmlinuz</em> and <em>initrd.lz</em> files are the only files that TFTP will need to download to get started with the boot process. After that, we will use NFS to deliver the rest of the Live CD, so let&#8217;s set that up:
<pre><span style="color: #000080;">$ sudo apt-get install nfs-kernel-server</span>
</pre>
<p>Note: I should point out that the files that are copied to the NFS share do not have to be on the PXE server. The NFS server can be any box as NFS is not related to PXE at all.</p>
<p><span style="color: #000080;"> </span></li>
<li>Once that is installed, we need to define an NFS share. This is done in the NFS exports file, so let&#8217;s get that into a text editor:
<pre><span style="color: #000080;">$ sudo nano /etc/exports</span></pre>
</li>
<li>Add the following line to the bottom of the file:
<pre><span style="color: #000080;"># Ubuntu Live CD files for PXE booting
/srv/ubuntu-livecd/i386        *(ro,async,no_root_squash,no_subtree_check)</span></pre>
<p>&#8230;if you are setting up the 64-bit version, replace &#8220;i386&#8243; with &#8220;amd64&#8243;, or if setting up both architectures, list it as follows:</p>
<pre><span style="color: #000080;"># Ubuntu Live CD files for PXE booting
/srv/ubuntu-livecd/i386        *(ro,async,no_root_squash,no_subtree_check)
/srv/ubuntu-livecd/amd64       *(ro,async,no_root_squash,no_subtree_check)
</span></pre>
<p>A breakdown of the parameters on the right is as follows:</p>
<ul>
<li>The asterisk means &#8220;share with everyone on this network, regardless of who they are&#8221;.</li>
<li>The &#8220;ro&#8221; parameter means to share the data as read-only.</li>
<li>The &#8220;async&#8221; parameter allows the NFS server to reply before data is written to the share. Since it&#8217;s mounted as read-only anyway, the parameter is only there to keep NFS&#8217; syntax happy.</li>
<li>The &#8220;no_root_squash&#8221; parameter means to allow the NFS client to use the mount as a root filesystem, otherwise it&#8217;s mounted as &#8220;nobody&#8221; instead of &#8220;root&#8221;. Since the LiveCD is essentially a diskless client, we need to be able to define the NFS mount as a root volume.</li>
<li>The &#8220;no_subtree_check&#8221; parameter helps to speed up transfers. Normally NFS will check to see if a requested file exists in an exported sub-directory. This slows things down, so turning this off means the only check that is made is that the requested file exists on the exported filesystem. Subtree checking can also cause issues when an open file is renamed, but since the export is read-only, this is irrelevant.<br />
.</li>
</ul>
</li>
<li>Save your changes with CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Now have NFS re-read its export file and begin sharing the specified directories with:
<pre><span style="color: #000080;">$ sudo exportfs -a</span></pre>
</li>
<li>We&#8217;re nearly ready to rock and/or roll. All we need to do now is prepare the PXE boot menu to launch the Live CD for us. Assuming you followed by previous tutorial and your boot menu file is called <em>mybootmenu.cfg</em>:
<pre><span style="color: #000080;">$ sudo nano /srv/tftp/mybootmenu.cfg</span></pre>
</li>
<li>Assuming your NFS server&#8217;s IP address is 192.168.0.10, insert the following lines for a 32-bit Live CD entry:
<pre><span style="color: #000080;">label Live CD 32-bit
    kernel ubuntu-livecd/i386/vmlinuz
    append boot=casper netboot=nfs nfsroot=192.168.0.10:/srv/ubuntu-livecd/i386 initrd=ubuntu-livecd/i386/initrd.lz -- splash quiet</span></pre>
<p>&#8230;and if you are doing 64-bit, you can replace or add as a separate menu option the following:</p>
<pre><span style="color: #000080;">label Live CD 64-bit
</span><span style="color: #000080;">    kernel ubuntu-livecd/amd64/vmlinuz
    append boot=casper netboot=nfs  nfsroot=192.168.0.10:/srv/ubuntu-livecd/amd64  initrd=ubuntu-livecd/amd64/initrd.lz -- splash quiet
</span><span style="color: #000080;"> </span></pre>
<p>The <em>kernel</em> line is the actual kernel that is loaded to run the session. The <em>append</em> line tells the boot process several things. First up, the <em>casper</em> directory contains the boot files (a SquashFS image in the case of the Live CD), the root of the NFS file system is located on the server with the IP <em>192.168.0.10</em> under the path <em>/srv/ubuntu-livecd/i386</em> (or <em>amd64</em>) and that the image to fire up the RAM disk with is located under <em>ubuntu-livecd/i386/initrd.lz</em> and finally we have advised the boot process to suppress console messages and display the splash screen while loading. From this point on, the <em>initrd.lz</em> is extracted and will grab the SquashFS image from the <em>casper</em> directory via NFS, extract it and commence running it. All other files that the disc needs to do its thing (such as when installing Ubuntu from the Live environment) are also provided by the NFS share.</li>
<li>Save your changes by pressing CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>You&#8217;re now ready to go &#8211; reboot your PXE workstation and you should now see an entry for your Live CD. Upon choosing it, your system should fire up with the Live environment! Once booted, you can even do an Ubuntu install to the PC you started on as though you&#8217;d booted from a CD or USB device!<br />
.<br />
<a href="http://www.serenux.com/wp-content/uploads/2010/05/MultibootPXE.png"><img class="aligncenter size-medium wp-image-723" title="Showing two Live CD options in my PXE boot menu" src="http://www.serenux.com/wp-content/uploads/2010/05/MultibootPXE-300x224.png" alt="" width="300" height="224" /></a></li>
</ol>
<p>Enjoy! <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HowTo: Setup your own PXE Boot Server using Ubuntu Server</title>
		<link>http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/</link>
		<comments>http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/#comments</comments>
		<pubDate>Sun, 30 May 2010 12:09:01 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[PXE]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=527</guid>
		<description><![CDATA[The Preboot eXecution Environment (PXE) provides a means of starting up a PC using a network adapter instead of the traditional method of hard-drive, USB flash stick, CD or floppy disk. Why would you want to boot a PC from the network? Well, it opens the door to booting diskless workstations, eg: Internet Cafe PC&#8217;s, [...]]]></description>
			<content:encoded><![CDATA[<p>The Preboot eXecution Environment (PXE) provides a means of starting up a PC using a network adapter instead of the traditional method of hard-drive, USB flash stick, CD or floppy disk.</p>
<p>Why would you want to boot a PC from the network? Well, it opens the door to booting diskless workstations, eg: Internet Cafe PC&#8217;s, or if you regularly install tens or hundreds of PC&#8217;s, you can start the installer on all those machines at once without needing to have individual boot/install media for each machine. You can even use Linux PXE for starting Microsoft Windows network installers and tools.</p>
<p>This article is going to show you how to setup a standard Ubuntu 10.04 Lucid Lynx Server to respond to a PXE boot request and present a boot menu ONLY. I will put practical applications such as installing Ubuntu over the network or booting a Live CD over the network into separate future articles.</p>
<p><span id="more-527"></span><em><strong>Pre-requisites:</strong></em></p>
<ul>
<li>A PC or virtual machine with an installation of Ubuntu Server on it. This tutorial was written using an Ubuntu Lucid 10.04 Server, but these instructions will work equally well on nearly any version of Ubuntu Server. This tutorial will not detail the initial build of a server as it is relatively straight forward.</li>
<li>A DHCP server that allows you to specific PXE boot information. Most consumer routers will <span style="text-decoration: underline;">not</span> give you these options. Suitable DHCP servers are the DHCP daemon on Ubuntu Server, third-party Linux router solutions such as Smoothwall or pfSense, and Windows Server among others.</li>
<li>If your DHCP server is a dedicated network/firewall device that you do not wish to use as a file server to serve the network boot files, then you will need a separate PC to be a file server as well.</li>
<li>Some free disk space. PXE booting take bugger-all space, but whatever you plan to serve from it will need space. If you plan to setup the Ubuntu Live CD to be bootable from PXE, you will need 700MB+ of hard-drive space on that server. You will need more than this if you wish to host things like multiple LiveCD&#8217;s such as both the 32-bit and 64-bit versions, or multiple different distributions.</li>
<li>A PC workstation that has PXE boot capability. Any PC built in the last 10 years should definitely have this capability, though you may be required to enable it in BIOS. If you do not have a PC that can do this, you can use a virtual machine such as Virtualbox instead (you could have a virtual machine PXE boot off a virtual PXE boot server too! <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ).</li>
<li>A copy of Ubuntu Server 10.04 that suits your server&#8217;s architechture.</li>
<li>A copy of the Ubuntu ALTERNATE Install CD 10.04 that we need to get some PXE boot files from. Unfortunately the Live CD does NOT contain the files we need.</li>
</ul>
<p>At the end of this exercise we will have a PXE server that will boot into a selection menu that will give us choices of things to do. We&#8217;re also going to pretty up the menu with a background image instead of just having plain boring text, and we&#8217;ll do this using some of the existing elements on the Ubuntu CD as most of the work has been done for you already!</p>
<p><em><strong>Getting it together:</strong></em></p>
<ol>
<li>Login to your server.<br />
.</li>
<li>Let&#8217;s install the software we need:
<pre><span style="color: #000080;">$ sudo apt-get install tftpd-hpa inetutils-inetd</span></pre>
<p>&#8230;this will install a Trivial FTP server which is essentially a super-simple FTP server plus the inetd daemon which will listen out for TFTP requests and direct them to the TFTP daemon.Before you ask, no you cannot use a regular FTP daemon like <em>vsftpd</em> or similar. It has to be a TFTP daemon. Beware: Ubuntu has two TFTP options in the repository &#8211; you <em>must</em> use the HPA version of the daemon as shown, as it handles large boot images while the other daemon does not. If you don&#8217;t use it, you will see boot errors.</li>
<li>By default Ubuntu sets up the TFTP daemon&#8217;s root directory to be <em>/var/lib/tftpboot</em> which may not suit your requirements. For the purposes of this tutorial, we will be changing this to <em>/srv/tftp</em> instead. To do this, we need to edit the <em>/etc/inetd.conf</em> file in a text editor:
<pre><span style="color: #000080;">$ sudo nano /etc/inetd.conf</span></pre>
</li>
<li>Scroll down to the bottom of the file and modify the <em>tftp</em> line (or add it if it&#8217;s missing) and substitute <em>/var/lib/tftpboot</em> bit on the end of that line with the path to your preferred directory:
<pre><span style="color: #000080;">tftp    dgram   udp    wait    root    /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s <strong>/srv/tftp</strong></span></pre>
</li>
<li>Save your changes by pressing CTRL+X and then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Now we need to tell the Trivial FTP daemon where our TFTP root is. Open its config file with:
<pre><span style="color: #000080;">$ sudo nano /etc/default/tftpd-hpa</span></pre>
</li>
<li>Modify the <em>TFTP_DIRECTORY</em> line (usually the fourth line from the top) to be <em>/srv/tftp</em>:
<pre><span style="color: #000080;"># /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"</span><strong><span style="color: #000080;">
TFTP_DIRECTORY="/srv/tftp"</span></strong><span style="color: #000080;">
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"</span></pre>
</li>
<li>Save your changes by pressing CTRL+X and then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Now we just need to restart the inetd and tftp services with:
<pre><span style="color: #000080;">$ sudo service inetutils-inetd restart
$ sudo service tftpd-hpa restart</span></pre>
</li>
<li>So that&#8217;s the TFTP daemon ready to serve files to a PXE agent. Now we need to create the directory where we will be putting all our PXE goodness into:
<pre><span style="color: #000080;">$ sudo mkdir -p /srv/tftp</span></pre>
</li>
<li>We now need to copy some files off the Ubuntu Alternate Install CD that make up the PXE boot files and the menu config files. I will use the 32-bit disc in this example, though the files are the same on the 64-bit disc for this step. Insert the CD or mount the downloaded Ubuntu Alternate Install CD ISO. In this case I will assume you have a physical CD mounted at <em>/media/cdrom</em>.
<pre><span style="color: #000080;">$ sudo cp /media/cdrom/install/netboot/pxelinux.0 /srv/tftp
$ sudo mkdir -p /srv/tftp/ubuntu-installer/i386
$ cd /media/cdrom/install/netboot/ubuntu-installer/i386
$ sudo cp -R boot-screens /srv/tftp/ubuntu-installer/i386
$ sudo cp initrd.gz linux /srv/tftp/ubuntu-installer/i386
</span></pre>
<p>(if you&#8217;re using the 64-bit CD, substitute all instances of &#8220;i386&#8243; above with &#8220;amd64&#8243; instead.)<br />
.</p>
<p><span style="color: #000080;"> </span></li>
<li>Now we need to setup the initial PXE boot process:
<pre><span style="color: #000080;">$ sudo mkdir /srv/tftp/pxelinux.cfg
$ sudo nano /srv/tftp/pxelinux.cfg/default</span></pre>
</li>
<li>You will now be looking at a blank text editor. In this, type the following:
<pre><span style="color: #000080;">include mybootmenu.cfg
default boot-screens/vesamenu.c32
prompt 0
timeout 100</span>
</pre>
<p>The <em>timeout 100</em> line will provide a 10 second countdown before it automatically chooses the default PXE menu option when you boot into it. If you do not want a timeout, then change this to <em>timeout 0</em> instead.</li>
<li>Press CTRL+X and then &#8220;Y&#8221; and then Enter to save your changes.<br />
.</li>
<li>Now let&#8217;s setup our actual boot menu that we&#8217;ll be choosing options from:
<pre><span style="color: #000080;">$ sudo nano /srv/tftp/mybootmenu.cfg</span></pre>
</li>
<li>Again you&#8217;ll be looking at a blank text editor. Type (or copy &amp; paste) in the following. Indenting text is not important, but makes it more readable:
<pre><span style="color: #000080;">menu hshift 13
menu width 49
menu margin 8
menu title My Customised Network Boot Menu
include ubuntu-installer/i386/boot-screens/stdmenu.cfg
menu begin Cool options
    default myfirstoption
    label myfirstoption
        menu label This is a menu item
    label mysecondoption
        menu label This is another option
menu end</span></pre>
<p><span style="color: #000080;"> </span></li>
<li>Press CTRL+X, then press &#8220;Y&#8221; and then Enter to save your changes.<br />
.</li>
<li>Finally, we need to change the permissions of all files concerned because TFTP will not read any files unless they are set to full access:
<pre><span style="color: #000080;">$ sudo chmod 777 -R /srv
</span></pre>
</li>
<li>That&#8217;s PXE server side ready to go. Now we need to tell PXE clients where to find the PXE boot server. <em>If you are NOT using Ubuntu as your DHCP server, then skip to step 23</em>, otherwise do the following:<span style="color: #000080;"> </span><span style="color: #000080;"><br />
</span></p>
<pre><span style="color: #000080;">$ sudo nano /etc/dhcp3/dhcp.conf</span></pre>
</li>
<li>This opens up the DHCP config file into your text editor. Assuming your PXE server is at 192.168.0.10, scroll right to the very bottom of this file and add the following:
<pre><span style="color: #000080;">next-server 192.168.0.10</span><span style="color: #000080;">
filename "/srv/tftp/pxelinux.0";</span></pre>
<p>(note the semi-colon on the end)<br />
.</li>
<li>Press CTRL+X, then &#8220;Y&#8221; and then Enter to save your changes.<br />
.</li>
<li>Restart the DHCP daemon with:<span style="color: #000080;"> </span><span style="color: #000080;"><br />
</span></p>
<pre><span style="color: #000080;">$ sudo /etc/init.d/dhcpd restart</span></pre>
</li>
<li>If you&#8217;re using a non-Ubuntu DHCP server, then look for any &#8220;network boot&#8221; options and specify the PXE boot server&#8217;s IP address and path to the <em>pxelinux.0</em> file there. For example, in Smoothwall, you would go to Services-&gt;DHCP and then check the &#8220;Network boot enabled&#8221; checkbox, then specify &#8220;192.168.0.10&#8243; (to suit our tutorial) into the &#8220;Boot server&#8221; box and &#8220;/var/lib/tftpboot/pxelinux.0&#8243; in the &#8220;Boot filename&#8221; box and &#8220;/srv/tftp&#8221; in the &#8220;Root path&#8221; box.<a href="http://www.serenux.com/wp-content/uploads/2010/05/SmoothwallConfig.png"><img class="aligncenter size-medium wp-image-712" title="Smoothwall PXE Configuration" src="http://www.serenux.com/wp-content/uploads/2010/05/SmoothwallConfig-300x103.png" alt="An example of configuring Smoothwall to allow PXE booting" width="300" height="103" /></a><br />
.</li>
<li>We should now be ready to try out our PXE boot server! On your test workstation or VM, enable booting off the network (in the case of PXE booting a Virtualbox VM, you must ensure that the network adapter is set to &#8220;bridged mode&#8221; instead of &#8220;NAT&#8221;) and fire away. You should first see your PC launch its PXE agent, looking for a DHCP server to tell it where the PXE server is:<br />
<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEStartBooting.png"><img class="aligncenter size-medium wp-image-704" title="Looking for a PXE server" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEStartBooting-300x166.png" alt="" width="300" height="166" /><br />
</a></li>
<li>If your PXE server is working, within a few seconds you will see your boot menu!<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu1.png"><img class="aligncenter size-medium wp-image-702" title="My First PXE Menu!" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu1-300x225.png" alt="" width="300" height="225" /></a>&#8230;and if you hit Enter on &#8220;cool options&#8221; you will now see a sub-menu showing your two options that we created.<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu2.png"><img class="aligncenter size-medium wp-image-703" title="Our sub-menu of options" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu2-300x225.png" alt="" width="300" height="225" /></a></li>
<li>Well this is all well and good, but the menu currently doesn&#8217;t actually DO anything other than show us a bunch of options. How about we provide something, say the Memory Test application from the Ubuntu CD? Plus we&#8217;ll add an option to boot from the first HDD in your system. If your CD is still mounted on the server, then go back into the terminal you&#8217;ve been working in and copy over the MemTest app as follows:
<pre><span style="color: #000080;">$ sudo cp /media/cdrom/install/mt86plus /srv/tftp</span></pre>
</li>
<li>Now let&#8217;s add a menu entry for it:
<pre><span style="color: #000080;">$ sudo nano /srv/tftp/mybootmenu.cfg</span></pre>
</li>
<li>Modify the file so that it now looks like the following (add just the bolded lines):
<pre><span style="color: #000080;">menu hshift 13
menu width 49
menu margin 8
menu title My Customised Network Boot Menu
include ubuntu-installer/i386/boot-screens/stdmenu.cfg
<strong>label Boot from the first HDD
    localboot 0
label Memory Tester
    kernel mt86plus</strong>
menu begin Cool options
    default myfirstoption
    label myfirstoption
        menu label This is a menu item
    label mysecondoption
        menu label This is another option
menu end</span></pre>
</li>
<li>Save your changes and exit.<br />
.</li>
<li>Reboot your test PC via PXE and this time you will see your menu sport the new menu options at the top (you could have equally placed them at the bottom too):<br />
<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu3.png"><img class="aligncenter size-medium wp-image-705" title="Added boot and memtest menu options" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu3-300x225.png" alt="" width="300" height="225" /></a></li>
<li>Choosing &#8220;Memory Tester&#8221; from the menu will launch the MemTest app straight away, just like off the CD. But by now you are probably wondering &#8220;Aren&#8217;t be building off Ubuntu 10.04? Why does the menu have the old logo on it? Can we change it?&#8221; Sure, we can!<br />
.</li>
<li>The Ubuntu 10.04 installer CD HAS got the new Ubuntu logo, but for some reason it&#8217;s only saved as a PCX file which won&#8217;t work for the PXE boot menu. We can fix this by simply re-saving the PCX file as a PNG file. To start with, get a copy of the <em>splash.pcx</em> file from the <em>/isolinux</em> directory on the Ubuntu CD. This is the new Ubuntu logo that you normally see on the CD&#8217;s boot menu.<br />
.</li>
<li>Load this file into an image editor such as The GIMP and re-save it as a PNG file, eg: <em>splash.png</em> (of course there&#8217;s nothing stopping you from creating your own graphic either &#8211; just make sure it&#8217;s no greater than 640&#215;480 in size and indexed down to 16 colours).<br />
<em>.<br />
</em></li>
<li>Copy the re-saved image file into <em>/srv/tftp/ubuntu-installer/i386/boot-screens</em> and overwrite the original <em>splash.png</em> file.<br />
.</li>
<li>Ensure that the permissions of the file are set correctly again with:
<pre><span style="color: #000080;">$ sudo chmod 777 -R /srv</span></pre>
</li>
<li>And when you reboot your PXE workstation again, your menu will now look like:<br />
<a href="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu4.png"><img class="aligncenter size-medium wp-image-706" title="The PXE boot menu with an alternate background graphic" src="http://www.serenux.com/wp-content/uploads/2010/05/PXEMenu4-300x225.png" alt="" width="300" height="225" /></a></li>
</ol>
<p>And there you have it. A working PXE server with menu!</p>
<p>I will document further uses of the PXE boot facility in future articles, including <a title="How to setup a Live CD for a PXE environment" href="http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/" target="_blank">how to boot the Live CD environment without the CD or a USB key</a>, setup the ability to use your local Ubuntu mirror as an installation source for new installs, how to launch tools like Clonezilla and also how to setup a diskless boot system that uses PXE to do a normal Ubuntu desktop boot directly off the network without a local hard-drive.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HowTo: Swap the window gadgets back to the right side of the window in Ubuntu Lucid.</title>
		<link>http://www.serenux.com/2010/03/howto-swap-the-window-gadgets-back-to-the-right-side-of-the-window-in-ubuntu-lucid/</link>
		<comments>http://www.serenux.com/2010/03/howto-swap-the-window-gadgets-back-to-the-right-side-of-the-window-in-ubuntu-lucid/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 12:32:33 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=691</guid>
		<description><![CDATA[The release of Ubuntu&#8217;s brand new look in Ubuntu 10.04 Lucid Lynx Alpha 3 brought mixed reactions, but probably none more so than the decision to move the window minimise, maximise and close gadgets from their traditional placement on the upper-right corner of the window to the upper-left side ala Apple Mac. Many people, myself [...]]]></description>
			<content:encoded><![CDATA[<p>The release of Ubuntu&#8217;s brand new look in Ubuntu 10.04 Lucid Lynx Alpha 3 brought mixed reactions, but probably none more so than the decision to move the window minimise, maximise and close gadgets from their traditional placement on the upper-right corner of the window to the upper-left side ala Apple Mac.</p>
<p style="text-align: center;"><a href="http://www.serenux.com/wp-content/uploads/2010/03/UbuntuLucidWindowGadgets1.jpg"><img class="size-full wp-image-693 aligncenter" title="Ubuntu Lucid's default window gadget placement" src="http://www.serenux.com/wp-content/uploads/2010/03/UbuntuLucidWindowGadgets1.jpg" alt="" width="482" height="296" /></a></p>
<p>Many people, myself included, do not like this. To fix it and make it look like this:</p>
<p style="text-align: center;">
<p style="text-align: center;"><a href="http://www.serenux.com/wp-content/uploads/2010/03/UbuntuLucidWindowGadgets2.jpg"><img class="size-full wp-image-694 aligncenter" title="Improving the placement of window gadgets in Ubuntu Lucid" src="http://www.serenux.com/wp-content/uploads/2010/03/UbuntuLucidWindowGadgets2.jpg" alt="" width="486" height="299" /></a></p>
<p>&#8230;is very easy to do. Read on.</p>
<p><span id="more-691"></span>Simply open up a terminal and type in the following at the $ prompt:</p>
<pre><span style="color: #000080;">$ gconftool -s /apps/metacity/general/button_layout -t string ":maximize,minimize,close"</span></pre>
<p>Viola! Instant fix! But how does it work?</p>
<p>Gnome is highly customisable. One of its configuration options tells Metacity where and in what order to render elements on a window. In this case, the string &#8220;:maximize,minimize,close&#8221; means to render the &#8220;maximise&#8221;, &#8220;minimise&#8221; and &#8220;close&#8221; gadgets in that order, and the colon at the start means to render them on the right side of the window. If you change the colon to be on the far right, your window gadgets will appear on the left of the window.</p>
<p>Don&#8217;t like how the Ubuntu team have also changed the maximise and minimise button order around? Be a rebel! Change it back by replacing the configuration string above with &#8220;:minimize,maximize,close&#8221;.</p>
<p>Play around with it and enjoy. <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/03/howto-swap-the-window-gadgets-back-to-the-right-side-of-the-window-in-ubuntu-lucid/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>HowTo: Fix Virtualbox not allowing you to attach USB devices to your virtual machines.</title>
		<link>http://www.serenux.com/2010/01/howto-fix-virtualbox-not-allowing-you-to-attach-usb-devices-to-your-virtual-machines/</link>
		<comments>http://www.serenux.com/2010/01/howto-fix-virtualbox-not-allowing-you-to-attach-usb-devices-to-your-virtual-machines/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 12:29:30 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Virtualbox]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=677</guid>
		<description><![CDATA[Virtualbox is a great desktop virtualisation tool, but one of its annoying installation niggles is that when you setup and run a virtual machine you can&#8217;t attach any USB devices to it at all because all your USB options in Virtualbox are greyed out. There are a raft of different solutions to this problem out [...]]]></description>
			<content:encoded><![CDATA[<p>Virtualbox is a great desktop virtualisation tool, but one of its annoying installation niggles is that when you setup and run a virtual machine you can&#8217;t attach any USB devices to it at all because all your USB options in Virtualbox are greyed out.</p>
<p>There are a raft of different solutions to this problem out there ranging from adding an extra line to the <em>/etc/fstab</em> file to modifying your udev rules, but the real cause of this problem is simply that your login name does not have <em>permission</em> to access Virtualbox&#8217;s USB driver which interfaces itself between the VM&#8217;s virtual USB hardware and your real USB stack.</p>
<p><span id="more-677"></span></p>
<p>During the initial installation process, Virtualbox sets up a new group called <em>vboxusers</em>, but it doesn&#8217;t put your login name into it. Since using USB in Virtualbox occurs at the device level, your normal user permissions that allow you to run up virtual machines in general are not enough to manipulate Virtualbox&#8217;s USB driver. As a result, you cannot tell Virtualbox to attach a given USB device to your virtual machine.</p>
<p>Like most things, this is easily fixed of course.</p>
<ol>
<li>If your login name is <em>johndoe</em>, all you need to do is jump into a terminal and type in:
<pre><span style="color: #000080;">$ sudo adduser johndoe vboxusers</span></pre>
<p>&#8230;which will add the user <em>johndoe</em> to the <em>vboxusers</em> group.<br />
.</li>
<li>Now close all applications and windows, and log yourself out of Ubuntu. You don&#8217;t need to reboot, but you can if you&#8217;re the kind of person who enjoys the subtle pleasures of watching your PC start up.<br />
.</li>
<li>Log yourself back in again as normal. This will read in your new group membership.<br />
.</li>
<li>Fire up Virtualbox and start your virtual machine(s) as normal. You will now find that you can attach USB devices to all your VM&#8217;s via the Virtualbox <em>Devices</em> menu without any further ado.<br />
.</li>
<li>Pat yourself on the back &#8211; you&#8217;re done. <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p>Until Sun Microsystems modify the deb installer to add the current login to the <em>vboxusers</em> group during install, these instructions should apply to just about any version of Virtualbox sporting the problem, on any Linux distro.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/01/howto-fix-virtualbox-not-allowing-you-to-attach-usb-devices-to-your-virtual-machines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Fix being unable to click in Flash applications in Ubuntu 64-bit</title>
		<link>http://www.serenux.com/2010/01/howto-fix-being-unable-to-click-in-flash-applications-in-ubuntu-64-bit/</link>
		<comments>http://www.serenux.com/2010/01/howto-fix-being-unable-to-click-in-flash-applications-in-ubuntu-64-bit/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 11:26:32 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Karmic]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=675</guid>
		<description><![CDATA[Ubuntu 9.10 (Karmic Koala) has a curious bug on the 64-bit Intel/AMD version whereby on some systems you can play Flash perfectly, but the Flash application does not recognise any mouse clicks in it. This means in sites such as YouTube, you can&#8217;t click the mouse to play and pause, or seek in a video [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 9.10 (Karmic Koala) has a curious bug on the 64-bit Intel/AMD version whereby on some systems you can play Flash perfectly, but the Flash application does not recognise any mouse clicks in it. This means in sites such as YouTube, you can&#8217;t click the mouse to play and pause, or seek in a video &#8211; you&#8217;re forced to use the keyboard.</p>
<p>This is a known bug with the <em>flashplugin-installer</em> package and is currently being worked on by Canonical. In the meantime, if you wish to fix the problem yourself now rather than wait for the official fix, just follow these instructions&#8230;</p>
<p><span id="more-675"></span></p>
<ol>
<li>After you have installed Flash in the usual manner, open a terminal and type in the following:
<pre><span style="color: #000080;">$ sudo gedit /usr/lib/nspluginwrapper/i386/linux/npviewer</span></pre>
</li>
<li>Once the GEdit text editor (or substitute your favourite) opens, insert the following line <em>just before the last line</em> (should appear in most installations as the fourth line out of a total of five lines):
<pre><span style="color: #000080;">export GDK_NATIVE_WINDOWS=1</span></pre>
</li>
<li>Save your changes and exit your text editor.<br />
.</li>
<li>Now restart any applications that use Flash, such as Firefox.<br />
.</li>
<li>In the case of Firefox, go and visit a page that uses Flash. You should now find that you can now click in Flash without a problem.<br />
.</li>
<li>Pat yourself on the back. You&#8217;re done.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/01/howto-fix-being-unable-to-click-in-flash-applications-in-ubuntu-64-bit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HowTo: Migrate an Apt-Mirror-generated Ubuntu archive to another mirror source or merge a foreign Apt-Mirror archive into yours</title>
		<link>http://www.serenux.com/2009/12/howto-migrate-an-apt-mirror-generated-ubuntu-archive-to-another-mirror-source-or-merge-a-foreign-apt-mirror-archive-into-yours/</link>
		<comments>http://www.serenux.com/2009/12/howto-migrate-an-apt-mirror-generated-ubuntu-archive-to-another-mirror-source-or-merge-a-foreign-apt-mirror-archive-into-yours/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 11:39:11 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Apt]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=651</guid>
		<description><![CDATA[So, you&#8217;ve gone and created your very own local Ubuntu mirror using Apt-Mirror, and you&#8217;ve come across a situation similar to: You&#8217;ve decided to change where you update your Apt-Mirror archive from (eg: you&#8217;ve changed ISP&#8217;s or feel that another source is more reliable than your current one to update from) You&#8217;re adding another large [...]]]></description>
			<content:encoded><![CDATA[<p>So, you&#8217;ve gone and <a title="HowTo: Create your own local Ubuntu mirror" href="http://www.serenux.com/2008/10/howto-setup-your-own-local-ubuntu-repository-mirror/" target="_blank">created your very own local Ubuntu mirror using Apt-Mirror</a>, and you&#8217;ve come across a situation similar to:</p>
<ul>
<li>You&#8217;ve decided to change where you update your Apt-Mirror archive from (eg: you&#8217;ve changed ISP&#8217;s or feel that another source is more reliable than your current one to update from)</li>
<li>You&#8217;re adding another large repository to your Apt-Mirror archive (such as the next version of Ubuntu) and don&#8217;t have the quota to download it, so you&#8217;re getting a friend to download it for you from their free server using Apt-Mirror (eg: iiNet and Internode customers can access their respective Ubuntu mirrors for free), so you need to be able to merge it with your own Apt-Mirror archive and have it update from your preferred source afterwards.</li>
</ul>
<p>So how do you do this? Read on.</p>
<p><span id="more-651"></span><span style="color: #0000ff;"><em><strong>Migrating your Apt-Mirror archive to update from a new source<br />
</strong></em></span></p>
<p>This one is really easy. Let&#8217;s say you are updating your Ubuntu mirror from Internode, but now want to get your updates from iiNet. To make this happen you need to change the following files:</p>
<ul>
<li>Your <em>/etc/apt/mirror.list</em> file needs to be updated to point to the new source, and</li>
<li>the Apt-Mirror&#8217;s record of downloaded files needs to be updated so that it doesn&#8217;t waste time trying to re-download the entire mirror again not realising that it&#8217;s already got 99% of all the files already, because Apt-Mirror tracks the files it has downloaded by the source URL and filename, not just the filenames themselves.</li>
</ul>
<p>So let&#8217;s go through this.</p>
<ol>
<li>Open a terminal load your <em>/etc/apt/mirror.list</em> file into your favourite text editor. In this case I will use the Nano text editor:
<pre><span style="color: #000080;">$ sudo nano /etc/apt/mirror.list</span></pre>
</li>
<li>In your <em>mirror.list</em> file, The lines for updating Ubuntu 32 and 64-bit versions plus source code from Internode can look similar to this:
<pre><span style="color: #000080;"># Ubuntu 9.10 Karmic Koala 32-bit
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic main restricted universe multiverse
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-updates main restricted universe multiverse
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-backports main restricted universe multiverse
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-security main restricted universe multiverse
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-proposed main restricted universe multiverse

</span><span style="color: #000080;"># Ubuntu 9.10 Karmic Koala 64-bit
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic main restricted universe multiverse
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-updates main restricted universe multiverse
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-backports main restricted universe multiverse
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-security main restricted universe multiverse
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-proposed main restricted universe multiverse

# Ubuntu 9.10 Karmic Koala Source
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic main restricted universe multiverse
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-updates main restricted universe multiverse
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-backports main restricted universe multiverse
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-security main restricted universe multiverse
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-proposed main restricted universe multiverse</span></pre>
</li>
<li>We need to change the Internode URL to the iiNet URL, so bring up Nano&#8217;s search and replace function by pressing CTRL+Backslash (&#8220;\&#8221;).<br />
.</li>
<li>Now type in the text to replace, in this case:
<pre><span style="color: #000080;">http://mirror.internode.on.net/pub/ubuntu/ubuntu</span></pre>
</li>
<li>Press Enter and you&#8217;ll be prompted for the text to replace this with. In this case it&#8217;s:
<pre><span style="color: #000080;">http://ftp.iinet.net.au/pub/ubuntu/</span></pre>
</li>
<li>Press Enter and Nano will find the first occurrence of the Internode text string and highlight it for you. If the selection is correct, press &#8220;A&#8221; on the keyboard to automatically replace &#8220;all&#8221; occurrences.<br />
.</li>
<li>Once the update is done, manually go back and visually verify that all the entries were changed correctly.<br />
.</li>
<li>When you&#8217;re happy, save your changes by pressing CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Now we need to update the Apt-Mirror record of downloaded files. First, let&#8217;s take a backup of the index in case you stuff up. Type in:
<pre><span style="color: #000080;">$ sudo cp /var/spool/apt-mirror/var/ALL /var/spool/apt-mirror/var/ALL_Backup</span></pre>
<p><em>NOTE: the filename &#8220;ALL&#8221; must be in uppercase</em><br />
.</li>
<li>Now let&#8217;s bring up the original file into the Nano text editor.
<pre><span style="color: #000080;">$ sudo nano /var/spool/apt-mirror/var/ALL</span></pre>
</li>
<li>Depending how large your index file is, there may be a brief delay while Nano opens it up. Once it appears, do the same search and replace as you did in steps 3-6 again. <em>Note: If the editor comes up blank, then you have not opened up the index file &#8211; check your path spelling in Step 9 and try again.</em><br />
.</li>
<li>Save your changes by pressing CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Finally, we need to modify the Apt-Mirror&#8217;s cache of downloaded files so that its directory structure matches that of the new source. In the case of iiNet, you&#8217;ll notice it&#8217;s URL has one less <em>ubuntu</em> word in it compared to Internode&#8217;s URL, so we&#8217;ll need to move some directories to eliminate the extra <em>ubuntu</em> directory. At the terminal, move the <em>dists</em> and <em>pool</em> directories of the mirrored files one directory back using the commands:
<pre><span style="color: #000080;">$ sudo mv /var/spool/apt-mirror/mirror/mirror.internode.on.net/pub/ubuntu/ubuntu/dists /var/spool/apt-mirror/mirror/mirror.internode.on.net/pub/ubuntu
$ sudo mv /var/spool/apt-mirror/mirror/mirror.internode.on.net/pub/ubuntu/ubuntu/pool /var/spool/apt-mirror/mirror/mirror.internode.on.net/pub/ubuntu</span></pre>
</li>
<li>Now rename the <em>mirror.internode.on.net</em> directory to become the name of the iiNet server:
<pre><span style="color: #000080;">$ sudo mv /var/spool/apt-mirror/mirror/mirror.internode.on.net /var/spool/apt-mirror/mirror/ftp.iinet.net.au</span></pre>
</li>
<li>The directory structure now matches iiNet&#8217;s server and your <em>ALL</em> file is up to date, so now we can test your changes by launching Apt-Mirror. Launch it manually with:
<pre><span style="color: #000080;">$ apt-mirror</span></pre>
</li>
<li>Watch the output. First Apt-Mirror will download all the repository indexes from the new location and will compare the files presented in those indexes to your local index of downloaded files (the modified <em>ALL</em> file). It will skip all files already listed as being present and will only download new files not listed in your local mirror. You should find Apt-Mirror advises only a small subset of data to download, perhaps only a few megabytes or no more than a gigabyte or two since your last update under the old setup. If you see that Apt-Mirror wants to download some 30GB or more, then you have made an error in changing the URL in the ALL index file or you incorrectly renamed the mirror directories. Press CTRL+C to stop Apt-Mirror, and go check your configuration from Step 10.
<pre><span style="color: #000080;">$ apt-mirror
Downloading 1080 index files using 5 threads...
Begin time: Wed Dec  9 15:59:23 2009
[5]... [4]... [3]... [2]... [1]... [0]...
End time: Wed Dec  9 16:00:45 2009

Proceed indexes: [SSSSSSSSSSPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP]

1.7 GiB will be downloaded into archive.
Downloading 998 archive files using 5 threads...
Begin time: Wed Dec  9 16:02:31 2009
[5]... [4]... [3]... [2]... [1]... [0]...
End time: Wed Dec  9 16:54:15 2009

207.4 MiB in 256 files and 1 directories can be freed.
Run /var/spool/apt-mirror/var/clean.sh for this purpose.
$</span></pre>
</li>
<li>You&#8217;re done! Pat yourself on the back. <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
<p><span style="color: #0000ff;"><em><strong>Inserting a foreign Apt-Mirror archive into your own archive<br />
</strong></em></span></p>
<p>This one is slightly more involved, but is not difficult. In the case of a full Ubuntu Mirror, let&#8217;s say you were adding an Ubuntu Karmic mirror archive taken from iiNet&#8217;s mirror servers into your own local Apt-Mirror archive that featured only Intrepid and Jaunty, both of which you are updating from Internode&#8217;s mirror servers. There are some obstacles we need to overcome such as:</p>
<ul>
<li>Continuing to perform future updates for the Karmic repository from Internode rather than iiNet.</li>
<li>The foreign iiNet Karmic archive contains lots of files that you already have in your own archive &#8211; files that are common between all releases of Ubuntu. How do you filter those ones out and only copy the new files?</li>
<li>Finally, how do you update the Apt-Mirror index file with the potentially thousands of new entries from the foreign archive? How do you avoid duplicate lines potentially confusing Apt-Mirror?</li>
</ul>
<p>Follow these steps:</p>
<ol>
<li>First ensure that you have the full copy of the foreign Apt-Mirror archive supplied on a suitable storage medium. Aside from the mirror directory itself (usually under <em>/var/spool/apt-mirror/mirror</em>), you must have a copy of its <em>/var/spool/apt-mirror/var/ALL</em> file. It does not matter if the foreign mirror is not completely up to date, as Apt-Mirror will catch up with what is missing when you run the next update.<br />
.</li>
<li>Let&#8217;s prepare your local Apt-Mirror installation for grabbing Ubuntu Karmic from our preferred source first. We need to load up the <em>/etc/apt/mirror.list</em> file into your favourite text editor and add the entries relevant to our new repository that we are mirroring. I will use the Nano text editor for this, but you can use any text editor you like:
<pre><span style="color: #000080;">$ sudo nano /etc/apt/mirror.list</span></pre>
</li>
<li>Now we add the entries relevant to Ubuntu Karmic for Apt-Mirror to use. In this case, I am going to update Ubuntu Karmic from Internode and I will be grabbing both the 32-bit and 64-bit versions plus the source code (reflecting what is already included in the foreign archive on my storage medium, or Apt-Mirror will be doing a LOT of downloading the next time you run it), so I need to add the following entries:
<pre><span style="color: #000080;"># Ubuntu 9.10 Karmic Koala 32-bit
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic main restricted universe multiverse
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-updates main restricted universe multiverse
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-backports main restricted universe multiverse
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-security main restricted universe multiverse
deb-i386 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-proposed main restricted universe multiverse

# Ubuntu 9.10 Karmic Koala 64-bit
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic main restricted universe multiverse
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-updates main restricted universe multiverse
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-backports main restricted universe multiverse
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-security main restricted universe multiverse
deb-amd64 http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-proposed main restricted universe multiverse

# Ubuntu 9.10 Karmic Koala Source
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic main restricted universe multiverse
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-updates main restricted universe multiverse
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-backports main restricted universe multiverse
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-security main restricted universe multiverse
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu karmic-proposed main restricted universe multiverse</span></pre>
</li>
<li>Save your changes and exit the editor using CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Make a backup copy of the foreign mirror&#8217;s <em>/var/spool/apt-mirror/var/ALL</em> file, so you can revert to it if you make a mistake. Call the copy something like <em>ALL_Backup</em>.<br />
.</li>
<li>Now open the foreign mirror&#8217;s original <em>/var/spool/apt-mirror/var/ALL</em> file into your favourite text editor.<br />
.</li>
<li>Use your text editor&#8217;s search and replace function (in Nano, press CTRL + Backslash &#8220;\&#8221;) to replace the URL of each entry in the foreign mirror&#8217;s <em>ALL</em> file to the URL of the mirror you will be performing your future updates from. In the case of changing iiNet URLs to Internode URLs, you would replace any occurrence of the text string:
<pre><span style="color: #000080;">http://ftp.iinet.net.au/pub/ubuntu</span></pre>
<p>&#8230;with&#8230;</p>
<pre><span style="color: #000080;">http://mirror.internode.on.net/pub/ubuntu/ubuntu</span></pre>
</li>
<li>Once updated, save your changes and close your text editor.<br />
.</li>
<li>Now we need to merge the modified foreign <em>ALL</em> file into the <em>ALL</em> file from your local Apt-Mirror setup. First up, rename the modified foreign <em>ALL</em> file so we don&#8217;t confuse it. For this tutorial, I will assume your foreign mirror is supplied on an external USB hard-drive called &#8220;myhdd&#8221; and is simply a copy of the foreign system&#8217;s <em>/var</em> directory in its entirety. The following will rename the file from <em>ALL</em> to <em>ALL_modified</em> in a terminal:
<pre><span style="color: #000080;">$ mv /media/myhdd/var/spool/apt-mirror/var/ALL /media/myhdd/var/spool/apt-mirror/var/ALL_modified
</span></pre>
</li>
<li>Now concatenate the original <em>ALL</em> file and the modified foreign mirror&#8217;s <em>ALL_modified</em> file into one new file called <em>ALL_new</em> in your local Apt-Mirror&#8217;s <em>var</em> directory. Concatenating alone <span style="text-decoration: underline;">will</span> result in duplicate lines and we need to sort the file so that any duplicate lines in both the local and foreign <em>ALL</em> files are brought together. We can sort the content of the concatenated files and remove duplicate lines in one hit with:
<pre><span style="color: #000080;">$ sudo cat /var/spool/apt-mirror/var/ALL /media/myhdd/var/spool/apt-mirror/var/ALL_modified | sort | uniq &gt; /var/spool/apt-mirror/var/ALL_new
</span></pre>
<p>The <em>cat</em> part of the command simply joins the content of <em>/var/spool/apt-mirror/var/ALL</em> and <em>/media/myhdd/var/spool/apt-mirror/var/ALL_modified</em> into one big file, but before it&#8217;s written to a physical file, the concatenated data is &#8220;piped&#8221; using the pipe symbol &#8220;|&#8221; into the <em>sort</em> command, which sorts the concatenated data into alphabetical order which will group duplicate lines together. But before that resultant output is written anywhere, the sorted data is then piped again into the <em>uniq</em> command which automagically removes all duplicate lines, leaving one unique copy of each line. Finally, we direct the output from <em>uniq</em> using the &#8220;&gt;&#8221; character into our physical destination file at <em>/var/spool/apt-mirror/var/ALL_new</em> at the end. The <em>sudo</em> command at the start is used simply because only the <em>root</em> and the <em>apt-mirror</em> users can actually write to the <em>/var/spool/apt-mirror/var</em> directory.</p>
<p>Alternatively, we can replace the &#8220;<em>| sort | uniq</em>&#8221; part with &#8220;<em>| sort -u</em>&#8221; which does the exact same thing, since the sort command does have it&#8217;s own &#8220;unique&#8221; functionality as well. I&#8217;ll leave it up to you which way you&#8217;d like to go.</li>
<li>Check your new <em>/var/spool/apt-mirror/var/ALL_new</em> file and you will find it now contains all your local and foreign mirror&#8217;s entries in alphabetical order and with no duplicate lines. If you&#8217;d like to see how this worked, re-work Step 10 without the <em>sort</em> and <em>uniq</em> commands or the pipe characters and see how it affects the output file. Try adding just the <em>sort</em> or just the <em>uniq</em> command too.<br />
.</li>
<li>Now rename your local mirror&#8217;s original <em>ALL</em> file because we&#8217;re about to replace it with the new one:
<pre><span style="color: #000080;">$ sudo mv /var/spool/apt-mirror/var/ALL /var/spool/apt-mirror/var/ALL_old</span></pre>
</li>
<li>Now rename the new <em>ALL</em>_new file to take the place of the old one:
<pre><span style="color: #000080;">$ sudo mv /var/spool/apt-mirror/var/ALL_new /var/spool/apt-mirror/var/ALL</span></pre>
</li>
<li>Right, that&#8217;s the index taken care of. We&#8217;re nearly done! Now we only have to merge the foreign mirror&#8217;s actual files into your local mirror. Once again, for the purposes of this tutorial I&#8217;m going to assume you have them stored on an external USB hard-drive called &#8220;myhdd&#8221; and is a copy of the foreign system&#8217;s entire <em>/var</em> directory, so the path to the foreign mirror&#8217;s files will be <em>/media/myhdd/var/spool/apt-mirror/mirror</em> &#8211; got that? Let&#8217;s change to that directory now in a terminal to save us having to type so much:
<pre><span style="color: #000080;">$ cd /media/myhdd/var/spool/apt-mirror/mirror</span></pre>
</li>
<li>Now, the observant of you may have noticed that Apt-Mirror stores its mirrored files using a directory structure that follows the path of the URL the data is obtained from, so in the case of a mirror from iiNet, there is a directory here called <em>ftp.iinet.net.au</em>. You can see it by using the <em>ls</em> command to list the directory contents:
<pre><span style="color: #000080;">$ ls -l
-rw-r--r--  1 apt-mirror apt-mirror   198599 2009-12-09 10:19 access.log
-rw-r--r--  1 apt-mirror apt-mirror   544373 2009-12-01 06:45 access.log.1
-rw-r--r--  1 apt-mirror apt-mirror  1863467 2009-11-03 06:44 access.log.2
-rw-r--r--  1 apt-mirror apt-mirror  1865334 2009-10-01 06:28 access.log.3
-rw-r--r--  1 apt-mirror apt-mirror 18152891 2009-09-01 06:42 access.log.4
-rw-r--r--  1 apt-mirror apt-mirror     6135 2009-12-09 06:46 error.log
-rw-r--r--  1 apt-mirror apt-mirror    33898 2009-12-01 06:45 error.log.1
-rw-r--r--  1 apt-mirror apt-mirror   124512 2009-11-03 06:44 error.log.2
-rw-r--r--  1 apt-mirror apt-mirror   554851 2009-10-01 06:28 error.log.3
-rw-r--r--  1 apt-mirror apt-mirror   831227 2009-09-01 06:42 error.log.4<strong>
drwxr-xr-x  3 apt-mirror apt-mirror     4096 2008-09-11 02:00 ftp.iinet.net.au</strong>
$</span></pre>
</li>
<li>We need to modify the foreign directory names and structure to exactly match that of the URL path your local mirror updates from. Starting with the obvious, we need to rename the <em>ftp.iinet.net.au</em> directory to be <em>mirror.internode.on.net</em> with:
<pre><span style="color: #000080;">$ sudo mv ftp.iinet.net.au mirror.internode.on.net</span></pre>
</li>
<li>Next we need to create an extra subdirectory called &#8220;ubuntu&#8221; because Internode&#8217;s URL path is <em>mirror.internode.on.net/pub/ubuntu/<strong>ubuntu/</strong></em> and iiNet&#8217;s path is <em>ftp.iinet.net.au/pub/ubuntu/</em> only:
<pre><span style="color: #000080;">$ sudo mkdir mirror.internode.on.net/pub/ubuntu/ubuntu</span></pre>
</li>
<li>Now we need to move the &#8220;dists&#8221; and &#8220;pool&#8221; directories under the first &#8220;ubuntu&#8221; directory to be under the second &#8220;ubuntu&#8221; directory:
<pre><span style="color: #000080;">$ sudo mv mirror.internode.on.net/pub/ubuntu/dists mirror.internode.on.net/pub/ubuntu/ubuntu
$ sudo mv mirror.internode.on.net/pub/ubuntu/pool mirror.internode.on.net/pub/ubuntu/ubuntu</span></pre>
</li>
<li>With the directory structure and directory names all amended, we are now ready to merge the foreign mirror&#8217;s files into your local mirror. We will do this using RSync. This tool traditionally is used to make backups and is indeed used to keep the official worldwide Ubuntu mirrors up to date 1:1 with the master archive, but in our case we are using it to add the &#8220;missing&#8221; files in the local mirror with the files from the foreign mirror whilst skipping the files that are already present, which means instead of copying around about 60GB worth of data from the foreign mirror, we&#8217;ll only copy a percentage of that instead, saving us time and drive space:
<pre><span style="color: #000080;">$ sudo rsync -avz --progress /media/myhdd/var/spool/apt-mirror/mirror/mirror.internode.on.net /var/spool/apt-mirror/mirror/</span></pre>
</li>
<li>The &#8220;&#8211;progress&#8221; parameter allows you to see which file is being copied over. You may see a large number of directory names whizz past because those directories don&#8217;t have any files that are different between your current Ubuntu Intrepid and Jaunty mirror and the Karmic mirror you are merging. Unfortunately rsync does not provide an all-over progress. It only provides a progress of the file it is currently working on. This procress can take several hours to complete depending on how much data needs to be copied and the speed of your storage medium containing the foreign mirror (which if on a USB HDD can take a looooong time).<br />
.</li>
<li>Once RSync has finished, it will give a summary of what was copied. If you were to run the rsync command in Step 16 again, you will see it finish rather quickly because there is no data that has changed or is missing anymore.<br />
.</li>
<li>Now we just quickly ensure that all the merged foreign files belong to the Apt-Mirror user with:
<pre><span style="color: #000080;">$ sudo chown apt-mirror:apt-mirror -R /var/spool/apt-mirror</span></pre>
</li>
<li>And now we are ready to try a manual update to see if it all worked. If you now execute the Apt-Mirror application manually, you should now see that it reads in the new repository entries you added into your /etc/apt/mirror.list file in Step 3 and will compare the files presented in those indexes to your local index of downloaded files (the newly modified <em>ALL</em> file). It will skip all files already present and will only download new files not present in your local mirror. You should find Apt-Mirror advises only a small subset of data to download, perhaps only a few megabytes or a gigabyte or two since your last update under the old setup and depending on how old the foreign archive was. If you see that Apt-Mirror wants to download about 30GB or more, then you have made an error in changing the URL in the <em>ALL</em> index file or the renaming of mirror directories. Press CTRL+C to stop Apt-Mirror, and go check your configuration from Step 5.
<pre><span style="color: #000080;">$ apt-mirror
Downloading 1080 index files using 5 threads...
Begin time: Wed Dec  9 15:59:23 2009
[5]... [4]... [3]... [2]... [1]... [0]...
End time: Wed Dec  9 16:00:45 2009

Proceed indexes: [SSSSSSSSSSPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP]

1.7 GiB will be downloaded into archive.
Downloading 998 archive files using 5 threads...
Begin time: Wed Dec  9 16:02:31 2009
[5]... [4]... [3]... [2]... [1]... [0]...
End time: Wed Dec  9 16:54:15 2009

207.4 MiB in 256 files and 1 directories can be freed.
Run /var/spool/apt-mirror/var/clean.sh for this purpose.
$</span></pre>
</li>
<li>If all is good, then pat yourself on the back. You&#8217;ve successfully merged the foreign repository and it will now update from your preferred ISP&#8217;s mirror from now on. <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2009/12/howto-migrate-an-apt-mirror-generated-ubuntu-archive-to-another-mirror-source-or-merge-a-foreign-apt-mirror-archive-into-yours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Deal with BD+ copy protection when ripping Blu-ray titles using Ubuntu</title>
		<link>http://www.serenux.com/2009/09/howto-deal-with-bd-copy-protection-when-ripping-blu-ray-titles-using-ubuntu/</link>
		<comments>http://www.serenux.com/2009/09/howto-deal-with-bd-copy-protection-when-ripping-blu-ray-titles-using-ubuntu/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 23:18:25 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Blu-ray]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[High-Definition]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Jaunty]]></category>
		<category><![CDATA[LG]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=568</guid>
		<description><![CDATA[A fair while back now, I wrote an article detailing how to decode Blu-ray titles using Ubuntu and an LG GGC-H20L Blu-ray optical drive. This article detailed how to decrypt just about every movie under the sun except for a newer type of protection called &#8220;BD+&#8221; which I never got around to supplementing my original [...]]]></description>
			<content:encoded><![CDATA[<p>A fair while back now, I wrote an article detailing <a title="HowTo: Rip a Blu-ray movie using an LG GGC-H20L Blu-ray drive with Ubuntu" href="http://www.serenux.com/2009/01/howto-rip-a-blu-ray-movie-using-an-lg-ggc-h20l-blu-ray-drive-with-ubuntu/" target="_blank">how to decode Blu-ray titles using Ubuntu and an LG GGC-H20L Blu-ray optical drive</a>.</p>
<p>This article detailed how to decrypt just about every movie under the sun except for a newer type of protection called &#8220;BD+&#8221; which I never got around to supplementing my original article with.</p>
<p>What is &#8220;BD+&#8221; protection? Well in short, it&#8217;s the deliberate corruption of random parts of the video track of the movie (well, OK &#8211; that is a highly simplified definition as BD+ protection can do a lot more than that, but the end result is the same &#8211; to prevent unauthorised playback which includes ripping). The idea BD+ is that when you rip the title, you can still watch the movie, but with some or all of the screen corrupt at various stages in the movie which well and truely ruins the movie-watching experience, especially since you paid good money for it and should not be forced to buy a dedicated consumer Blu-ray player when you&#8217;ve got a perfectly good PC that can do the same task.</p>
<p>But hang on, if the movie is deliberately corrupt, then how come it plays fine in a stand-alone consumer Blu-ray player or PlayStation3 console?</p>
<p>Well, let me tell you about that and how to get around it yourself.</p>
<p><span id="more-568"></span>I have to give credit to the movie studios for this one. It&#8217;s a simple, and annoying, method of protection. But as with anything, it was eventually reverse-engineered and broken, and neat little tools were developed to allow us consumer types to backup, or watch in our preferred way, our movies bought with our hard-earned cash.</p>
<p>So what&#8217;s this BD+ thing all about? Basically after the movie is mastered and just before being pressed to discs, an extra step is taken where by random parts of the movie data stream are deliberately exchanged with random data or removed altogether, thus corrupting the video stream. A record is kept, however, of what parts of the movie have been changed &#8211; a table listing where, when and what data needs to be put back into the movie stream in order to watch the movie back in its original uncorrupted format. This table is called a &#8220;conversion table&#8221;, and it is processed by your Blu-ray player while you watch the movie, with the correct data substituted back into the video stream before the image hits your screen, thus resulting in a proper uncorrupted picture.</p>
<p style="text-align: center;">
<div id="attachment_575" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/BDCorruptStream.jpg"><img class="size-medium wp-image-575" title="BD Corrupt Stream" src="http://www.serenux.com/wp-content/uploads/2009/09/BDCorruptStream-300x168.jpg" alt="An example of a corrupted video stream. Click for full size." width="300" height="168" /></a><p class="wp-caption-text">An example of a corrupted video stream showing the BD+ Protection in full effect. Click for full size.</p></div>
<div id="attachment_576" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/BDNotCorruptStream.jpg"><img class="size-medium wp-image-576" title="BD Not Corrupt Stream" src="http://www.serenux.com/wp-content/uploads/2009/09/BDNotCorruptStream-300x168.jpg" alt="An example of the repaired video stream. Click for full size." width="300" height="168" /></a><p class="wp-caption-text">An example of the repaired video stream using the Conversion Table. Click for full size.</p></div>
<p>So how do we get around BD+? Well, all we have to do is follow this conversion table ourselves and correct the corrupted data as the title is decrypted.</p>
<p>As I showed in my previous article, the DumpHD application is brilliant and it has been extended by the author KenD00 to allow the &#8220;plugging in&#8221; of another program called the &#8220;BD VM Debugger&#8221;. What this program does is simple &#8211; it executes the Java Virtual Machine that runs the conversion table in concert with the normal decrypting process which happens when the disc is played in your normal BD player, patching up the stream as it goes. The end result is a clean decryption with no corrupt video stream.</p>
<p>This tutorial was written using Ubuntu Jaunty but should work with Intrepid and should definitely work with Karmic and beyond as well.</p>
<p><em>DISCLAIMER: This article describes decrypting BD titles using an Intel or AMD based PC with Ubuntu Linux. At this time of writing you <strong>cannot</strong> use Ubuntu installed on a PlayStation3 console to deal with BD+ copy protection because the BD VM Debugger and AACS Keys applications are not available for the PPC processor used by the PS3.</em></p>
<p>So let&#8217;s set this up, but first &#8211; since my last article, <a title="The DumpHD homepage on the Doom9 forums" href="http://forum.doom9.org/showthread.php?t=123111" target="_blank">DumpHD</a> has been updated to 0.61 so let&#8217;s upgrade this first. <a title="Download the DumpHD app" href="http://rapidshare.com/files/240557737/dumphd-0.61.tar.gz" target="_blank">Go and download yourself a copy</a>.</p>
<ol>
<li>Extract the archive out by either double-clicking on it or via the terminal. You should get a &#8220;dumphd-0.61&#8243; directory.<br />
.</li>
<li>If you are upgrading from an older version of DumpHD, copy over the &#8220;KEYDB.cfg&#8221; file, overwriting the archive copy. No point losing your collection of keys accumulated thus far. <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
.</li>
<li>You&#8217;re done for this bit.</li>
</ol>
<p>The AACSKeys program (which extracts the decryption key for the Blu-ray title and can automatically update your &#8220;KEYDB.cfg&#8221; file for you when you insert a new Blu-ray title) has also been updated to 0.4.0c since my last article, so <a title="Download the AACSKeys app" href="http://rapidshare.com/files/273476005/aacskeys-0.4.0c.tar.gz" target="_blank">go download yourself a copy of that as well</a>.</p>
<ol>
<li>Extract the archive out by either double-clicking on it or via a terminal. You should get a &#8220;aacskeys-0.4.0c&#8221;.<br />
.</li>
<li>Copy the &#8220;ProcessingDeviceKeysSimple.txt&#8221; and &#8220;HostKeyCertificate.txt&#8221; into the &#8220;dumphd-0.61&#8243; directory.<br />
.</li>
<li>Copy over the &#8220;libaacskeys.so&#8221; file located in the &#8220;/lib/linux32/&#8221; OR &#8220;/lib/linux64/&#8221; directories (depending on which architecture you&#8217;re using) to the &#8220;dumphd-0.61&#8243; directory. Do NOT copy or create the &#8220;/lib/linux32&#8243; or &#8220;/lib/linux64&#8243; directories themselves. Copy the library file only.<br />
.</li>
<li>You&#8217;re done for this bit.</li>
</ol>
<p>Right, let&#8217;s get the BD VM Debugger installed. As of this writing, the current version is 0.1.5. <a title="Download the BD VM Debugger" href="http://uploaded.to/?id=xcco6l" target="_blank">Go and download yourself a copy</a>.</p>
<ol>
<li>This archive is provided as a 7zip file. Ubuntu does not have out-of-the-box support for this archive format, so install it first with:
<pre><span style="color: #000080;">$ sudo apt-get install p7zip-full</span></pre>
<p>.</li>
<li>Once installed, extract the archive either by double-clicking on it like any normal archive, or via the terminal as follows:
<pre><span style="color: #000080;">$ 7z e bdvmdbg-0.1.5.7z</span></pre>
<p>.</li>
<li>Copy over the everything into the &#8220;dumphd-0.61&#8243; directory except the &#8220;changelog.txt&#8221;, &#8220;readme.txt&#8221; and &#8220;debugger.sh&#8221; files since you don&#8217;t really need them, but there&#8217;s no harm copying them anyway.<br />
.</li>
<li>That&#8217;s it!</li>
</ol>
<p>You should now have a total of at least of 17 files and two directories inside the &#8220;dumphd-0.61&#8243; directory (if you are setting up these tools for the first time, you will only have 15 files instead, as two of them  &#8211; <em>conv_tab.bin</em> &amp; <em>hash_db.bin</em> &#8211; are generated by DumpHD in conjunction with the BD VM Debugger).</p>
<p style="text-align: center;">
<div id="attachment_579" class="wp-caption aligncenter" style="width: 404px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/DumpHD061Folder.jpg"><img class="size-full wp-image-579" title="DumpHD-0.61 Folder" src="http://www.serenux.com/wp-content/uploads/2009/09/DumpHD061Folder.jpg" alt="The prepared DumpHD folder with the tools we need. Click for full size." width="394" height="359" /></a><p class="wp-caption-text">The prepared DumpHD folder with the tools we need. Click for full size.</p></div>
<p>Now let&#8217;s try decrypting a BD+ protected Blu-ray title. In this example, I will use the Australian release of &#8220;Day Watch&#8221;, the sequel to the Russian epic &#8220;Night Watch&#8221;.</p>
<p style="text-align: center;">
<div id="attachment_574" class="wp-caption aligncenter" style="width: 378px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/DayWatchBox.jpg"><img class="size-large wp-image-574" title="Day Watch Blu-ray Title" src="http://www.serenux.com/wp-content/uploads/2009/09/DayWatchBox-1024x768.jpg" alt="The BD+ Protected &quot;Day Watch&quot; Blu-ray title I am ripping. Click for full size." width="368" height="277" /></a><p class="wp-caption-text">The BD+ Protected &quot;Day Watch&quot; Blu-ray title I am ripping. Click for full size.</p></div>
<p><em>NOTE: Your ability to decrypt a given Blu-ray title, BD+ protected or not, will ultimately depend on the MKB version of the disc. As of this writing, DumpHD can only decrypt up to MKB version 10. Newer discs using version 11 or later can only be decrypted once suitable decryption keys are uncovered and added to the &#8220;ProcessingDeviceKeysSimple.txt&#8221; file in the &#8220;dumphd-0.61&#8243; directory.</em></p>
<p><em>The obtaining of the decryption key of the Blu-ray title also requires the player authentication mechanism of your Blu-ray drive to be bypassed, or through use of a drive that deliberately does not have this feature such as some imported drives from China. In the case of my LG GGC-H20L drive, I used a <a title="My first review of ripping a Blu-ray title with this drive contains information about applying modified firmware." href="http://www.serenux.com/2009/01/howto-rip-a-blu-ray-movie-using-an-lg-ggc-h20l-blu-ray-drive-with-ubuntu/" target="_blank">modified firmware</a> so that the drive always gave up the disc&#8217;s decryption key regardless of what player certificate I used &#8211; blacklisted or not.</em></p>
<ol>
<li>Start the DumpHD program by double-clicking on the &#8220;dumphd.sh&#8221; icon. You will be asked if you want to run the script file. Click on the &#8220;Run&#8221; button.<br />
.</p>
<div id="attachment_583" class="wp-caption aligncenter" style="width: 312px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/StartingDumpHD.jpg"><img class="size-full wp-image-583" title="Starting DumpHD" src="http://www.serenux.com/wp-content/uploads/2009/09/StartingDumpHD.jpg" alt="Starting DumpHD" width="302" height="110" /></a><p class="wp-caption-text">Starting the DumpHD application. Click for full size.</p></div></li>
<li>When the DumpHD GUI appears, make a note of the messages in the bottom pane to ensure that AACSKeys and the BD VM Debugger was found and loaded OK. You should see the following information:
<pre><span style="color: #000080;">DumpHD 0.61 by KenD00

Opening Key Data File... OK
Initializing AACS... OK
Loading aacskeys library... OK
aacskeys library 0.4.0 by arnezami, KenD00
Loading BDVM... OK
BDVM 0.1.5</span></pre>
<p><div id="attachment_582" class="wp-caption aligncenter" style="width: 490px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/DumpHDStarted.jpg"><img class="size-full wp-image-582" title="DumpHD Started" src="http://www.serenux.com/wp-content/uploads/2009/09/DumpHDStarted.jpg" alt="DumpHD Started" width="480" height="360" /></a><p class="wp-caption-text">The DumpHD Interface. Click for full size.</p></div>
<p style="text-align: center;">.</p>
</li>
<li>Insert the Blu-ray title into your Blu-ray drive.<br />
.</li>
<li>Next to the &#8220;Source&#8221; section at the top-right of the DumpHD window is a &#8220;Browse&#8221; button. Click on it.<br />
.</li>
<li>Navigate to the path of your Blu-ray drive (generally &#8220;/media/cdrom&#8221; will work fine). and hit the OK button.
<div id="attachment_580" class="wp-caption aligncenter" style="width: 272px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/DumpHDBrowseSource.jpg"><img class="size-full wp-image-580" title="DumpHD Browse Source" src="http://www.serenux.com/wp-content/uploads/2009/09/DumpHDBrowseSource.jpg" alt="DumpHD Browse Source" width="262" height="271" /></a><p class="wp-caption-text">Choosing a source to rip from. Click for full size.</p></div></li>
<li>DumpHD will read the disc and will pass it through AACSKeys to identify the title&#8217;s descryption key. If it is successful, it will output some data about the disc in the lower pane. In the case of my <em>Day Watch</em> title, it shows the following:
<pre><span style="color: #000080;">Initializing source...
Disc type found: Blu-Ray BDMV
Collecting input files...
Source initialized
Identifying disc... OK
DiscID : 73886D08811073F45AD8C75012689097E17EBD3C
Searching disc in key database...
Disc found in key database</span></pre>
<p><div id="attachment_581" class="wp-caption aligncenter" style="width: 490px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/DumpHDDiscIdentified.jpg"><img class="size-full wp-image-581" title="DumpHD Disc Identified" src="http://www.serenux.com/wp-content/uploads/2009/09/DumpHDDiscIdentified.jpg" alt="DumpHD Disc Identified" width="480" height="360" /></a><p class="wp-caption-text">Identifying the disc and getting the decryption keys to rip with. Click for full size.</p></div>
<p style="text-align: center;">.</p>
</li>
<li>This is good. We can decrypt this. If the title is not one you have ripped before, you have the option to click on the &#8220;Title&#8221; button at the top-left of the DumpHD window to give the movie a name in your Key Database.<br />
.</li>
<li>In the &#8220;Destination&#8221; section on the right, click on the &#8220;Browse&#8221; button.<br />
.</li>
<li>Choose a place to dump the decrypted disc to. Note that most titles will dump at least 20GB worth of data and in some cases 50GB. Ensure that you have enough hard-drive space in the location you choose to dump to.<br />
.</li>
<li>We&#8217;re ready to rock and/or roll. Click on the &#8220;Dump&#8221; button and decryption will begin, automatically executing the BD VM and applying the Conversion Table to correct the deliberate corruption in the video stream. Here&#8217;s a small extract of what you will see in the lower pane of the DumpHD window:
<pre><span style="color: #000080;">AACS data processed
Initializing the BDVM... OK
Executing the BDVM... OK
Parsing the Conversion Table... OK
Processing: BDMV/BACKUP/CLIPINF/00000.clpi
Processing: BDMV/BACKUP/CLIPINF/00001.clpi
Processing: BDMV/BACKUP/CLIPINF/00002.clpi
etc...</span></pre>
<div id="attachment_578" class="wp-caption aligncenter" style="width: 490px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/BDRipStart.jpg"><img class="size-full wp-image-578" title="BD Rip Start" src="http://www.serenux.com/wp-content/uploads/2009/09/BDRipStart.jpg" alt="BD Rip Start" width="480" height="341" /></a><p class="wp-caption-text">Beginning the ripping process. Click for full size.</p></div>
<p style="text-align: center;">.</p>
</li>
<li>And after awhile it will finish with something like:
<pre><span style="color: #000080;">Processing: BDMV/STREAM/00211.m2ts
Searching CPS Unit Key... #1
0x0000000000 Decryption enabled
Processing: BDMV/STREAM/00212.m2ts
Searching CPS Unit Key... #1
0x0000000000 Decryption enabled
Processing: BDMV/index.bdmv
Disc set processed</span></pre>
<div id="attachment_577" class="wp-caption aligncenter" style="width: 490px"><a href="http://www.serenux.com/wp-content/uploads/2009/09/BDRipDone.jpg"><img class="size-full wp-image-577" title="BD Rip Done" src="http://www.serenux.com/wp-content/uploads/2009/09/BDRipDone.jpg" alt="BD Rip Done" width="480" height="341" /></a><p class="wp-caption-text">Finished decrypting the Blu-ray title. Click for full size.</p></div>
<p style="text-align: center;">.</p>
</li>
<li>That&#8217;s it! You&#8217;ve successfully decrypted the disc and fixed up the corrupted video track. Identify and playback the actual movie M2TS file using a player like MPlayer or VLC, and you should now find that it contains no corruption whatsoever. In the case of <em>Day Watch</em>, the movie file was under <em>BDMV/STREAM/00012.m2ts</em> identifiable simply because it was the largest file in the directory. Using MPlayer, you can play this file with:
<pre><span style="color: #000080;">$ mplayer -fs BDMV/STREAM/00012.mt2s</span></pre>
<p>Thankfully this title does not have the movie broken up into multiple files (I&#8217;ll be writing another article soon showing you how to deal with multi-part movies).</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2009/09/howto-deal-with-bd-copy-protection-when-ripping-blu-ray-titles-using-ubuntu/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>HowTo: Make use of Ubuntu PPA repositories</title>
		<link>http://www.serenux.com/2009/07/howto-make-use-of-ubuntu-ppa-repositories/</link>
		<comments>http://www.serenux.com/2009/07/howto-make-use-of-ubuntu-ppa-repositories/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 04:58:07 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Apt]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Jaunty]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=509</guid>
		<description><![CDATA[What is a PPA repository? A PPA is a Personal Package Archive hosted by the ubuntu.com servers that contains binaries and/or source related to a project. The project can be anything from a new application to a backport of an existing one. A good example is the easy availability of OpenOffice.org 3.0.1 to Intrepid users [...]]]></description>
			<content:encoded><![CDATA[<p>What is a PPA repository?</p>
<p>A PPA is a <em>Personal Package Archive</em> hosted by the ubuntu.com servers that contains binaries and/or source related to a project. The project can be anything from a new application to a backport of an existing one. A good example is the easy availability of <a title="OpenOffice.org 3.0.1 for Intrepid users" href="http://www.serenux.com/?p=397" target="_blank">OpenOffice.org 3.0.1 to Intrepid users</a> before Jaunty came out rather than having to deal with the mess of packages from Sun&#8217;s own website.</p>
<p>PPA&#8217;s can be wholly personal to you or may be open to the public. In particular it is very useful for providing Ubuntu packaged versions of a given application instead of dealing with tarballs or converting RPM packages.</p>
<p>So how does one make use of a pre-defined PPA and are there any things to be wary about? Read on.</p>
<p><span id="more-509"></span>PPA&#8217;s are great for getting the latest versions of a given piece of software instead of waiting for the official Ubuntu repository versions to be updated, though you will of course open yourself to any potential bugs in that software. Classic examples include getting Pidgin&#8217;s 2.5.8 update with the included new authentication method for Yahoo Messenger, or getting the latest version of the Deluge BitTorrent client/daemon.</p>
<p>In this HowTo, we are going to grab the latest version of Deluge to install on an Ubuntu Jaunty 9.04 system using the unofficial Ubuntu PPA, but this guide should apply to just about any version of Ubuntu or other Debian-based distribution.</p>
<p><em>NOTE: Ubuntu has now further simplified the PPA process by introducing a new way of adding PPA repositories and the GPG key in one hit from Ubuntu Karmic 9.10 onwards. While you can still use the process outlined below, please see the note at the end of this article for the simplified way.</em></p>
<ol>
<li>First up, we need to create a sources.list file for the PPA repository we want to add to our system. In the case of Deluge, the PPA is at <a title="Deluge Ubuntu PPA" href="https://launchpad.net/~deluge-team/+archive/ppa" target="_blank">https://launchpad.net/~deluge-team/+archive/ppa</a> so go there first.</li>
<li>Under the &#8220;Install packages&#8221; section is a box with two lines in it:
<pre><span style="color: #000080;">deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/deluge-team/ppa/ubuntu jaunty main</span></pre>
</li>
<li>Highlight and copy these two lines to your clipboard.</li>
<li>Now open a terminal and create a new file in your favourite text editor (in this case, GEdit) by typing in:
<pre><span style="color: #000080;">$ sudo gedit /etc/apt/sources.list.d/deluge.list</span></pre>
</li>
<li>This creates a new file under /etc/apt/sources.list.d called deluge.list. You are presented with a blank page. Paste the content of the clipboard down so you have the two lines you copied earlier.</li>
<li>Save and close the file.</li>
<li>Now, in the terminal, type in:
<pre><span style="color: #000080;">$ sudo apt-get update</span></pre>
</li>
<li>When the update completes, you should see a warning error at the end similar to the following:
<pre><span style="color: #000080;">W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C5E6A5ED249AD24C
W: You may want to run apt-get update to correct these problems</span></pre>
</li>
<li>What this means is that apt-get has processed all your package lists and found that for the newly added Deluge source list, it does not have a GPG key to authenticate any of the files from it. This doesn&#8217;t stop you from installing Deluge or other files from it, but it does prevent Ubuntu from proving whether or not these files are untampered with, so it will pester you with warnings until you can provide it that GPG public key. Providing it is simple. Make note of the hexadecimal value provided after NO_PUBKEY and then type in the following:
<pre><span style="color: #000080;">$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C
gpg: requesting key 249AD24C from hkp server keyserver.ubuntu.com
gpg: key 249AD24C: public key "Launchpad PPA for Deluge Team" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
$</span></pre>
</li>
<li>This fetches the GPG public key from the Keyserver at ubuntu.com and adds it to your GPG keyring. Now if you run:
<pre><span style="color: #000080;">$ sudo apt-get update</span></pre>
<p>&#8230;again, you will see no errors output this time, which means you can safely install applications from it now without Apt warning you about being unable to authenticate them.</li>
<li>To prove this, let&#8217;s try and install Deluge now:
<pre><span style="color: #000080;">$ sudo apt-get install deluge</span></pre>
<p>&#8230;and it should install like any other ordinary Ubuntu applications with no fuss, no worries and no error messages.</li>
<li>Pat yourself on the back.</li>
</ol>
<p><span style="text-decoration: underline;"><span style="color: #0000ff;"><em><strong>I get an &#8220;HTTP fetch&#8221; error when I try to import a GPG public key!</strong></em></span></span></p>
<p>If at step 9, you get the following error:</p>
<pre><span style="color: #000080;">$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C
gpg: requesting key 249AD24C from hkp server keyserver.ubuntu.com
<strong>gpgkeys: HTTP fetch error 7: couldn't connect to host</strong>
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
$</span></pre>
<p>It is because your firewall is blocking access to the Keyserver. Keyservers use port 11371 to communicate, not port 80 which is the normal HTTP port, so open 11371 as an outbound port on your firewall and re-run the command and it will work fine.</p>
<p><span style="color: #0000ff;"><em><span style="text-decoration: underline;"><strong>The simplified way of adding PPA&#8217;s using Ubuntu Karmic 9.10 or later.<br />
</strong></span></em></span></p>
<p>Ubuntu 9.10 introduced a new, simpler way to add PPA&#8217;s to your system. Using the above Deluge example, you now only have to type in:</p>
<pre><span style="color: #000080;">$ sudo add-apt-repository ppa:deluge-team/ppa</span></pre>
<p>&#8230;and that&#8217;s it. This will do the whole sources.list creation and GPG key for you in one hit. That now simply leaves you to update your package lists with:</p>
<pre><span style="color: #000080;">$ sudo apt-get update</span></pre>
<p>&#8230;and then you can install Deluge with:</p>
<pre><span style="color: #000080;">$ sudo apt-get install deluge</span></pre>
<p>As you can see, it&#8217;s a far simpler method. You can, of course, still use the original method if you prefer.</p>
<p><span style="color: #0000ff;"><em><span style="text-decoration: underline;"><strong>Hey these PPA things are cool &#8211; can I create one of my own?</strong></span></em></span></p>
<p>You certainly can. Refer to the <a title="Ubuntu PPA Help Page" href="https://help.launchpad.net/Packaging/PPA" target="_blank">Personal Package Archives for Ubuntu Help Page</a> for everything you need to know, however please do not use a PPA as your own personal off-site backup for personal data. It is intended to help individuals and small groups who develop new software and do not have the resources to host their software for easy distribution by providing them a place where the masses can gain access to their project. To help curb the potential for abuse, PPA&#8217;s are limited to 1GB of storage and you are bound by the <a title="Ubuntu Community Code of Conduct" href="https://help.launchpad.net/BecomingAnUbuntero" target="_blank">Ubuntu Community Code of Conduct</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2009/07/howto-make-use-of-ubuntu-ppa-repositories/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HowTo: Build a MythTV box from scratch using Ubuntu Jaunty 9.04</title>
		<link>http://www.serenux.com/2009/06/howto-build-a-mythtv-box-from-scratch-using-ubuntu-jaunty-904/</link>
		<comments>http://www.serenux.com/2009/06/howto-build-a-mythtv-box-from-scratch-using-ubuntu-jaunty-904/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 15:26:01 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[High-Definition]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Jaunty]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MythTV]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=492</guid>
		<description><![CDATA[MythTV is a project that brings analogue and digital television to your Ubuntu-powered PC. It primarily functions as your television and personal video recorder (PVR), but can be made to do many other things (refer to the official MythTV site for more information), however one thing that can catch people is actually building a MythTV [...]]]></description>
			<content:encoded><![CDATA[<p>MythTV is a project that brings analogue and digital television to your Ubuntu-powered PC. It primarily functions as your television and personal video recorder (PVR), but can be made to do many other things (refer to the official MythTV site for more information), however one thing that can catch people is actually building a MythTV box from scratch. Over the years, MythTV has been one of the largest causes of baldness in users who have torn out their hair in frustration.</p>
<p>Nowadays, tailored distributions such as Mythbuntu make the task pretty much trivial, but not everyone likes to use the tailor-made distributions. For one, Mythbuntu has a lot of its own branding across it which I personally don&#8217;t really like, and I&#8217;d prefer not to have it install all of that plus XFCE as the default desktop and then have to undo it all just to get back to a regular Ubuntu desktop.</p>
<p>Since I recently built a MythTV server for my folks, and on top of that connected it to their aging CRT television rather than the latest in visual technology, this makes for a perfect tutorial on how to take a vanilla Ubuntu Jaunty 9.04 installation and turn it into a simple, functional MythTV server without all the branding. We are going to just install only the components required to get MythTV up and running. Anything else you add is purely up to you.</p>
<p><span id="more-492"></span><em><strong>Note: This tutorial covers installation of MythTV 0.21 as supplied with Ubuntu Jauty 9.04. It does not apply to the forthcoming 0.22 release which will sport a vastly different interface. It is not known yet whether Ubuntu Karmic 9.10 will still have 0.21 supplied or if 0.22 will be ready for release by then.</strong></em></p>
<p>The system I built for my folks comprised of the following hardware:</p>
<ul>
<li>Silverstone LC17 case (just to match the lounge gear, but you can use pretty much any case)</li>
<li>Gigabyte 500w PSU</li>
<li>2GB of Kingston DDR2/800 RAM (should have bought two sticks instead of a single stick, so I could run it in dual-channel mode &#8211; ah well, it&#8217;s not really a performance killer for MythTV)</li>
<li>A Gigabyte S-Series EG41M-S2H motherboard (which has built-in optical out and HDMI based on an Intel gfx chipset)</li>
<li>An MSI NX8400GS (NVidia GeForce 8400GS) PCI-E graphics card (because it&#8217;s passively cooled for no noise and has Composite/S-Video output as well as VGA and DVI)</li>
<li>An Intel E5300 Pentium Dual-Core CPU</li>
<li>A Seagate 1TB hard-drive</li>
<li>LG SATA DVD-RW optical drive (for playing DVD movie discs)</li>
<li>Two Asus MyCinema-U3100-Mini DVB-T digital-only TV tuners</li>
<li>Digitech &#8220;generic&#8221; Windows Media Centre Compatible remote control and USB infra-red receiver (cheaper than the real thing and doesn&#8217;t have any Windows or Microsoft branding on it)</li>
</ul>
<p>I won&#8217;t detail the hardware build process since it&#8217;s an ordinary PC at the end of the day, but here is how it looks in my folks&#8217; AV cabinet (it&#8217;s on the bottom shelf):</p>
<p style="text-align: center;"><a title="Click for full size" href="http://www.serenux.com/~hyrax/pics/MythTV/FinishedMythTVServer.jpg" target="_blank"><img title="Finished MythTV combined Backend &amp; Frontend server" src="http://www.serenux.com/~hyrax/pics/MythTV/FinishedMythTVServer_thumb.jpg" alt="Click for full size" /></a><br />
Click for full size (126K)</p>
<p>I performed a vanilla Ubuntu Jaunty 9.04 with the following partition layout:</p>
<ul>
<li>100MB for /boot formatted as EXT2</li>
<li>1GB for swap formatted as SWAP</li>
<li>8GB for / (root) formatted as EXT4</li>
<li>Remainder of drive for /home formatted as EXT4</li>
</ul>
<p>Since I also installed a UPS, I do not foresee any issues with the EXT4 file system and power-loss-related data corruption. I used EXT2 for /boot because, frankly, it doesn&#8217;t need journalling there. You&#8217;ll only ever write to that partition when you do a kernal update and having as a separate partition will make any future system recovery easier.</p>
<p>My folks are still using an old standard-definition widescreen CRT television. It comes equipped with SCART inputs which can accept Composite, S-Video and Amiga-style RGB signals, but not Component ability. I elected to connect the PC using S-Video, and it looks pretty sharp for what it is &#8211; certainly far more readable than Composite.</p>
<p>I came across a strange issue when I started the Ubuntu installation process &#8211; it couldn&#8217;t start X. Basically put, it cannot detect the &#8220;monitor&#8221; and thus cannot setup a suitable screenmode. I decided to do the initial installation via a traditional VGA monitor and once the NVidia drivers were installed, I&#8217;d switch back to the TV only.</p>
<p>I configured the primary login account, password and machine name to all be &#8220;htpc&#8221; and set it to auto-login. Once installation was complete and rebooted for the first time, I quickly installed the NVidia Binary driver and updated the system with any outstanding general system updates.</p>
<p><span style="color: #0000ff;"><em><span style="text-decoration: underline;"><strong>Setting up the TV</strong></span></em></span></p>
<p>Once rebooted for the second time, I physically disconnected the VGA monitor and left only the TV connected. Ubuntu appeared quite cheerfully, though annoyingly it had switched to NTSC 60Hz mode, and I wanted PAL in 50Hz.</p>
<p>I opened up the xorg.conf configuration file into GEdit as follows:</p>
<pre><span style="color: #000080;">$ sudo gedit /etc/X11/xorg.conf</span></pre>
<p>&#8230;and located the &#8220;Screen&#8221; section which describes what the X screen to be used is. It looks something like this:</p>
<pre><span style="color: #000080;">Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "TV-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection</span></pre>
<p>I added the following two lines into that section:</p>
<pre><span style="color: #000080;">    Option         "TVOutFormat" "SVIDEO"
</span><span style="color: #000080;">    Option         "TVStandard" "PAL-B"</span></pre>
<p>&#8230;so now the Screen section looked like this:</p>
<pre><span style="color: #000080;">Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "TwinViewXineramaInfoOrder" "TV-0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "TVOutFormat" "SVIDEO"
    Option         "TVStandard" "PAL-B"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection</span></pre>
<p>This ultimately outputted a 1024&#215;768 display on the TV, stretched horizontally (a 4:3 screenmode stretched to fit a physical 16:9 display). If your Ubuntu desktop is larger than the screen, just adjust your TV&#8217;s picture size until everything fits in. In my case, only the top and bottom panels got slightly chopped off which was fixed with a minor vertical size adjustment on the TV.</p>
<p><em><span style="text-decoration: underline;"><strong><span style="color: #0000ff;">Installing MythTV</span></strong></span></em></p>
<p>First we need to enable the system to access the Multiverse repository. Do this by going to <em>System-&gt;Administration-&gt;Software Sources</em> and place a check mark against all five boxes, click OK and acknowledge the prompt to reload your package lists.</p>
<p>We now set about installing the extra software I required to turn this box into a MythTV server (which was going to run both Backend and Frontend):</p>
<pre><span style="color: #000080;">$ sudo apt-get install mythtv</span></pre>
<p>That&#8217;s all you need to get the main MythTV stuff working &#8211; the &#8220;mythtv&#8221; metapackage installs the MythTV Frontend, MythTV Backend, MySQL Server, MySQL Client, MythTV database configuration, all the default MythTV themes, etc. In my case, however I also installed the following for extra video/audio codecs (such as MP3 for listening to music files or watching movie rips), Java, Flash, the Microsoft Fonts, the Compiz Configuration manager for doing desktop eye-candy, the SSH server daemon to remote control the box when my folks call for help, and finally the MythWeb add-on that allows you to look at the MythTV server&#8217;s TV guide and schedule programs to record using a web browser interface:</p>
<pre><span style="color: #000080;">$ sudo apt-get install mythtv ubuntu-restricted-extras compizconfig-settings-manager ssh mythweb</span></pre>
<p>&#8230;and from the <a title="Medibuntu Home Page" href="http://www.medibuntu.org" target="_blank">Medibuntu repository</a>, I installed the following for extra codecs and DVD decrypting/playback:</p>
<pre><span style="color: #000080;">$ sudo apt-get install non-free-codecs libdvdcss2 mplayer mencoder</span></pre>
<p><em>Note: I did not need to install lirc for the remote control because the Digitech remote is actually a USB keyboard in disguise, not a &#8220;proper&#8221; infra-red remote.</em></p>
<p>During the installation of these packages, you will be prompted for a few things, namely:</p>
<ol>
<li>Create a password for the root MySQL account. If this MythTV installation is purely for in-house use only, then just go with something simple like &#8220;password&#8221;. Many suggest leaving it blank, but I&#8217;ve personally seen this create authentication problems later on.</li>
<li>Create the MySQL database. When prompted for the MythTV server address, change the default &#8220;localhost&#8221; to the IP address of the PC you are installing the Backend on. If the Backend Server has an IP address of 192.168.0.10, then type in 192.168.0.10 in place of &#8220;localhost&#8221;. If you only intend to run one machine only for everything, then you can leave &#8220;localhost&#8221; as is.</li>
<li>When prompted for the name of the MySQL database, leave it as the default &#8220;mythconverg&#8221;.</li>
<li>Make note of the password generated for the MythTV database. You will need this to configure your MythTV Frontend.</li>
<li>Indicate whether or not you intend to have more than one Frontend client connect to your Backend server.</li>
<li>If you elected to install MythWeb, then you will be asked a question as to whether or not you want your MythWeb site password protected.</li>
<li>Acknowledge other prompts that tell you about creating the &#8220;MythTV&#8221; groups etc.</li>
<li>Your PC now has a user and Home directory called /home/mythtv and we need to ensure that the &#8220;mythtv&#8221; group can write to it as well as the owner, so at a terminal, type in:
<pre><span style="color: #000080;">$ sudo chmod -R g+w /home/mythtv</span></pre>
<p>&#8230;and hit Enter.</li>
<li>Finally, if you intend more than one Frontend to access your Backend machine, we need to tell MySQL to allow other PC&#8217;s on your network to access the database, or those Frontends (other than the one on the Backend server) will not be able to start. To do this, type the following at the $ prompt. Everyone else can skip to Step 12.
<pre><span style="color: #000080;">$ mysql mythconverg -u root -p</span></pre>
</li>
<li>When prompted, enter in the root MySQL password you specified earlier.</li>
<li>You will then be shown a MySQL prompt. If your local network&#8217;s IP topology is 192.168.0.x, and the password that was generated for MythTV&#8217;s database was &#8220;8tSpxGiM&#8221; then type the following to grant access to all PC&#8217;s on your local network to the MythTV MySQL database, at the &#8220;mysql&gt;&#8221; prompt:
<pre><span style="color: #000080;">mysql&gt; grant all on mythconverg.* to mythtv@"192.168.0.%" identified by "8tSpxGiM";
mysql&gt; flush privileges;
mysql&gt; quit
</span></pre>
<p>&#8230;this will allow all PC&#8217;s with IP addresses starting with 192.168.0.x to access the MythTV database. If you are paranoid and only want to allow specific PC&#8217;s to access the database, then simply issue the &#8220;grant all&#8221; line for all explicit IP addresses only, by replacing the &#8220;%&#8221; wildcard character with the explicit IP address you want to allow, ie: to allow just 192.168.0.67 in, replace &#8220;192.168.0.%&#8221; with &#8220;192.168.0.67&#8243;. Repeat for all specific IP&#8217;s to allow. You only have to issue the &#8220;flush&#8221; command once at the end to make your changes take effect.</li>
<li>Confirm that you can access the MythTV database as the MythTV user at the $ terminal prompt. If you are only using one machine, do this on the Backend server. If you are using multiple Frontends, test this on the remote PC&#8217;s that will be running the Frontend software (obviously replace the IP address with the actual IP address your Backend machine is using):
<pre><span style="color: #000080;">$ mysql mythconverg -h 192.168.0.10 -u mythtv -p</span></pre>
<p>&#8230;when prompted, enter the MythTV password that was generated earlier. If successful, you should be looking at a &#8220;mysql&gt;&#8221; prompt. If not, you will get an error, probably along the lines of &#8220;access denied&#8221;.<em> NOTE: If you configured &#8220;localhost&#8221; to be the Backend Server in Step 2, then you <span style="text-decoration: underline;">must</span> use the name &#8220;localhost&#8221; to connect to MySQL. Using &#8220;127.0.0.1&#8243; instead will not work because you have not configured &#8220;127.0.0.1&#8243; to have access to the mythconverg database. If you wanted these permissions, you would modify Step 11 to be the following commands:<br />
</em></p>
<pre><span style="color: #000080;">mysql&gt; grant all on mythconverg.* to mythtv@"192.168.0.%" identified by "8tSpxGiM";
mysql&gt; grant all on mythconverg.* to mythtv@"127.0.0.1" identified by "8tSpxGiM";
mysql&gt; grant all on mythconverg.* to mythtv@"localhost" identified by "8tSpxGiM";
mysql&gt; flush privileges;
mysql&gt; quit
</span></pre>
<p>&#8230;which will allow the &#8220;mythtv&#8221; user to connect from any IP on the 192.168.0.x network, from 127.0.0.1 and any host called &#8220;localhost&#8221;, all using the specified password.</p>
<pre><span style="color: #000080;"> </span></pre>
</li>
<li>Quit the MySQL client by typing &#8220;quit&#8221; at the &#8220;mysql&gt;&#8221; prompt:
<pre><span style="color: #000080;">mysql&gt; quit</span></pre>
</li>
</ol>
<p><span style="text-decoration: underline;"><span style="color: #0000ff;"><em><strong>Configuring MythTV &#8211; the Backend</strong></em></span></span></p>
<p>At this point, make sure your TV tuners are connected. In my case, the Asus U3100&#8242;s are connected into two free USB ports at the rear of the PC and have automatically been detected as Ubuntu carries full support for the U3100 already.</p>
<p>Now we need to start MythTV Backend Setup for the first time. Go to System-&gt;Administration-&gt;MythTV Backend Setup. When you do so, it will prompt you that your user (in my case &#8220;htpc&#8221;) needs to be added to the &#8220;mythtv&#8221; group. Acknowledge this and then accept being logged out for the change to take effect. Log yourself back in. Once logged back in, restart the MythTV Backend Setup again. You will be reminded that the MythTV Backend needs to be stopped before you can continue. Click OK.</p>
<p>You are presented with several options. Choose &#8220;General&#8221; (if you are using a remote, you should find the basic Up/Down and OK buttons work here already).</p>
<ol>
<li>Change the &#8220;Local backend&#8221; and &#8220;Master backend&#8221; addresses to be &#8220;localhost&#8221; (in lower case and one word). Leave all the &#8220;port&#8221; numerical figures alone.</li>
<li>Click on &#8220;Next&#8221;. If you&#8217;re only using a keyboard, then press ALT + N to proceed. The screen content will change.</li>
<li>Change the &#8220;TV format&#8221; to suit your local country. In my case, this is &#8220;PAL&#8221;. If you are in America or Japan, you&#8217;ll use &#8220;NTSC&#8221;. Check your local TV standards if you are not sure.</li>
<li>Change the channel frequency table option to your local country. In my case, this is &#8220;australia&#8221;.</li>
<li>The timezone for your guide XML data will ultimately depend on how you get your guide data. In my case, I just use Auto.</li>
<li>Click on &#8220;Next&#8221; or ALT + N on the keyboard.</li>
<li>We don&#8217;t need to change anything on this screen or the five screens that follow it, so click on &#8220;Next&#8221; again until you get to the last page where the button now says &#8220;Finish&#8221;.</li>
<li>Click on the &#8220;Finish&#8221; button or press ALT + F on the keyboard. You will be returned back to the main menu.</li>
</ol>
<p>Now choose the &#8220;Capture cards&#8221; option.</p>
<ol>
<li>Choose the &#8220;New capture card&#8221; option from the list.</li>
<li>What you choose here will be dependent on what your tuner hardware is. In my case, I change the &#8220;Card type&#8221; until it says &#8220;DVB DTV Capture Card (v3.x)&#8221; and you will see that the &#8220;Frontend ID&#8221; will show &#8220;DiBcom 7000PC&#8221; and the &#8220;Subtype&#8221; will be &#8220;DVB-T&#8221; indicating a &#8220;Digital Video Broadcast &#8211; Terrestrial&#8221; device was found.</li>
<li>Click on the &#8220;Recording Options&#8221; button and ensure that the &#8220;Max recordings&#8221; option is set to &#8220;2&#8243; (most digital tuners can record two channels at once from the same network, thus two physical tuners effectively become four usable tuners within MythTV).</li>
<li>Go back to the previous screen by clicking on Finish and then click on Finish again. You will be returned to the Capture card list and you will now see a new line for the card you just setup.</li>
<li>Since I have two tuners, I repeat this whole process again &#8211; the system will pick up the second tuner and label it accordingly &#8211; you can&#8217;t setup a card more than once accidentally. In my case now I have two cards called <em>DVB:0</em> and <em>DVB:1</em> listed.</li>
<li>Press ESC to return back to the main menu.</li>
</ol>
<p>Now choose the &#8220;Video sources&#8221; option.</p>
<ol>
<li>Choose the &#8220;New video source&#8221; option from the list.</li>
<li>Give your video source a name, eg: &#8220;Digital Free-to-Air&#8221;. This can be anything you want.</li>
<li>For your Settings Grabber, just choose the &#8220;Transmitted guide only (EIT)&#8221; or &#8220;No grabber&#8221; option for now. If you already have a preferred grabber, then choose it here now.</li>
<li>Click on Finish.</li>
<li>We only need one source for both tuners, so we&#8217;re done here. Press ESC to return back to the main menu.</li>
</ol>
<p>Now choose the &#8220;Input Connections&#8221; option. This is where we tie our source to the tuners.</p>
<ol>
<li>Choose the first tuner in your list. In my case I have &#8220;DVB: 0 (DVBInput) -&gt; (None)&#8221;.</li>
<li>Change the &#8220;Display Name (optional)&#8221; to be something that describes the tuner, eg: &#8220;Digital tuner 1&#8243;. This can be anything you want and will serve to highlight what tuner you are using to watch or record a particular show.</li>
<li>Change &#8220;Video source&#8221; to the one you created in the &#8220;Video sources&#8221; earlier. In my case, I choose the only option I have &#8211; &#8220;Digital Free-to-Air&#8221;.</li>
<li>Now press the &#8220;Scan for channels&#8221; button.</li>
<li>Ensure that &#8220;Scan Type&#8221; is set to &#8220;Full Scan&#8221; and that your Country is correct.</li>
<li>Make sure that your TV aerial is securely connected to your TV tuner and then click on &#8220;Next&#8221;. The tuner will begin looking for TV channels. This can take several minutes to complete. Do not interrupt the process, even if it looks like it has gotten stuck &#8211; it will finish eventually. Any channels found will be listed in the status window at the back.</li>
<li>Once finished, press &#8220;Finish&#8221;.</li>
<li>Now press &#8220;Next&#8221;. Don&#8217;t change anything here.</li>
<li>Press &#8220;Finish&#8221;. You will be returned to the &#8220;Input Connections&#8221; list.</li>
<li>Repeat steps 1 to 3 only for any additional tuners you have (in my case, I had to repeat for the second tuner). We don&#8217;t need to re-scan for channels because the tuners are using the same source and we&#8217;ve already populated it with channels in the first run. In this instance, once you have done steps 1 to 3, just click on &#8220;Next&#8221; and then &#8220;Finish&#8221;.</li>
<li>Press ESC to return back to the main menu.</li>
</ol>
<p>Now choose the &#8220;Channel Editor&#8221; option and review all the channels that were picked up in the scan. Optionally, you may also have MythTV automatically download what it believes are the correct network icons for those channels from the Internet using the &#8220;Download icons&#8221; button. Delete any channels you don&#8217;t want to review. Eg: in my case, I also picked up some digital radio channels. I&#8217;m not interested in those, so I could delete those if I so choose.</p>
<p>Press ESC to go back to the main menu.</p>
<p>Now choose the &#8220;Storage Directories&#8221; option. This is where we tell MythTV where to put all our TV recordings.</p>
<ol>
<li>Choose &#8220;Default&#8221; from the list.</li>
<li>Choose the &#8220;/var/lib/mythtv/recordings&#8221; path already defined and change it to &#8220;/home/mythtv&#8221; (or whatever you prefer).</li>
<li>Click the &#8220;OK&#8221; button.</li>
<li>If you want to add more directories from other devices such as secondary hard-disks or network drives, just &#8220;Add directory&#8221; and specify them accordingly.</li>
<li>Once done, press ESC to return back to the main menu.</li>
</ol>
<p>We&#8217;re now done configuring the Backend, so press ESC again to close the MythTV Backend Setup application. If you get an error, review it and see if you can fix it based on the information provided. In particular, if it tells you that it couldn&#8217;t write a &#8220;.test&#8221; file to /home/mythtv, then you did not grant the &#8220;mythtv&#8221; group writer permissions to &#8220;/home/mythtv&#8221; (See Step 8 in &#8220;Installing MythTV&#8221; earlier in this article).</p>
<p>Upon exiting, after a couple of seconds a dialog box will appear asking if you wish to run &#8220;mythfilldatabase&#8221;. Say YES. Once this is done, the MythTV Backend should automatically restart in the background briefly and then its output window should disappear.</p>
<p><span style="text-decoration: underline;"><span style="color: #0000ff;"><em><strong>Configuring MythTV &#8211; the Frontend</strong></em></span></span></p>
<p>We&#8217;re nearly there! Now to configure the Frontend! Go to Applications-&gt;Sound &amp; Video-&gt;MythTV Frontend. After a brief delay, you will see the default MythTV menu.</p>
<ol>
<li>Choose &#8220;Utilities/Setup&#8221; from the menu.</li>
<li>Now choose &#8220;Setup&#8221; in the next menu.</li>
<li>Now choose &#8220;General&#8221; in the next menu.</li>
<li>If the PC you are on now is the Backend server, then this should already show that the&#8221;Database Server Settings&#8221; hostname is &#8220;localhost&#8221;. If you are installing a laptop/desktop that is NOT the Frontend, then you need to have the IP or hostname of the Backend machine here instead so that Frontend client knows who to talk to. In the case of your installation example, I&#8217;m using 192.168.0.10.</li>
<li>The port number can be left empty. It will use the MythTV default automatically.</li>
<li>The database name should already be &#8220;mythconverg&#8221;.</li>
<li>The user name should already be &#8220;mythtv&#8221;.</li>
<li>The password should already be the one that was randomly generated during the installation process.</li>
<li>Press &#8220;Next&#8221;.</li>
<li>Nothing to change on this screen, so press &#8220;Next&#8221; again.</li>
<li>Change the audio settings to suit your own configuration. If you are using an ordinary stereo setup, you can leave pretty much all of this unchanged, however I&#8217;d recommend adjusting the &#8220;Master Mixer Volume&#8221; to 100 and the &#8220;PCM Mixer Volume&#8221; to 80 or 90 (don&#8217;t set PCM to 100 as some motherboards will output scratchy/distorted audio depending on the quality of your on-board sound hardware).</li>
<li>Press &#8220;Next&#8221; through the next four screens.</li>
<li>Press &#8220;Finish&#8221;. You will be returned to the Setup menu.</li>
</ol>
<p><em>Special setup: Configuring your MythTV Frontend to output digital audio via SP/DIF on the PC&#8217;s motherboard.</em></p>
<ol>
<li>By default, motherboards with on-board SP/DIF out generally have their output muted, and as a result you will not see any laser light from any toslink cable connected to the motherboard. Unless you&#8217;re lucky, 9 times out of 10, the SP/DIF controls will <em>not</em> appear in the graphical Volume Control applet. To get around this, open a terminal.<br />
.</li>
<li>Now type in &#8220;alsamixer&#8221; and you will be presented with a terminal version of the Volume Control applet.<a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/AlsaMixer1.jpg" target="_blank"><br />
<img title="Alsa Mixer initial screen" src="http://www.serenux.com/~hyrax/snaps/AlsaMixer1_thumb.jpg" alt="Click for full size" /><br />
</a>Click for full size (56K)<a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/AlsaMixer1.jpg" target="_blank"><br />
</a>.<a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/AlsaMixer1.jpg" target="_blank"></a></li>
<li>Now press the right-arrow key until you come across any &#8220;IEC958&#8243; related options. There will generally be two or three entries. You will probably find they have &#8220;MM&#8221; above them which means they are Muted.<br />
<a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/AlsaMixer2.jpg" target="_blank"><img title="Alsa Mixer - SPDIF output muted" src="http://www.serenux.com/~hyrax/snaps/AlsaMixer2_thumb.jpg" alt="Click for full size" /><br />
</a> Click for full size (50K)<a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/AlsaMixer2.jpg" target="_blank"><br />
</a>.<a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/AlsaMixer2.jpg" target="_blank"><br />
</a></li>
<li>Press the M key on your keyboard to toggle the Mute status of that option so that it now shows &#8220;OO&#8221; instead. This means it is no longer muted.<br />
<a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/AlsaMixer3.jpg" target="_blank"><img title="Alsa Mixer - SPDIF output unmuted" src="http://www.serenux.com/~hyrax/snaps/AlsaMixer3_thumb.jpg" alt="Click for full size" /><br />
</a> Click for full size (51K)<a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/AlsaMixer3.jpg" target="_blank"><br />
</a>.</li>
<li>If you&#8217;re looking at your toslink cable, you should now see the fibre optic line in it light up with red laser light as you unmute it. You&#8217;re done, so press ESC to close the Alsa Mixer interface.</li>
<p style="text-align: center;">
</ol>
<p>Now choose &#8220;Appearance&#8221; from the menu.</p>
<ol>
<li>You can now choose a different theme from here which makes the interface look more attractive than the default theme. My personal favourite is &#8220;Blootube&#8221; and &#8220;Blootube Wide&#8221;.</li>
<li>If you are using 3D-enabled video drivers such as the NVidia binary drivers, you can elect to change the Paint Engine to OpenGL which will do nice crossfade transitions from one menu to another (note that there are <em>no</em> 3D transitions).</li>
<li>I also change the &#8220;Menu theme&#8221; here to &#8220;classic&#8221; as I believe it provides a more intuitive menu tree within MythTV. I encourage you to explore these options and choose what works best for you.</li>
<li>Page the &#8220;Next&#8221; button until you get to the end and then click &#8220;Finish&#8221;.</li>
<li>If you&#8217;ve chosen a new theme, it will now be scaled appropriately for your display and switched over.</li>
</ol>
<p>You are now ready to begin watching TV, but you may want to quickly duck back into Setup-&gt;Playback OSD and change the theme there to &#8220;Blootube&#8221; or whatever you prefer as well as the On-Screen-Display when watching TV has a separate theme setting to the menus.</p>
<p>To watch TV, simply choose &#8220;TV&#8221; and then &#8220;Watch TV&#8221; from the MythTV menu. Use the up and down arrow keys and Enter to change channels.</p>
<p>Examples of the Blootube-themed main menu and TV OSD (on a full high definition display):</p>
<p style="text-align: center;"><a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/MythTVInterface1.jpg" target="_blank"><img title="The main MythTV menu for watching TV, using the Blootube theme" src="http://www.serenux.com/~hyrax/snaps/MythTVInterface1_thumb.jpg" alt="Click for full size" /></a><br />
Click for full size (135K)</p>
<p style="text-align: center;"><a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/MythTVInterface2.jpg" target="_blank"><img title="The Blootube theme OSD watching live HDTV" src="http://www.serenux.com/~hyrax/snaps/MythTVInterface2_thumb.jpg" alt="Click for full size" /></a><br />
Click for full size (384K)</p>
<p><span style="color: #0000ff;"><em><strong><span style="text-decoration: underline;">Using MythWeb</span></strong></em></span></p>
<p>MythWeb is completely automatically configured. Using our installation example Backend host IP of 192.168.0.10, you can access it by opening your web browser and surfing over to <em>http://192.168.0.10/mythweb</em> and you will be presented with the main menu of MythWeb.</p>
<p>Being a web site, MythWeb is obscenely easy and self-explanatory to get around, so I won&#8217;t detail any of its most common functions here. I encourage you to explore the interface.</p>
<p style="text-align: center;"><a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/MythWebWelcome.jpg" target="_blank"><img title="The MythWeb home page" src="http://www.serenux.com/~hyrax/snaps/MythWebWelcome_thumb.jpg" alt="Click for full size" /></a><br />
Click for full size (99K)</p>
<p>One particularly useful feature of MythWeb is in getting the Digitech generic remote to work. Out of the box, I only found the direction and OK buttons to work right away. All the other buttons generate keyboard presses that do not coincide with MythTV&#8217;s default keys. For example, the Play/Pause key on the remote generates &#8220;CTRL + P&#8221; instead of just &#8220;P&#8221;, hence MythTV doesn&#8217;t act on the button press.</p>
<ol>
<li>To reconfigure key binds, all you have to do is click on the &#8220;Settings&#8221; option on the main menu.<br />
.</li>
<li>Now click on &#8220;Key Bindings&#8221; in the presented options.</li>
<p style="text-align: center;"><a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/MythKeybinds1.jpg" target="_blank"><img title="MythWeb Key Bindings menu option" src="http://www.serenux.com/~hyrax/snaps/MythKeybinds1_thumb.jpg" alt="Click for full size" /></a><br />
Click for full size (116K)<br />
.</p>
<li>You are presented with all the available keybinds for various areas of MythTV. Scroll down the list until you find the keys pertaining to &#8220;TV Frontend&#8221; (first column).<br />
.</li>
<li>Now locate the key bind related to &#8220;PLAYBACK &#8211; Play Program&#8221; (second and third columns). You will notice that the key assigned (in the fourth column) already is &#8220;P&#8221;.</li>
<p style="text-align: center;"><a title="Click for full size" href="http://www.serenux.com/~hyrax/snaps/MythKeybinds2.jpg" target="_blank"><img title="Locating and changing a key binding for MythTV" src="http://www.serenux.com/~hyrax/snaps/MythKeybinds2_thumb.jpg" alt="Click for full size" /></a><br />
Click for full size (135K)<br />
.</p>
<li>To add the CTRL + P key combination without erasing the original &#8220;P&#8221; key, simply change the text box to read &#8220;P, Ctrl+P&#8221;. This binds both the P and CTRL + P key combinations to the Playback command.</li>
<li>Change all the other keys you need to change or add.</li>
<li>When done, scroll right to the very bottom of the key binds page and click on the &#8220;Save&#8221; button.</li>
<li>Restart the Frontend to read in your new changes and test the remote.</li>
</ol>
<p>This is what the Digitech generic MCE remote looks like:</p>
<p style="text-align: center;"><a title="Click for full size" href="http://www.serenux.com/~hyrax/pics/MythTV/DigitechRemote.jpg" target="_blank"><img title="The Digital Generic MCE remote control and USB receiver" src="http://www.serenux.com/~hyrax/pics/MythTV/DigitechRemote_thumb.jpg" alt="Click for full size" /></a><br />
Click for full size (116K)</p>
<p><span style="color: #0000ff;"><span style="text-decoration: underline;"><em><strong>OPTIONAL: Setting up the Shepherd Electronic Program Guide (EPG)<br />
</strong></em></span></span></p>
<p>Shepherd is an amazing Perl script that enhances and keeps your EPG data up to date in Myth, always providing better information about programs than the networks themselves do. A typical example of a poor network-supplied program description might be <em>&#8220;Late Movie: 10:30pm &#8211; Pirates of the Carribean starring Johnny Depp&#8221;</em> and&#8230; that&#8217;s it. How boring! Shepherd will use a grading system as well as sourcing categories of data from different sites in order to provide you a comprehensive description of all your programs instead. In the case of the above example, it would go to the IMDB and get the official movie blurb to use instead.</p>
<p><em><strong>NOTE: Shepherd is geared towards Australian MythTV users only. This is due to long-running (and petty) legal disputes over EPG supply and copyright in this country. If you are outside of Australia, you most likely already have a proper EPG provided for you and you should use that instead.</strong></em></p>
<p>Setting up Shepherd is trivial (Shepherd was up to version 1.3.39 at the time of this writing &#8211; refer to the <a title="Official Shepherd Installation Page" href="http://svn.whuffy.com/index.cgi/wiki/Installation" target="_blank">official installation page</a> for any changes made to the installation process since).</p>
<ol>
<li>Open a terminal and type in the following:
<pre><span style="color: #000080;">$ wget http://www.whuffy.com/shepherd/shepherd</span></pre>
<p>&#8230;and press Enter. This will grab the latest version of the Shepherd Perl script.<br />
.</li>
<li>Before we run it, we need to install some dependencies:
<pre><span style="color: #000080;">$ sudo apt-get install xmltv libxml-simple-perl libjavascript-perl \
libalgorithm-diff-perl libgetopt-mixed-perl libcompress-zlib-perl \
libdata-dumper-simple-perl libdate-manip-perl liblist-compare-perl \
libdatetime-format-strptime-perl libhtml-parser-perl libxml-dom-perl \
libgd-gd2-perl libdigest-sha1-perl libarchive-zip-perl \
libio-string-perl libdbi-perl</span></pre>
<p>&#8230;and hit Enter.<br />
.</li>
<li>Once all that is installed, now run the Shepherd setup script with the command:
<pre><span style="color: #000080;">$ perl shepherd</span></pre>
<p>&#8230;and hit Enter.<br />
.</li>
<li>Shepherd will initially re-install itself into the &#8220;mythtv&#8221; user&#8217;s home directory, ie: /home/mythtv, and re-run itself.</li>
<li>Shepherd will then begin checking itself to ensure all its data grabbers are the latest versions and download any that are missing. It will then prompt you through the rest of the installation process, which is generally straight forward, but we&#8217;ll step through it here:</li>
<li>First you are asked for a region code and are shown a giant list. Type in the number relevant to you and hit Enter. Eg: if you lived in Melbourne, Victoria, you would type in &#8220;94&#8243; as the code associated with that region. If you were in Sydney, you&#8217;d type in &#8220;73&#8243; instead.</li>
<li>Next you are asked if you would like Guided Channel Selection. Say YES (or just hit Enter as the default response is yes anyway).</li>
<li>You will then be asked if you have High-Definition TV. If you do use HDTV channels, you should say YES to this.</li>
<li>You are then asked if you have PayTV. If you are only configuring MythTV for Free-to-Air TV, say NO to this.</li>
<li>Now MythTV will ask you to match the known channels for your region to the channels that are setup in your MythTV installation. It will prompt you for each channel one by one. Simply enter the number corresponding to the guide data source you believe belongs to the currently displayed channel, eg: in some country areas, Channel Nine is known as WIN, so any references to &#8220;Channel Nine&#8221; you would tell Shepherd to use guide data provided by WIN. Repeat this until all channels have been prompted for. You may come across some doubled-up channels. This is normal.</li>
<li>When finished, Shepherd will list all your selections so you can verify them. When you are happy, respond YES.</li>
<li>You will then be asked about transitioning from an old grabber. Since this is a fresh installation, choose the zero (&#8220;do not transition&#8221;) option.</li>
<li>You will be given one more review and will then be asked if you&#8217;d like Shepherd to create a configuration file and update MythTV. Say YES.</li>
<li>When prompted about allowing Shepherd to auto-configure MythTV, say YES.</li>
<li>When prompted for Shepherd to create a symbolic link, say YES.</li>
<li>When prompted about the cron job Shepherd sets up, say YES.</li>
<li>Respond YES to the review question.</li>
<li>Shepherd will then begin testing its components and will eventually ask if you would like to install channel icons. This is not necessary (though you can complete it if you really like), so say NO to this.</li>
<li>Shepherd will finish.</li>
<li>Now we need to populate the EPG using Shepherd for the first time. Note that the initial run can take potentially an hour or more to run depending on your connection and quantity of channels in MythTV to find data for. Once finished, however, each subsequent run (once per hour, 24 hours) should be much faster. To run it for the first time manually, simply type in:
<pre><span style="color: #000080;">$ mythfilldatabase</span></pre>
<p>&#8230;and hit Enter.<br />
.</li>
<li>Depending on the minute that Shepherd setup for the cron job, you may find that as you try to run it manually, Shepherd advises that &#8220;another instance is running&#8221; and will abort itself. That&#8217;s fine &#8211; the job&#8217;s already started then automatically.</li>
<li>When Shepherd has completed its run, you will find that your EPG within MythTV is now nicely populated with highly descriptive blurbs and will remain so for at least 7-8 days ahead as long as the PC has a connection to the Internet.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2009/06/howto-build-a-mythtv-box-from-scratch-using-ubuntu-jaunty-904/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
