<?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>aaron-kelley.net &#187; Linux</title>
	<atom:link href="http://aaron-kelley.net/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://aaron-kelley.net</link>
	<description>My little corner of the Internet</description>
	<lastBuildDate>Tue, 31 Jan 2012 01:57:13 +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>Migrating an Ubuntu installation from BIOS to UEFI</title>
		<link>http://aaron-kelley.net/blog/2011/12/migrating-an-ubuntu-installation-from-bios-to-uefi/</link>
		<comments>http://aaron-kelley.net/blog/2011/12/migrating-an-ubuntu-installation-from-bios-to-uefi/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 00:44:21 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[GPT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[UEFI]]></category>

		<guid isPermaLink="false">http://aaron-kelley.net/?p=1056</guid>
		<description><![CDATA[For this article, I am assuming that you are comfortable getting around Linux in general and Ubuntu in particular, and are familar with the ins and outs of disk partitioning. I will be describing the steps that I took to make this happen, but not going into too much detail for each individual step. See [...]]]></description>
			<content:encoded><![CDATA[<p>For this article, I am assuming that you are comfortable getting around Linux in general and Ubuntu in particular, and are familar with the ins and outs of disk partitioning. I will be describing the steps that I took to make this happen, but not going into too much detail for each individual step. See the bottom of this post for some useful links if you&#8217;d like to read up on the topic first. Note that it is very possible to lose your partitions when doing this sort of work so proceed carefully and do not blame me if something goes awry.</p>
<p><span id="more-1056"></span>As far as I know, you need the Linux 3.0 kernel or later to boot via UEFI, which means you&#8217;ll need to be using at least Ubuntu 11.10. All of the current 64-bit Ubuntu (11.10) ISO images seem to boot fine via UEFI, so I booted the desktop disc as a &#8220;live CD&#8221; for many of these operations.</p>
<p>If you have a standard Ubuntu installation, your disk has just two partitions: one for the file system and one for swap space. In my case, these were <tt>/dev/sda1</tt> (ext4) and <tt>/dev/sda5</tt> (swap). The disk itself is partitioned using the MBR method.</p>
<p>To switch to UEFI, you&#8217;ll have to convert the disk&#8217;s partition table from MBR to GPT. This can be done non-destructively using <tt><a href="http://www.rodsbooks.com/gdisk/" target="_blank">gdisk</a></tt>. You can install it from the &#8220;Universe&#8221; repository in Ubuntu (<a href="http://packages.ubuntu.com/oneiric/gdisk" target="_blank">here&#8217;s the package page</a>), if you&#8217;ve booted from the Ubuntu Lice CD, you&#8217;ll have to enable this repository. Once you launch <tt>gdisk</tt> from the terminal, you tell it which disk you&#8217;re interested in (<tt>/dev/sda</tt> in my case) and it will proceed with the conversion from MBR to GPT automatically &#8212; you&#8217;ll just need to tell it to write changes and quit. GPT actually stores two copies of the partition table on the disk, and <tt>gdisk</tt> will want to put one at the front and one at the end. For me, it complained that there was no room after the last partition on my disk to store the second partition table, so I had to open GParted and shrink my swap partition a little.</p>
<p>After the conversion to GPT, you&#8217;ll notice that there are some small gaps between your partitions. The reason for this is explained in more detail <a href="http://www.rodsbooks.com/gdisk/mbr2gpt.html" target="_blank">here</a>, but, you can use GParted to move and resize the partitions to your liking after the conversion is done.</p>
<p>Now, UEFI systems need a special boot partition to hold the UEFI boot loader for your OS, called the EFI system partition, or ESP. (It can actually hold several different boot loaders, making multi-booting considerably more simple than before.) Create a 20 MB FAT16 partition at the start of the disk, and use the GParted flag management to enable the &#8220;boot&#8221; flag. I don&#8217;t think that this new partition necessarily has to be the first one on the disk, but I&#8217;m just copying the partition structure that you get from installing Ubuntu on a UEFI system from scratch. Make sure you use the &#8220;MiB&#8221; alignment option when messing with the partitions to keep them aligned properly if you have an SSD, &#8220;advanced format&#8221; 4K-sector drive, or RAID setup.</p>
<p>After the conversion to GPT, I had two partitions on the disk: <tt>/dev/sda1</tt> (ext4) and <tt>/dev/sda2</tt> (swap). When I added the FAT16 partition at the front, it was labeled <tt>/dev/sda3</tt> even though it was the first partition on the disk.</p>
<p>Now, the conversion to GPT is done and the ESP has been set up. All that&#8217;s left is to reinstall grub so that it can boot your machine. First, install the <tt>grub-efi</tt> package. This will remove the <tt>grub-pc</tt> package, and allow us to install grub without having it freak out because your disk is not partitioned with MBR.</p>
<p>The following commands did it for me&#8230; you may have to adjust them if your partitions are labeled the same as mine.</p>
<blockquote><p><tt>sudo mount /dev/sda1 /mnt # Mount the root filesystem in /mnt<br />
sudo mkdir /mnt/boot/efi # Create a directory to mount the ESP in<br />
sudo mount /dev/sda3 /mnt/boot/efi # Mount the ESP<br />
sudo grub-install --root-directory=/mnt /dev/sda # Run the grub install</tt></p></blockquote>
<p>When you&#8217;re done, you should be able to check the ESP (in <tt>/mnt/boot/efi</tt>) to see that the boot loader has been placed there &#8212; <tt>EFI/ubuntu/grubx64.efi</tt>.</p>
<p>Then, reboot and it boots! Depending on your motherboard&#8217;s UEFI implementation, you may have to point it to the Ubuntu boot loader the first time (<tt>EFI/ubuntu/grubx64.efi</tt>). Also, the first time I booted after the conversion, some errors popped up on the screen but the system still came up properly. Subsequent boots did not have any errors, so I&#8217;m not quite sure what that was about.</p>
<p>Be sure to install the <tt>grub-efi</tt> package on your main system too, so that if an update comes along that requires updating grub, it works properly.  Also, I actually ended up deleting and re-creating the swap partition during this process, so its UUID changed.  You may want to check your <tt>/etc/fstab</tt> file and make sure the UUIDs still match up with your partitions.</p>
<p>Resources:</p>
<ul>
<li><a href="http://www.rodsbooks.com/gdisk/" target="_blank">http://www.rodsbooks.com/gdisk/</a> &#8212; the <tt>gdisk</tt> page has a lot of useful information about GPT/UEFI</li>
<li><a href="http://www.thinkwiki.org/wiki/UEFI_Firmware" target="_blank">http://www.thinkwiki.org/wiki/UEFI_Firmware</a> &#8212; a wiki page that describes the process of installing grub for booting via UEFI</li>
<li><a href="https://gitorious.org/tianocore_uefi_duet_builds/pages/Windows_x64_BIOS_to_UEFI" target="_blank">https://gitorious.org/tianocore_uefi_duet_builds/pages/Windows_x64_BIOS_to_UEFI</a> &#8212; a page which discusses a similar migration for a Windows system, which has some additional useful information</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://aaron-kelley.net/blog/2011/12/migrating-an-ubuntu-installation-from-bios-to-uefi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mount an SFTP/SSH server as a drive in Windows (for $40)</title>
		<link>http://aaron-kelley.net/blog/2009/08/mount-an-sftpssh-server-as-a-drive-in-windows-for-40/</link>
		<comments>http://aaron-kelley.net/blog/2009/08/mount-an-sftpssh-server-as-a-drive-in-windows-for-40/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 17:03:25 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS Interoperability]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://aaron-kelley.net/?p=542</guid>
		<description><![CDATA[Working with files between two Linux machines or two Windows machines over the network is pretty easy &#8212; in either case, you can share files on one machine and easily access them from the other.  In fact, in either case you can mount a remote share and make it appear as part of the local [...]]]></description>
			<content:encoded><![CDATA[<p>Working with files between two Linux machines or two Windows machines over the network is pretty easy &#8212; in either case, you can share files on one machine and easily access them from the other.  In fact, in either case you can mount a remote share and make it appear as part of the local file system, so any application can use the files just as easily as if they were local.  This is done via SFTP over SSH (or a number of other methods) on Linux, and via Windows&#8217;s native file sharing (SMB) on Windows.</p>
<p>In fact, you can even mount a Windows share on Linux pretty easily using Samba, and use Samba to create shares that the Windows machines can access.</p>
<p>Now, a cool thing about SFTP over SSH is that it typically works even if the machines aren&#8217;t on the same LAN.  You can access files on a machine across the Internet, and still mount the share so that applications can access the files as if they were local.  This doesn&#8217;t always work with SMB, as lots of ISPs block the ports required, and even if you can get a connection over the Internet, performance is usually poor.</p>
<p><span id="more-542"></span></p>
<p>Wouldn&#8217;t it be cool if you could mount a remote SFTP server as a drive letter in Windows?  That&#8217;s what I was looking for.  I&#8217;ve looked around for applications that provide this functionality in the past, but never found one that worked reliably and on 64-bit Windows.  However, the other day, I came across <a href="http://www.expandrive.com/windows" target="_blank">ExpanDrive</a>, which seems to fit the bill.</p>
<p>Not only does this nifty app allow you to map a remote SFTP share to a drive letter, but it handles reconnecting after sleep/hibernate and changing locations very well.  Couldn&#8217;t be happier.  Setting it up is really easy, you just will out this form with information about the server and which drive letter you would like to use:</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-544" title="expandrive" src="http://aaron-kelley.net/wp-content/uploads/2009/08/expandrive.png" alt="expandrive" width="563" height="392" /></p>
<p>&#8230;and then, your files are immediately available under &#8220;My Computer.&#8221;</p>
<p>The only bad thing is, the application will set you back $40.  There is a trial version though, to let you see if it meets your needs.  Licenses are sold on a per-user basis, so you only have to buy one to use it on all of your machines.</p>
<p>Let me know if you know of any applications that do as good a job for less (or no) money!</p>
]]></content:encoded>
			<wfw:commentRss>http://aaron-kelley.net/blog/2009/08/mount-an-sftpssh-server-as-a-drive-in-windows-for-40/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Moving an Ubuntu Server install to another machine &#8211; where&#8217;d my network connection go?</title>
		<link>http://aaron-kelley.net/blog/2009/08/moving-an-ubuntu-server-install-to-another-machine-whered-my-network-connection-go/</link>
		<comments>http://aaron-kelley.net/blog/2009/08/moving-an-ubuntu-server-install-to-another-machine-whered-my-network-connection-go/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 19:16:48 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Server]]></category>

		<guid isPermaLink="false">http://aaron-kelley.net/?p=536</guid>
		<description><![CDATA[Alright, this is actually a pretty simple problem, but only once you know which configuration files to look at. I recently replaced the machine that powers this very web site with a better one.  This was my first migration since switching to Ubuntu Server last winter.  I essentially took the hard drive out of the [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, this is actually a pretty simple problem, but only once you know which configuration files to look at.</p>
<p>I recently replaced the machine that powers this very web site with a better one.  This was my first migration since switching to Ubuntu Server last winter.  I essentially took the hard drive out of the old machine and plopped it in the new one, booted it up, and hoped for the best.  Since Linux is not as picky as Windows about being moved to a new set of hardware, I figured it would work out fine.</p>
<p>Sure enough, Ubuntu booted right up on the new machine without so much as a complaint.  However, network connectivity was gone.  The old machine was using a PCI Ethernet card, while the new machine had an on-board controller that I hoped to use.  Anyway, I took the PCI card from the old machine and put it in the new machine, and then the network connectivity was back.</p>
<p>Why wouldn&#8217;t Ubuntu just start using the on-board controller, though?</p>
<p><span id="more-536"></span>Well, it turns out Ubuntu Server, in its default configuration, remembers which MAC address goes with which Ethernet device.  (This as opposed to the default configuration on the desktop version, where NetworkManager handles this dynamically.)  This information is stored in <tt>/etc/udev/rules.d/70-persistent-net.rules</tt>, and looks something like this:</p>
<blockquote><p><tt># This file was automatically generated by the /lib/udev/write_net_rules<br />
# program run by the persistent-net-generator.rules rules file.<br />
#<br />
# You can modify it, as long as you keep each rule on a single line.</tt></p>
<p><tt># PCI device 0x8086:0x1229 (e100)<br />
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"</tt></p>
<p><tt># PCI device 0x14e4:0x4401 (b44)<br />
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"</tt></p></blockquote>
<p>Here, my old Ethernet card (<tt>e100</tt>) and my new card (<tt>b44</tt>) are listed as <tt>eth0</tt> and <tt>eth1</tt>.  In <tt>/etc/network/interfaces</tt>, I only had a configuration for <tt>eth0</tt>.  Thus, no network connectivity when that card was not present.</p>
<p>The solution is simply to modify <tt>/etc/udev/rules.d/70-persistent-net.rules</tt> so that the card you want is <tt>eth0</tt>, or to add an appropriate configuration for <tt>eth1</tt> in <tt>/etc/network/interfaces</tt>.  Of course, the entry in the rules file for the adapter that is no longer present should be commented out or erased.  Anyway, after making these changes and bouncing the Ethernet kernel modules (or just rebooting the machine), things should work how you like.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaron-kelley.net/blog/2009/08/moving-an-ubuntu-server-install-to-another-machine-whered-my-network-connection-go/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FreeNX on Ubuntu 9.04 (jaunty) &#8211; What happened to my GNOME theme?</title>
		<link>http://aaron-kelley.net/blog/2009/08/freenx-on-ubuntu-9-04-jaunty-what-happened-to-my-gnome-theme/</link>
		<comments>http://aaron-kelley.net/blog/2009/08/freenx-on-ubuntu-9-04-jaunty-what-happened-to-my-gnome-theme/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 03:48:29 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NX]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://aaron-kelley.net/?p=433</guid>
		<description><![CDATA[I have a home server that sits in my closet running Ubuntu 9.04. I regularly access it using NX. About a week ago, I arrived back from an extended trip, and noticed that a security update to the kernel had been installed and it was waiting for me to approve a reboot. After I rebooted, [...]]]></description>
			<content:encoded><![CDATA[<p>I have a home server that sits in my closet running Ubuntu 9.04.  I regularly access it using <a href="http://en.wikipedia.org/wiki/NX_technology" target="_blank">NX</a>.  About a week ago, I arrived back from an extended trip, and noticed that a security update to the kernel had been installed and it was waiting for me to approve a reboot.  After I rebooted, I logged back in, and&#8230; my GNOME theme was all messed up.</p>
<p><span id="more-433"></span></p>
<p style="text-align: center;"><img class="alignnone size-large wp-image-434" title="Broken GNOME theme in Ubuntu 9.04" src="http://aaron-kelley.net/wp-content/uploads/2009/08/broken-theme-800x640.png" alt="Broken GNOME theme in Ubuntu 9.04" width="800" height="640" /></p>
<p>I don&#8217;t think that this was caused by the kernel update (I even booted up the old kernel to make sure), but some other update that came along recently is probably to blame, and the problem didn&#8217;t show itself until I had to log out and log back in.</p>
<p>I don&#8217;t use a fancy theme, just the regular default Ubuntu theme.  In this situation, the window borders were still themed properly (although now an ugly blue color, which you can&#8217;t see in this screen shot), but the icon set was the default GNOME set no matter which set I chose in the appearence preferences, and most of the controls weren&#8217;t themed either (see the bottom-left and top-right of the screen shot).</p>
<p>I thought that maybe something had gone bad in my profile, but I created a new account and it also had the problem, so something had apparently broken system-wide.  This is what makes me suspect that a recent software update is to blame, because I haven&#8217;t been poking around in any system-wide stuff on this machine in a while.</p>
<p>I didn&#8217;t realize that using the FreeNX server was part of the problem at first, but I finally found some <a href="http://ubuntuforums.org/showthread.php?t=1231195" target="_blank">other</a> <a href="http://ubuntuforums.org/showthread.php?t=1229504" target="_blank">people</a> who have the same issue this evening, and one of them mentioned <a href="https://bugs.launchpad.net/freenx-server/+bug/399758" target="_blank">this bug report</a>, which mentions <a href="https://bugs.edge.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/199245" target="_blank">another bug report</a>, which has the solution to the problem.  (It doesn&#8217;t just affect FreeNX either, some people have the same problem with VNC.)  It turns out that <tt>gnome-settings-daemon</tt> is crashing, and without it running, the theme is messed up (among other things).  To get it running again, you have to disable its keyboard plug-in.  (I&#8217;m not yet sure what you lose by disabling this plug-in, but the keyboard still works even without <tt>gnome-settings-daemon</tt> running, so what&#8217;s there to lose&#8230;).</p>
<p>Here&#8217;s the solution.</p>
<ul>
<li>Run <tt>gconf-editor</tt></li>
<li>Navigate to <tt>/apps/gnome_settings_daemon/plugins/keyboard</tt></li>
<li>Uncheck the &#8220;<tt>active</tt>&#8221; box on the right</li>
<li>Log out and log back in (or manually start <tt>gnome-settings-daemon</tt>)</li>
</ul>
<p>There you have it.  This will tie us over until the issue is actually fixed in <tt>gnome-settings-daemon</tt>.  Maybe, if you are experiencing this issue, you didn&#8217;t have to search around for as long as I did to find the solution.</p>
<p><strong>Update: August 5, 2009</strong></p>
<p>There is a <a href="https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/409621" target="_blank">new bug report</a> on this issue.</p>
<p>Also, a user reported that the fix above did not work.  I suggest also disabling the mouse plug-in for <tt>gnome-settings-daemon</tt> (by following the steps above, but going to <tt>/apps/gnome_settings_daemon/plugins/mouse</tt> instead), since some of the comments in the first <tt>gnome-settings-daemon</tt> bug report indicated that this was necessary for them to fix the problem.  If that doesn&#8217;t help, then something else is causing <tt>gnome-settings-daemon</tt> to crash&#8230; or if it is not crashing, you must have a completely different issue.</p>
<p><strong>Update: September 23, 2009</strong></p>
<p>Reportedly, you can fix this problem by reverting <tt>libxklavier</tt> to version <tt>3.9-0ubuntu1</tt>.</p>
]]></content:encoded>
			<wfw:commentRss>http://aaron-kelley.net/blog/2009/08/freenx-on-ubuntu-9-04-jaunty-what-happened-to-my-gnome-theme/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

