<?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; Linux</title>
	<atom:link href="http://www.serenux.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serenux.com</link>
	<description>Life, the Universe and Ubuntu.</description>
	<lastBuildDate>Tue, 10 Jan 2012 06:59:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HowTo: Fix slow password prompting when doing SSH logins</title>
		<link>http://www.serenux.com/2011/10/howto-fix-slow-password-prompting-when-doing-ssh-logins/</link>
		<comments>http://www.serenux.com/2011/10/howto-fix-slow-password-prompting-when-doing-ssh-logins/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 02:57:25 +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[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=793</guid>
		<description><![CDATA[You may notice on some systems you build that when you SSH into them, there seems to be a long delay before the system prompts you for your password. In a time-sensitive situation, this gets real frustrating, real fast. Here&#8217;s how to fix it. The issue is caused by the box you are SSHing into [...]]]></description>
			<content:encoded><![CDATA[<p>You may notice on some systems you build that when you SSH into them, there seems to be a long delay before the system prompts you for your password. In a time-sensitive situation, this gets real frustrating, real fast.</p>
<p>Here&#8217;s how to fix it.</p>
<p><span id="more-793"></span>The issue is caused by the box you are SSHing into trying to resolve your IP address to a DNS name for the logs. We don&#8217;t really need this (especially for non-public servers), so we may as well disable it, drastically speeding up the time it takes for the box to prompt you for your password in the process (so drastic it becomes instant, in fact).</p>
<ol>
<li>Login to your box as normal via SSH.<br />
.</li>
<li>Type in at the dollar prompt:
<pre><span style="color: #000080;">$ sudo nano /etc/ssh/ssh_config</span></pre>
</li>
<li>A text editor showing you the SSH server config will appear. Scroll right to the very bottom of the file.<br />
.</li>
<li>Now add the following line in (indent it to match the existing lines with a few spaces at the front):
<pre><span style="color: #000080;">UseDNS no</span></pre>
</li>
<li>Save your changes by pressing CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>Restart the SSH server with the following command (won&#8217;t affect your existing session):
<pre><span style="color: #000080;">$ sudo service ssh restart</span></pre>
</li>
<li>Log out and test logging in via SSH again. This time the password prompt will appear immediately.<br />
.</li>
<li>Pat yourself on the back. You&#8217;re done.</li>
</ol>
<p>This fix applies to any version of Ubuntu (or just about any distro, for that matter).</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2011/10/howto-fix-slow-password-prompting-when-doing-ssh-logins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Create a Diskless workstation that boots from PXE using Ubuntu</title>
		<link>http://www.serenux.com/2011/04/howto-create-a-diskless-workstation-that-boots-from-pxe-using-ubuntu/</link>
		<comments>http://www.serenux.com/2011/04/howto-create-a-diskless-workstation-that-boots-from-pxe-using-ubuntu/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 13:25:04 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Hard-Drive]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[MythTV]]></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=772</guid>
		<description><![CDATA[Diskless booting is where a PC starts up purely from a network connection. It does not have a physical hard-drive in it to start from in the traditional manner. Why would you want to do this? Well, say for example you have a MythTV Frontend PC. For the most part, most Frontends are dedicated PC&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Diskless booting is where a PC starts up purely from a network connection. It does not have a physical hard-drive in it to start from in the traditional manner.</p>
<p>Why would you want to do this? Well, say for example you have a MythTV Frontend PC. For the most part, most Frontends are dedicated PC&#8217;s connected to a TV or projector that are not used for any other purpose, so technically there is really no need to have a hard-drive inside one as nothing new will ever be stored (all the media is streamed from the Backend server). There&#8217;s also the added bonus of less noise by not having a hard-drive installed.</p>
<p>Another good example of using a Diskless boot environment is for performing offline virus scans of Windows based PC&#8217;s in a safe environment that is not Windows, using tools like ClamAV. In a corporate environment, having a &#8220;normal&#8221; installation makes it easier to setup default settings that normally don&#8217;t suit booting up from an Ubuntu Live CD, such as corporate Proxy settings. Making a Diskless Boot setup is far easier than creating a customised Live CD in this instance.</p>
<p>So how exactly do you create a diskless booting PC?</p>
<p><span id="more-772"></span><strong><em>Pre-requisites:</em></strong></p>
<ul>
<li>First up, you need a working PXE server. If you haven&#8217;t built one yet, you can refer to my <a title="HowTo: Setup your own PXE Boot Server using Ubuntu" href="http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/" target="_blank">previous tutorial on how to build one</a>.</li>
<li>Sufficient space to store a typical Ubuntu Desktop install. I would recommend having at least 10GB free to allow space for both the OS and any additional apps you might install.</li>
<li>A PC that you will using as your diskless machine that has the ability to boot from PXE.</li>
<li>A temporary hard-drive for your diskless machine that we will be using to do our initial build on.</li>
<li>A fast network. Diskless booting is only useful if your network can transfer data quickly. I would recommend that you use a gigabit network.</li>
<li>It is recommended to have at least 2GB RAM on your diskless PC, primarily because we will not be running a swap file or swap partition (swapping over a network connection is just silly).</li>
<li>Ubuntu 10.04.2 LTS was used for this tutorial, but you should be able to use just about any release of Ubuntu. Note: The version of Ubuntu on your PXE server and the version of Ubuntu you are turning into diskless boot does <span style="text-decoration: underline;">not</span> have to be the same version, but I would recommend using 10.04.2 LTS or later.</li>
</ul>
<p><strong><em>What to do:</em></strong></p>
<ol>
<li>First up, install the temporary hard-disk into your PC that is going to become diskless. You can attach it in the traditional way or connect it via USB.<br />
.</li>
<li>Perform a normal installation of Ubuntu Desktop Edition onto the hard-drive of your PC.<br />
.</li>
<li>Once installed, update the system with any outstanding system updates.<br />
.</li>
<li>Install any additional apps you wish to utilise on this machine, such as MythTV.<br />
.</li>
<li>Once you are satisfied that your installation is setup the way you want it, we need to prepare the installation to be able to boot via PXE. Start by opening up a terminal and type in the following commands:
<pre><span style="color: #000080;">$ cd ~
$ sudo nano /etc/initramfs-tools/initramfs.conf</span></pre>
</li>
<li>You will now be looking at a text configuration file in the Nano text editor. This is the configuration file that controls how the boot-time RAM disk image is created. We need to modify it so that we can create a PXE-ready version of the RAM disk image instead of the usual type. Scroll down until you find the configuration line that looks like:
<pre><span style="color: #000080;">MODULES=most</span></pre>
<p>&#8230;and modify it so that is now looks like:</p>
<pre><span style="color: #000080;">MODULES=netboot</span></pre>
</li>
<li>Scroll down a little further until you see the line:
<pre><span style="color: #000080;">BOOT=local</span></pre>
<p>&#8230;and change it to read:</p>
<pre><span style="color: #000080;">BOOT=nfs</span></pre>
</li>
<li>Press CTRL+X, then &#8220;Y&#8221; and then &#8220;Enter&#8221; to save your changes. You will be returned to the Terminal prompt.<br />
.</li>
<li>Now let&#8217;s create our custom RAM Disk image using the following command:
<pre><span style="color: #000080;">$ sudo mkinitramfs -o ./initrd.img</span></pre>
</li>
<li>Once that has finished, we also need an unmodified copy of the current kernel you are running:
<pre><span style="color: #000080;">$ cp /boot/vmlinuz-`uname -r` ./vmlinuz</span></pre>
</li>
<li>Now we need to prep the server. First up, we need to setup a way to transfer our temporary hard-disk contents to the PXE server, and we also need to ready how the PXE server will serve the data to the diskless workstation when booting. We will be using the Network FileSystem or NFS for short. On your Ubuntu PXE Server, open a terminal and type in the following:
<pre><span style="color: #000080;">$ sudo apt-get install nfs-kernel-server</span></pre>
</li>
<li>Once the NFS server is installed, we need to setup the directory that will store and serve the Diskless system&#8217;s files. Assuming you have all your PXE related data under /srv/tftp, let&#8217;s create the following for our Diskless station data:
<pre><span style="color: #000080;">$ sudo mkdir -p /srv/nfs/disklessboot</span></pre>
</li>
<li>Now let&#8217;s tell the NFS server about this new directory:
<pre><span style="color: #000080;">$ sudo nano /etc/exports</span></pre>
</li>
<li>In the text file that appears in the Nano text editor, scroll to the bottom of the file and add the following line:
<pre><span style="color: #000080;">/srv/nfs/disklessboot          *(rw,no_root_squash,async)</span></pre>
<p>The above will allow read/write access to the path /srv/nfs/disklessboot on your PXE server from any incoming IP address.</li>
<li>Save your changes by pressing CTRL+X, then &#8220;Y&#8221; and then &#8220;Enter&#8221;.<br />
.</li>
<li>Now activate the new NFS share by using the following command:
<pre><span style="color: #000080;">$ sudo exportfs -a</span></pre>
</li>
<li>We&#8217;re nearly there! Now we just need to transfer the contents of our temporary workstation hard-drive to the new NFS share. On your soon-to-be-diskless PC (<span style="text-decoration: underline;">not</span> the server), and assuming that your PXE server&#8217;s IP address is 192.168.0.10, type the following in a Terminal:
<pre><span style="color: #000080;">$ mkdir /dev/shm/nfs
$ sudo mount -t nfs -onolock 192.168.0.10:/srv/nfs/disklessboot /dev/shm/nfs</span></pre>
<p>The above will create a directory in your RAM disk to mount the PXE server&#8217;s NFS share on and the second command will mount the NFS share /srv/nfs/disklessboot in the directory you just created in your RAM disk locally, thus allowing you to now read and write data to that NFS share by using /dev/shm/nfs locally.</li>
<li>Now let&#8217;s copy the OS files from the temporary hard-disk to the PXE server&#8217;s NFS share:
<pre><span style="color: #000080;">$ sudo cp -avx /. /dev/shm/nfs/.
$ sudo cp -avx /dev/. /dev/shm/nfs/dev/.</span></pre>
<p>The above commands will take a minute or two to finish and will show you a giant list of files being copied.</li>
<li>We are now done with the soon-to-be-diskless PC, so shut it down and remove your temporary hard-drive.<br />
.</li>
<li>Go back to your server and type in the following at the Terminal prompt:
<pre><span style="color: #000080;">$ sudo mkdir -p /srv/tftp/disklessboot
$ sudo cp /srv/nfs/disklessboot/home/USERNAME/vmlinuz /srv/tftp/disklessboot/
$ sudo cp /srv/nfs/disklessboot/home/USERNAME/initrd.img /srv/tftp/disklessboot/</span></pre>
<p>Note: Replace USERNAME above with whatever your username was on the temporary hard-disk setup, eg: &#8220;/home/jbloggs/&#8221;)</li>
<li>We now need to change the network setup of the diskless boot install so that it doesn&#8217;t try to configure itself with a new IP address on boot (since it&#8217;ll already have one when you do the initial PXE boot):
<pre><span style="color: #000080;">$ sudo nano /srv/nfs/disklessboot/etc/network/interfaces</span></pre>
</li>
<li>Look for a reference to &#8220;eth0&#8243; which is your first ethernet adapter. It will generally be the last line in the file and may look like:
<pre><span style="color: #000080;">auto eth0</span></pre>
<p>&#8230;or:</p>
<pre><span style="color: #000080;">iface eth0 inet dhcp</span></pre>
</li>
<li>Once you locate it, comment out that line by putting a hash symbol at the front like so:
<pre><span style="color: #000080;">#auto eth0</span></pre>
<p>&#8230;or:</p>
<pre><span style="color: #000080;">#iface eth0 inet dhcp</span></pre>
</li>
<li>Now add a new line with the following:
<pre><span style="color: #000080;">iface eth0 inet manual</span></pre>
</li>
<li>Save your changes with CTRL+X, then &#8220;Y&#8221; and then &#8220;Enter&#8221;.<br />
.</li>
<li>Now we need to ensure that the devices mounted by your diskless booting PC do not try to mount physical disk devices for things like /home and the root filesystem. Type in the following command:
<pre><span style="color: #000080;">$ sudo nano /srv/nfs/disklessboot/etc/fstab</span></pre>
</li>
<li>Once in the text editor, DELETE EVERYTHING and replace it all with the following:
<pre><span style="color: #000080;">proc            /proc           proc    defaults        0       0
/dev/nfs        /               nfs     defaults        1       1
none            /tmp            tmpfs   defaults        0       0
none            /var/run        tmpfs   defaults        0       0
none            /var/lock       tmpfs   defaults        0       0
none            /var/tmp        tmpfs   defaults        0       0</span></pre>
</li>
<li>Save your changes with CTRL+X, then &#8220;Y&#8221; and then &#8220;Enter&#8221;.<br />
.</li>
<li>That&#8217;s the Diskless setup ready to go. All that we now need to do is configure the PXE boot menu to give you an option to boot Diskless. To do this, edit your PXE boot menu configuration file. Assuming you called it /srv/tftp/mybootmenu.cfg, type in the following:
<pre><span style="color: #000080;">$ sudo nano /srv/tftp/mybootmenu.cfg</span></pre>
</li>
<li>In the text editor, scroll down to the bottom of your configuration file and add the following lines:
<pre><span style="color: #000080;">label My Diskless Boot PC
   kernel disklessboot/vmlinuz
   append initrd=disklessboot/initrd.img root=/dev/nfs nfsroot=192.168.0.10:/srv/nfs/disklessboot ip=dhcp rw</span></pre>
<p>The above menu configuration will tell PXE to load the kernel and custom RAM disk image from the TFTP directory and then transfer control of the boot process to the OS files located in /srv/nfs/disklessboot which will be mounted on the diskless system at /dev/nfs as the root filesystem.</li>
<li>Save your changes by pressing CTRL+X, then &#8220;Y&#8221; and then &#8220;Enter&#8221;.<br />
.</li>
<li>Finally, make sure that the TFTP daemon can read the new files you added to it with the following command:
<pre><span style="color: #000080;">$ sudo chmod 777 -R /srv/tftp</span></pre>
</li>
<li>That&#8217;s it! You are now ready to boot! Turn on your now-diskless PC and tell it to boot from PXE. When the PXE boot menu appears, choose &#8220;My Diskless Boot PC&#8221; and watch in wonder and amazement as Ubuntu boots up without a hard-disk as if by magic!</li>
</ol>
<p>NOTE: Whilst the Diskless PC will boot and operate much like any ordinary PC and in fact you can indeed perform future system updates this way, be aware that the kernel itself will NOT get automatically updated. Newer kernels will get installed to the NFS mount as you would expect, however the kernel actually boots from your TFTP directory, not the NFS share, so if you do update the kernel in future, you must create a new RAM disk image manually as per step 9 and copy both it and the new kernel file into your TFTP&#8217;s directory (in this case /srv/tftp/disklessboot/) otherwise your updated system will not boot anymore. Alternatively, simply allow all updates to be performed <span style="text-decoration: underline;">except</span> for kernel updates.</p>
<p>Finally, hardware drivers: If you install the NVidia proprietary drivers for your Diskless Boot system, ensure that you don&#8217;t try to boot other systems that do not contain NVidia graphics hardware otherwise X will break. The reason for this is that the NVidia driver installation makes a number of changes to system-level libraries to work, effectively binding that system to NVidia graphics-based systems only. If you intend to use your Diskless setup on multiple hardware platforms, such as NVidia, Intel and ATi, do not install the proprietary NVidia (or ATi) driver.</p>
<p>Enjoy! <img src='http://www.serenux.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2011/04/howto-create-a-diskless-workstation-that-boots-from-pxe-using-ubuntu/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>HowTo: Automatically determine your public IP address and email it periodically</title>
		<link>http://www.serenux.com/2011/03/howto-automatically-determine-your-public-ip-address-and-email-it-periodically/</link>
		<comments>http://www.serenux.com/2011/03/howto-automatically-determine-your-public-ip-address-and-email-it-periodically/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 11:57:07 +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[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=763</guid>
		<description><![CDATA[Let&#8217;s say you are running a poor man&#8217;s website where you are just testing stuff but have no real intention of buying a domain name or paying your ISP to give you a static IP address. If you want to access your test site remotely, you need to know your public IP address, however your [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you are running a poor man&#8217;s website where you are just testing stuff but have no real intention of buying a domain name or paying your ISP to give you a static IP address.</p>
<p>If you want to access your test site remotely, you need to know your public IP address, however your home ISP gives you a dynamic public IP address and every time you have a power failure, or reboot your router, you are assigned a brand new public IP address. This makes it very annoying if you are testing your site remotely.</p>
<p>Sure, you could use a Dynamic DNS service to keep track of when your public IP address changes, but what if you have a paranoid client who does not want to use even Dynamic DNS? How do you keep track of your new public IP without having to get to your internal network to read it each time?</p>
<p>What you need is a way to be able to have the system send you an email with your current public IP address so that there is no guess work involved. But how do we do this?</p>
<p><span id="more-763"></span>To determine your public IP, you need to have an external site to refer to which will record your public IP as connecting to it. You could use services such as What Is My IP or similar, but we don&#8217;t want to rely on an external <em>service</em>, nor do we want to hammer a third-party service with requests. Basically we just want to replicate the functionality of such a site as locally as possible and then use an email tool to send the information to you in a message.</p>
<p>Pre-requisites:</p>
<ul>
<li>Access to a web space outside of your working space with an IP or address that does not change. Generally every ISP out there will grant you some small quantity of complimentary web space to store some files. If you are working for clients like I am, you can use your own server if you like (after all, this blog is served from a fixed IP with a domain name attached to it).</li>
<li>A PHP interpreter in your web space&#8217;s host. If you are using your own static host on Ubuntu, Apache 2 from a normal Ubuntu install be it Desktop or Server, then you should have the PHP interpreter installed by default. If not, then install the <em>php5</em> package.</li>
<li>If using your own static server, you will need a web server such as Apache installed on it to serve the PHP we&#8217;ll be creating.</li>
</ul>
<p>Now let&#8217;s look at using a simple bit of PHP to obtain the address of the connecting host.</p>
<ol>
<li>On your external static web space (not your local dynamic site), create a new text file somewhere readily available called <em>getmypublicip.php</em> or similar.<br />
.</li>
<li>In your favourite text editor, copy and paste in the following PHP code:
<pre><span style="color: #000080;">&lt;?php
$ip = getenv("REMOTE_ADDR");
echo $ip;
?&gt;</span></pre>
</li>
<li>Save your changes and exit the text editor.<br />
.</li>
<li>Test your new PHP file by referring to it from your ISP&#8217;s webspace, eg: If your ISP&#8217;s website was called <em>myisp.com</em> and you had a login called &#8220;noddy&#8221;, then the address to your webspace might be <em>http://www.myisp.com/~noddy/getmypublicip.php</em>, so type that in your web browser, which is usually the path most ISP&#8217;s use.<br />
.</li>
<li>When you go to that URL, the PHP on the remote side should parse the referring public IP address and echo it to the page. In this case, because you are referring yourself, you should see your own public IP address (let&#8217;s say it&#8217;s <em>74.125.237.84</em> for the purposes of this guide) printed at the top-left of the web browser page. If you ran this PHP locally, you would get the internal IP of the connecting host instead, eg: <em>192.168.0.100</em> or similar instead.<br />
.</li>
<li>Awesome, so now how do we email this newly obtained information to ourselves? Simple. We will make use of a neat little command line tool called <em>sendemail</em> (not to be confused with the venerable <em>sendmail</em>). It&#8217;s not installed in Ubuntu by default, so install it with:
<pre><span style="color: #000080;">$ sudo apt-get install sendemail</span></pre>
</li>
<li>Let&#8217;s create the script that will use sendemail. On your local test website, create a new text file outside of your web-accessible directories, eg: <em>/home/noddy/getpublicip.sh</em> using your favourite text editor.
<pre><span style="color: #000080;">$ nano /home/noddy/getpublicip.sh</span></pre>
</li>
<li>In the text editor, copy and paste the following in:
<pre><span style="color: #000080;">#!/bin/bash
wget -O- http://www.myisp.com/~noddy/getmypublicip.php 2&gt;/dev/null |  sendemail -u "Client's public IP address" -f test@blah.com -t noddy@mycompany.com -s mail.mycompany.com</span></pre>
</li>
<li>Save your changes and exit your text editor.<br />
.</li>
<li>Now test your script my manually running it using the following command:
<pre><span style="color: #000080;">$ sh /home/noddy/getpublicip.sh</span></pre>
</li>
<li>Check your personal email. You should have received an email sent by <em>test@blah.com</em> containing a single line showing your public IP address!<br />
.</li>
<li>Now we need to setup the script to be executed periodically. We will setup a cron schedule to run our new bash script as follows:
<pre><span style="color: #000080;">$ crontab -e</span></pre>
</li>
<li>Your text editor will appear. In this, add the following line on the end:
<pre><span style="color: #000080;">0 * * * * sh /home/noddy/getpublicip.sh</span></pre>
</li>
<li>Save your changes and exit your text editor.<br />
.</li>
<li>Now wait. On the next whole hour, you should receive an email in your mailbox containing a single line with an IP address &#8211; your public IP address! Now you need never know what your private server&#8217;s public IP address is if it changes in the middle of the day &#8211; on the hour you will be told what it is!<br />
.</li>
<li>If you&#8217;d like to receive notification on a more regular basis, modify the cron schedule. For example, the following change to step 13 will make your system run the script every 15 minutes:
<pre><span style="color: #000080;"><strong>*</strong><strong>/15</strong> * * * * sh /home/noddy/getpublicip.sh</span></pre>
</li>
<li>That&#8217;s it! Pat yourself on the back. You&#8217;re done.</li>
</ol>
<p>NOTE: Some ISP&#8217;s do not allow connections on dynamic IP&#8217;s to send periodic email on their mail server and may block it on the belief that your emails may be spam. Should that be the case, you should install a local mail daemon such as Postfix and change the sendemail arguments to direct their mail to <em>localhost</em> instead, and allow Postfix to send the notification email. In Ubuntu, you can install Postfix by simply installing the <em>postfix</em> package and electing the server to be an &#8220;Internet Site&#8221;. The default configuration is fine, but not secure. Ensure that no-one externally can access port 25 on your client&#8217;s server if you choose to go down this route.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2011/03/howto-automatically-determine-your-public-ip-address-and-email-it-periodically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Monitor the progress of dd.</title>
		<link>http://www.serenux.com/2011/02/howto-monitor-the-progress-of-dd/</link>
		<comments>http://www.serenux.com/2011/02/howto-monitor-the-progress-of-dd/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 23:40:13 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Hard-Drive]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=757</guid>
		<description><![CDATA[The dd command is a tool used to pipe data in from a source to a destination. It has a multitude of uses ranging from creating large dummy files of a specific size to duplicating hard-drives sector by sector to another disk or to a backup file. It&#8217;s also useful for fixing problems with hard-drives [...]]]></description>
			<content:encoded><![CDATA[<p>The <em>dd</em> command is a tool used to pipe data in from a source to a destination. It has a multitude of uses ranging from creating large dummy files of a specific size to duplicating hard-drives sector by sector to another disk or to a backup file. It&#8217;s also useful for fixing problems with hard-drives that Windows refuses to deal with.</p>
<p>But we&#8217;re not looking at the virtues of <em>dd</em> here. We&#8217;re looking at its annoyances and <em>dd</em> has one particularly glaring annoyance &#8211; a lack of display of progress. You could tell <em>dd</em> to start imaging your multi-terabyte hard-drive and not have any indication of how far it has gone &#8211; you just have to wait until it finishes. The <em>dd</em> command only outputs some information right at the very end of its job, which could well be several hours later. The only indicator that you have that something is happening is your hard-drive light madly flashing away.</p>
<p>Luckily while <em>dd</em> doesn&#8217;t show progress during its tasks, it can be prodded externally to give up information about itself as it runs, and we can achieve that by using the <em>kill</em> command without actually killing the <em>dd</em> command&#8217;s execution.</p>
<p><span id="more-757"></span></p>
<p>Now the <em>kill</em> command doesn&#8217;t just terminate tasks. It can also send other standard POSIX signals to applications. Many applications are written to acknowledge certain signals and perform an action on receiving them. In the case of <em>dd</em>, there is one signal that will make it output its summary information to the console as though it had finished, but rather than terminate, it keeps on going. The signal in question is USR1.</p>
<p>Here&#8217;s how to make use of it:</p>
<ol>
<li>First we need a <em>dd</em> process running. Let&#8217;s say we are imaging our first fixed hard-drive <em>/dev/sda</em> to an image file called <em>MyHDDBackup.img</em> using the following command:
<pre><span style="color: #000080;">$ sudo dd if=/dev/sda of=/home/jbloggs/MyHDDBackup.img</span></pre>
</li>
<li>Now while that is running, open up a second terminal and type in the following followed by Enter:
<pre><span style="color: #000080;">$ sudo kill -USR1 `pgrep ^dd`
</span></pre>
<p>Breakdown of the above command:<em><br />
</em></p>
<ul>
<li><em>sudo</em> runs this command as root. In this case since we&#8217;re using <em>dd</em> as root, we also need to run the <em>kill</em> command as root or we won&#8217;t be able to send anything to <em>dd</em>.</li>
<li><em>kill</em> is the command we are using to send <em>dd</em> a signal with.</li>
<li><em>-USR1</em> is the signal we are sending to <em>dd</em>.</li>
<li><em>pgrep</em> is a program that will show you the process ID of a given application, in this case we use the argument &#8220;^dd&#8221; to say &#8220;locate any program that starts with the text &#8216;dd&#8217; only&#8221; otherwise we would get other processes that containg the letters &#8220;dd&#8221; together in their name if we left out the chevron character. Note that the <em>pgrep</em> command is enclosed in &#8220;`&#8221; quotes so that it is executed and returns just a process ID number to the <em>kill</em> command.</li>
</ul>
<p><span style="color: #000080;"> </span></li>
<li>Now have a look at the terminal that <em>dd</em> is running in. It has suddenly output some data about itself, specifically, how much of the task had been completed, but <em>dd</em> is still running! This is great &#8211; but how can we regularly have <em>dd</em> tell us where it&#8217;s up to without having to manually enter the above command each time? Simple, by combining it with the <em>watch</em> command:
<pre><span style="color: #000080;">$ watch 'sudo kill -USR1 `pgrep ^dd`'</span>
</pre>
<p>The <em>watch</em> command will will re-execute the <em>kill</em> command once every two seconds, giving you near-realtime status to what <em>dd</em> is doing. If you want to change how often the <em>watch</em> command polls for, you can change it with the <em>-n</em> parameter, for example to change the polling to every 5 seconds, you would use:</p>
<pre><span style="color: #000080;">$ watch -n5 'sudo kill -USR1 `pgrep ^dd`'</span></pre>
</li>
</ol>
<p>While not providing any means of showing you how long it will take for <em>dd</em> to ultimately finish, you can now make use of the transfer speed shown along with the data processed thus far and calculate a rough idea of when <em>dd</em> will complete its task now.</p>
<p>Pat yourself on the back. You can now rest easy knowing that you can find out at anytime where <em>dd</em> is up to. <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/2011/02/howto-monitor-the-progress-of-dd/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HowTo: Configure an APC UPS to communicate with your Ubuntu Desktop or Server</title>
		<link>http://www.serenux.com/2011/01/howto-configure-an-apc-ups-to-communicate-with-your-ubuntu-desktop-or-server/</link>
		<comments>http://www.serenux.com/2011/01/howto-configure-an-apc-ups-to-communicate-with-your-ubuntu-desktop-or-server/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 12:32:27 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lucid]]></category>
		<category><![CDATA[Recovery]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=749</guid>
		<description><![CDATA[It&#8217;s been a while since I&#8217;ve written something here, so time to break the drought. APC make some great UPS products and they all have the ability to communicate with a host PC to advise of its state, eg: on mains, on battery, fault, etc. The support software is available aplenty for Windows and Mac, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since I&#8217;ve written something here, so time to break the drought.</p>
<p>APC make some great UPS products and they all have the ability to communicate with a host PC to advise of its state, eg: on mains, on battery, fault, etc. The support software is available aplenty for Windows and Mac, but what about Linux?</p>
<p>This guide will show you how to hook up an APC UPS to an Ubuntu-based Desktop or Server PC and allow your UPS to email you when mains power has failed, when mains power has been restored, and also give your PC ample opportunity to shutdown when battery on the UPS gets to a critical low.</p>
<p><span id="more-749"></span><span style="text-decoration: underline;">Pre-requisites:</span></p>
<ul>
<li>Ubuntu-based PC. I am using Ubuntu 10.04 Lucid Lynx in this guide.</li>
<li>An APC UPS. I&#8217;m using a Back-UPS RS 800 in this guide.</li>
<li>Details about your ISP&#8217;s mail server, or your own local mail server.</li>
</ul>
<p><span style="text-decoration: underline;">Configuration:</span></p>
<ol>
<li>Setup your APC UPS as outlined in the instruction manual. Ensure that the USB or serial cable is connected from the UPS to the PC. This is what the UPS uses to communicate with the PC.<br />
.</li>
<li>On your Ubuntu PC, go into a Terminal. If you are using Ubuntu Desktop, you can do this by going to the Applications menu, then Accessories and then Terminal. If you are using Ubuntu Server, simply login to your server by the console or SSH in remotely.<br />
.</li>
<li>The Ubuntu repositories contain a UPS daemon specifically designed with APC UPS units in mind called APCUPSD, so let&#8217;s install it:
<pre><span style="color: #000080;">$ sudo apt-get install apcupsd</span></pre>
</li>
<li>Once installed, we need to configure it to suit your UPS. Bring up the configuration file by typing in:
<pre><span style="color: #000080;">$ sudo nano /etc/apcupsd/apcupsd.conf</span></pre>
</li>
<li>In the editor, scroll down to UPSNAME and give the UPS a name, eg:
<pre><span style="color: #000080;">UPSNAME MyAwesomeUPS</span></pre>
</li>
<li>Scroll down to UPSCABLE and change the parameter to the type of cable you are using to connect to your UPS. In my case, I use a USB cable that came with the UPS, so I changed this line to read:
<pre><span style="color: #000080;">UPSCABLE usb</span></pre>
</li>
<li>The next line to modify is the UPSTYPE line. Again, because I&#8217;m using USB I specify:
<pre><span style="color: #000080;">UPSTYPE usb</span></pre>
<p>If you have a DEVICE /dev/ttyS0 line after the UPSTYPE line, comment it out by adding a hash symbol at the start of the line like so:</p>
<pre><span style="color: #000080;">#DEVICE /dev/ttyS0</span></pre>
</li>
<li>We do not need to modify anything else, so press CTRL+X, then &#8220;Y&#8221; and then Enter to save your changes and exit the Nano text editor.<br />
.</li>
<li>Now we need to tell the system that the UPS daemon has been setup and is essentially ready to go. Type in:
<pre><span style="color: #000080;">$ sudo nano /etc/default/apcupsd</span></pre>
</li>
<li>In the file that appears, modify the ISCONFIGURED line to say Yes&#8221;, ie:
<pre><span style="color: #000080;">ISCONFIGURED=yes</span></pre>
</li>
<li>Press CTRL+X, then &#8220;Y&#8221; and then Enter to save your changes and exit.<br />
.</li>
<li>We&#8217;re pretty much done here. Start the daemon now with the following command:
<pre><span style="color: #000080;">$ sudo service apcupsd restart</span></pre>
<p>&#8230;or simply reboot your PC. Your PC is now monitoring the state of the UPS.<br />
.</li>
<li>Let&#8217;s check the UPS now. Type in the following command:
<pre><span style="color: #000080;">$ apcaccess</span></pre>
<p>&#8230;and you will get output similar to the following:</p>
<pre><span style="color: #000080;">$ apcaccess
APC      : 001,043,1045
DATE     : Tue Feb 01 00:02:36 EST 2011
HOSTNAME : lamaar
VERSION  : 3.14.6 (16 May 2009) debian
UPSNAME  : LAMAAR
CABLE    : USB Cable
MODEL    : Back-UPS BR  800
UPSMODE  : Stand Alone
STARTTIME: Mon Jan 31 23:43:37 EST 2011
STATUS   : ONLINE
LINEV    : 250.0 Volts
LOADPCT  :  40.0 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT :  19.9 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
OUTPUTV  : 230.0 Volts
SENSE    : Medium
DWAKE    : 000 Seconds
DSHUTD   : 000 Seconds
LOTRANS  : 194.0 Volts
HITRANS  : 264.0 Volts
RETPCT   : 000.0 Percent
ITEMP    : 29.2 C Internal
ALARMDEL : Always
BATTV    : 27.4 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x07000008 Status Flag
SERIALNO : xxxxxxxxxxxx  
BATTDATE : 2001-09-25
NOMOUTV  : 230 Volts
NOMINV   : 230 Volts
NOMBATTV :  24.0 Volts
NOMPOWER : 540 Watts
FIRMWARE : 9.o5 .I USB FW:o5
APCMODEL : Back-UPS BR  800
END APC  : Tue Feb 01 00:02:41 EST 2011
$</span></pre>
</li>
<li>Pat yourself on the back, you&#8217;re basically done.</li>
</ol>
<p>But hang on, what about setting up email notifications? Read on.</p>
<p><span style="color: #0000ff;"><em><strong>Setting up Email Notifications</strong></em></span></p>
<p>By default, APCUPSD is configured to use <em>sendmail</em> to send emails, but sendmail is finicky. There is a better way using a similar application called <em>send<strong>e</strong>mail</em> instead.</p>
<p>Why use sendemail instead of sendmail? Well, sendemail is a simple command-line SMTP client. You construct a simple message with a recipient and off it goes, but the key difference here is that sendemail is a CLIENT, not a SERVER. This means for sendemail to work, you need a third-party mail server to send it through. You may already have a mail server on your network running Postfix or similar. If not, your ISP will most certainly have one that you can use.</p>
<ol>
<li>Let&#8217;s start by installing sendemail:
<pre><span style="color: #000080;">$ sudo apt-get install sendemail</span></pre>
</li>
<li>Now we need to configure apcupsd to use it. If you have a look inside the /etc/apcupsd directory, you will see several important files as follows:
<ul>
<li><span style="color: #0000ff;">changeme</span> &#8211; notifies you if the UPS battery needs changing.</li>
<li><span style="color: #0000ff;">commfailure</span> &#8211; notifies you if the PC loses communication with the UPS.</li>
<li><span style="color: #0000ff;">commok</span> &#8211; notifies you if lost communication is restored with the UPS.</li>
<li><span style="color: #0000ff;">onbattery</span> &#8211; notifies you if the UPS engages battery mode due to mains power failure.</li>
<li><span style="color: #0000ff;">offbattery</span> &#8211; notifies you if the UPS returns to mains mode after a mains power failure.<br />
.</li>
</ul>
</li>
<li>Let&#8217;s modify the onbattery message:
<pre><span style="color: #000080;">$ sudo nano /etc/apcupsd/onbattery</span></pre>
</li>
<li>You will notice there are some lines in this file that define some variables followed by a message and then finally a command that sends an email using the sendmail app. Since we are not using sendmail, we need to modify a number of areas. Replace the content of the entire text file with the following:
<pre><span style="color: #000080;">#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when the UPS
# goes on batteries.
#
SYSADMIN=jbloggs@mydomain.com.au
APCUPSD_MAIL="/usr/bin/sendemail"
HOSTNAME=`hostname`
MSG="Ubuntu PC Power Failure !!!"
#
(
echo " "
echo " ====================================="
echo " POWER FAILURE ON $HOSTNAME !!"
echo " ====================================="
echo " "
echo " The UPS on your Ubuntu PC has experienced a power problem that has required the UPS to engage battery mode."
echo " "
echo " Do not panic! Remain calm..."
echo " "
echo "Current UPS status:"
echo " "
/sbin/apcaccess status
) | $APCUPSD_MAIL -u "$MSG" -f MyUbuntuPC@mydomain.com.au -t $SYSADMIN -s mail.myisp.com:25
exit 0</span></pre>
<p>So what have we done here? The first part of the file sets some variables, namely the email address(es) of the people required to be notified. If you need to send to more than one recipient, separate email addresses with a comma, eg:</p>
<pre><span style="color: #000080;">SYSADMIN=jbloggs@mydomain.com.au,fredsmith@thatotherdomain.com</span></pre>
<p>We then define the path to the sendemail app, the hostname of the PC running the UPS daemon, a subject line for the email in question, and then a big email body explaining what&#8217;s going on, in this case that the UPS battery mode has been engaged.</p>
<p>All this is then piped into the sendemail application with a fake sender&#8217;s address to give you an idea where it came from and we also specify the mail server that the email will be sent via. In this case, we are using our ISP&#8217;s mail server that has the address <em>mail.myisp.com</em><br />
.</li>
<li>Save your changes by pressing CTRL+X, then &#8220;Y&#8221; and then Enter.<br />
.</li>
<li>You can now test the script by simply executing it (we don&#8217;t have to disconnect the UPS&#8217; mains cable to trigger this until we&#8217;re ready to test that). Execute the file using the command:
<pre><span style="color: #000080;">$ sh /etc/apcupsd/onbattery</span></pre>
</li>
<li>Check for any errors and then check to see if you got an email in your mailbox advising that the UPS is on battery (the UPS of course is not, we&#8217;re just testing the email).<br />
.</li>
<li>If all is well, continue to change the other four message files to be similar to the above, changing the message as you go of course.<br />
.</li>
<li>Pat yourself on the back &#8211; you now have custom, explicit messages to let you know what&#8217;s going on with the UPS.</li>
</ol>
<p><span style="color: #0000ff;"><em><strong>Setting up your own mail server to use instead</strong></em></span></p>
<p>If, in your testing, you discover that your ISP&#8217;s mail server does not allow you to randomly spam messages to it using fake from addresses, you have two choices &#8211; either specify a valid email address as the sender&#8217;s address, or you can setup a simple email server of your own using Postfix:</p>
<pre><span style="color: #000080;">$ sudo apt-get install postfix</span></pre>
<p>In the case of setting up your own email server, simply go with Postfix and set it up as an &#8220;Internet Site&#8221;. The basic configuration is good enough to deal with our needs, but make sure your basic network security is adequate to prevent outsiders from trying to use your mail server to send unsolicited mails, or spam, through it.</p>
<p>This article will not describe how to setup or secure Postfix as it is beyond the scope of this article, however you do need to modify the outgoing mail server name in all your communication messages to reflect the change of name or internal IP address of your mail server instead of mail.myisp.com.</p>
<p><span style="color: #0000ff;"><em><strong>Testing</strong></em></span></p>
<p>You can test your daemon setup easily enough by doing any of the following:</p>
<ul>
<li>Remove mains power cable from UPS.</li>
<li>Remove the USB cable to the UPS.</li>
<li>Verify that an email is sent for either of the error conditions above.</li>
</ul>
<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/2011/01/howto-configure-an-apc-ups-to-communicate-with-your-ubuntu-desktop-or-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<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>
]]></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>17</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</span>
<span style="color: #000080;">$ sudo cp -av /media/cdrom/.disk /srv/ubuntu-livecd/i386</span><span style="color: #000080;">
$ 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>
</li>
</ol>
<ol>
<li>(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/tftp</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-boot/i386/vmlinuz
    append boot=casper netboot=nfs nfsroot=192.168.0.10:/srv/ubuntu-livecd/i386 initrd=ubuntu-livecd-boot/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-boot/amd64/vmlinuz
    append boot=casper netboot=nfs  nfsroot=192.168.0.10:/srv/ubuntu-livecd/amd64  initrd=ubuntu-livecd-boot/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>16</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 architecture.</li>
<li>A copy of the Ubuntu ALTERNATE Install CD 10.04 that we need to get some PXE boot files from. Unfortunately <strong>the Live CD does NOT contain the files we need.</strong></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 <strong>Alternate</strong> 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 <strong>Alternate</strong> 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 ubuntu-installer/i386/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>&nbsp;</p>
<pre><span style="color: #000080;">$ sudo nano /etc/dhcp3/dhcpd.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 "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>&nbsp;</p>
<pre><span style="color: #000080;">$ sudo service dhcp3-server 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;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>.<br />
&#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.<br />
.<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 Alternate Install 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>Ensure the permissions of everything, including our newly copied files, have the correct permissions for TFTP to work:
<pre><span style="color: #000080;">$ sudo chmod 777 -R /srv</span></pre>
</li>
<li>Reboot your test PC via PXE and this time you will see your menu sports 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 we 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 <span style="text-decoration: underline;">has</span> 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 newly added file is 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 <a title="HowTo: Create a Diskless boot PC via PXE" href="http://www.serenux.com/2011/04/howto-create-a-diskless-workstation-that-boots-from-pxe-using-ubuntu/" target="_blank">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</a>.</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>35</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>Mini-Review: Generic hot-swap eSATA Docking Bay with Ubuntu</title>
		<link>http://www.serenux.com/2010/02/mini-review-generic-hot-swap-esata-docking-bay-with-ubuntu/</link>
		<comments>http://www.serenux.com/2010/02/mini-review-generic-hot-swap-esata-docking-bay-with-ubuntu/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 12:59:08 +0000</pubDate>
		<dc:creator>HyRax</dc:creator>
				<category><![CDATA[Review]]></category>
		<category><![CDATA[Hard-Drive]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.serenux.com/?p=631</guid>
		<description><![CDATA[I regularly deal with external hard-drives, be it for data backup or if I&#8217;m rescuing a client&#8217;s hard-drive from uncertain death. Since the idea of opening my PC on a regular basis to connect a drive is a bit of a turn off, I used to use an external USB drive enclosure. This works fine, [...]]]></description>
			<content:encoded><![CDATA[<p>I regularly deal with external hard-drives, be it for data backup or if I&#8217;m rescuing a client&#8217;s hard-drive from uncertain death.</p>
<p>Since the idea of opening my PC on a regular basis to connect a drive is a bit of a turn off, I used to use an external USB drive enclosure. This works fine, but it&#8217;s a bit slow (well, at least until USB 3.0 makes its debut). The eSATA standard allows you to connect external drives at full SATA speed, but it&#8217;s not cost-effective to buy an enclosure for every external drive you have.</p>
<p>Enter the Docking Bay. This is a simple weighed base that allows you to connect a hard-drive in a similar way to how you used to plug in game cartridges into a classic game console like the Atari 2600. You can then eject the hard-drive and plug another one in, all without restarting the PC.</p>
<p>This is a review of one such Docking Bay and how it works with Ubuntu, including the wonders of hot-swapping.</p>
<p><span id="more-631"></span>I came across this generic eSATA Docking Bay whilst browsing my local PC store. eSATA Docking Bays have been around for awhile now, but I never got around to getting one so I figured I may as well try this one and see how it went under Ubuntu.</p>
<p style="text-align: center;">
<div id="attachment_684" class="wp-caption aligncenter" style="width: 287px"><a href="http://www.serenux.com/wp-content/uploads/2010/02/DockingBay1.jpeg"><img class="size-large wp-image-684  " title="eSATA HDD Docking Bay" src="http://www.serenux.com/wp-content/uploads/2010/02/DockingBay1-768x1024.jpg" alt="" width="277" height="368" /></a><p class="wp-caption-text">With a HDD inserted into the dock.</p></div>
<div id="attachment_685" class="wp-caption aligncenter" style="width: 378px"><a href="http://www.serenux.com/wp-content/uploads/2010/02/DockingBay2.jpeg"><img class="size-large wp-image-685  " title="eSATA HDD Docking Bay 2" src="http://www.serenux.com/wp-content/uploads/2010/02/DockingBay2-1024x768.jpg" alt="" width="368" height="277" /></a><p class="wp-caption-text">Without the HDD inserted into the dock.</p></div>
<p>There is unit was branded &#8220;A-Power&#8221; but I&#8217;ve seen several of these drives with various brand names on it, so this one is as generic as they come, but it comes in one of three variants:</p>
<ol>
<li>eSATA and USB Docking Bay</li>
<li> eSATA and USB Docking Bay with in-built USB card-reader</li>
<li>USB-only Docking Bay with in-built USB card-reader</li>
</ol>
<p>In my case, I got the first variant as I already have a separate card-reader.</p>
<p><strong><span style="text-decoration: underline;">Hooking Up</span></strong></p>
<p>The Docking Bay is very easy to hook up. The package comes with the following components:</p>
<ul>
<li>The Docking Bay unit</li>
<li>Power Supply</li>
<li>eSATA cable</li>
<li>USB cable</li>
</ul>
<p>After connecting power, the Docking Bay is connected to the PC by the eSATA cable to a spare eSATA port on the back of your PC. You then insert the hard-drive into the slot on the top of the unit &#8211; it caters for both 3.5&#8243; desktop hard-drives and 2.5&#8243; notebook hard-drives. Once inserted, power on the drive using the power button at the back of the unit. The power light on the top of the Docking Bay will light up and you can now switch on your PC.</p>
<p><span style="text-decoration: underline;"><strong>Configuration</strong></span></p>
<p>eSATA Docking Bays don&#8217;t actually need any configuration as such. If you wish to make use of SATA&#8217;s ability to hot-swap, you will need to enable the Advanced Configuration Host Interface (AHCI) in your PC&#8217;s BIOS. Not every motherboard has AHCI, but if your machine is a recent machine, you should have AHCI capabilities. If you do not enable AHCI, you can still use your Docking Bay, however you will not be able to hot-swap a new drive without shutting down your PC first.</p>
<p><span style="text-decoration: underline;"><strong>Using the Docking Bay</strong></span></p>
<p>Drives inserted into the Docking bay appear like any ordinary permanently installed hard-drive inside your PC. You can format them, partition them, read and write data to them and see their SMART status like any other drive.</p>
<p>Doing an unscientific benchmarks using the <em>dd</em> app with a 7200rpm Seagate 1TB HDD, I was able to write straight zeros to the drive at a rate of about 116MB/s and read at about 120MB/s.</p>
<p>Real-world file copying transferred data at about 86MB/s which is consistent with normal single-drive copy speeds.</p>
<p>Doing a fresh installation of Ubuntu Karmic 9.10 on the hard-drive and booting my system from the docking bay and then repeating the boot test with the drive attached directly to the internal SATA connection as normal, Ubuntu booted in precisely the same amount of time, as one would expect. I was also able to dual-boot Ubuntu with Windows 7 without any issue.</p>
<p>Hot-swapping works well also. While Ubuntu is running, I insert my hard-drive into the dock, power on the drive and wait a few seconds. The drive appears in the Places menu, you choose it, enter your sudo password to mount the drive, and the drive appears on your desktop. When you are done with the drive, you simply do a right-mouse-click on the drive&#8217;s icon, choose &#8220;Unmount&#8221; and wait for any data to be written to the drive. Once the drive icon disappears off the desktop, you can then power off the drive in the docking bay, then press the eject button to remove the drive.</p>
<p>Dealing with differently sized drives, I tried a half-height Seagate 500GB I have (see photos). The spring-loaded flap on the top of the drive was able to hold the drive in place without a problem. Trying with a 2.5&#8243; notebook HDD, the docking bay provides a cut-out section that allows you to insert the 2.5&#8243; HDD but the flap does not press directly against the drive.</p>
<p><span style="text-decoration: underline;"><strong>Conclusion</strong></span></p>
<p>The convenience of a hard-drive docking station cannot be understated. This unit provides a simple, effective interface. For AUD$25 it&#8217;s cheap and in the last couple of months I&#8217;ve been using this unit, it has proven to be very reliable.</p>
<p>While this unit is not exactly the most elegant-looking of devices, it does the job and does it well.</p>
<p><span style="color: #0000ff;"><strong>Review score: 9 out of 10</strong></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serenux.com/2010/02/mini-review-generic-hot-swap-esata-docking-bay-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

