<?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>That Chris Brown's Blog &#187; recovery</title>
	<atom:link href="http://www.thatchrisbrown.com/tag/recovery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thatchrisbrown.com</link>
	<description>Another Chris Brown &#38; another blog</description>
	<lastBuildDate>Sat, 03 Apr 2010 13:05:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>USB CentOS to the rescue!</title>
		<link>http://www.thatchrisbrown.com/2009/usb-centos-to-the-rescue/</link>
		<comments>http://www.thatchrisbrown.com/2009/usb-centos-to-the-rescue/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 22:44:07 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://www.thatchrisbrown.com/?p=115</guid>
		<description><![CDATA[I stupidly broke a host and managed to recover it with CentOS Live CD running from a USB stick, which was refreshingly easy to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.thatchrisbrown.com%2F2009%2Fusb-centos-to-the-rescue%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.thatchrisbrown.com%2F2009%2Fusb-centos-to-the-rescue%2F&amp;source=thatchrisbrown&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>OK, OK &#8211; I was stupid.</p>
<p>As part of my ongoing move from Xen to KVM for VM hosting, I fireed up a server that had been sitting about too long switched off under the desk, thinkig that it would make an ideal machine to try KVM out on.  A <strong>yum groupremove Virtualization</strong> seemed to produce no issues, so I was looking good to go with a bit fo repo cleanup and then an update before upgrading from CentOS 5.2 to 5.3 with yum.  Then I did something stupid.</p>
<p>I renamed the logical volume that / is mounted from, becuase I thought the name wasn&#8217;t descriptive enough.  Then I rebooted the box.  Oh yes.</p>
<p>Cue a kernel panic when grub couldn&#8217;t find the root partition.  Oh Chris, how SMRT!  The physical box doesn&#8217;t have a CD/DVD drive (it&#8217;s meant to be a headless box) but luckily it does have USB ports, and I had a spare screen and keyboard about, and I happeend to have a 4GB USB thumb drive in my laptop bag.  A quick Google search turned up Pendrivelinux.com and a handy <a href="http://www.pendrivelinux.com/usb-centos-5-live-install-via-windows/" target="_blank">guide</a> to getting CentOS 5 working on USB.  I already had a CentOS 5.2 Live CD image on my hard drive, so a quick upload of the thumb drive contents, a quick download of the <a href="https://fedorahosted.org/liveusb-creator/" target="_blank">Fedora LiveUSB Creator</a> and I was in business!</p>
<p>It was a pretty simple recovery.  I had to unmount and remount the LVs becuase CentOS Live CD mounted them read-only, but that was easy enough &#8211; the device mapper nodes were all there and sensibly named too, so it was pretty intuitive.  The I just had to edit the LV names in /boot/grub/grub.conf, /etc/fstab and /etc/mtab.  For good measure I removed the duplicate entry in /etc/blkid/blkid.tab too.</p>
<p>Reboot, pull out the USB drive at the BIOS screen and a few moment later, there was my host back in the land of the serving. Phew!</p>
<p>A lucky escape this time, but it shows the risk of unintended consequences.  The sooner I get KVM sorted out, and all the real work done in VM guests in LVs, the better, because at least then I&#8217;ll be able to make a snapshot before I try anything like a sysadmin task!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatchrisbrown.com/2009/usb-centos-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
