<?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>James Revillini &#187; grub2</title>
	<atom:link href="http://james.revillini.com/tag/grub2/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.revillini.com</link>
	<description>Say 'no' to styrofoam.</description>
	<lastBuildDate>Sun, 25 Jul 2010 13:03:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>[SOLVED] Ubuntu Startup-manager killed my windows partition entry in GRUB2</title>
		<link>http://james.revillini.com/2010/01/08/solved-ubuntu-startup-manager-killed-my-windows-partition-entry-in-grub2/</link>
		<comments>http://james.revillini.com/2010/01/08/solved-ubuntu-startup-manager-killed-my-windows-partition-entry-in-grub2/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 16:18:35 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[boot menu windows]]></category>
		<category><![CDATA[encrypted windows partition]]></category>
		<category><![CDATA[grub2]]></category>
		<category><![CDATA[startup-manager]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://james.revillini.com/?p=316</guid>
		<description><![CDATA[The issue I had a scary thing happen the other day: the windows xp entry on GRUB2&#8242;s boot screen went missing!  This happened shortly after the windows partition had been encrypted with a McAfee product.  Ubuntu didn&#8217;t remove the entry itself; it was actually only after I tried to make a change to the startup [...]]]></description>
			<content:encoded><![CDATA[<h3>The issue</h3>
<p>I had a scary thing happen the other day: the windows xp entry on GRUB2&#8242;s boot screen went missing!  This happened shortly after the windows partition had been encrypted with a McAfee product.  Ubuntu didn&#8217;t remove the entry itself; it was actually only after I tried to make a change to the startup configuration using a program called Startup-manager (you may have it in System &gt; Administration) that the windows entry was removed. It was bad enough that Ubuntu could no longer see any files on the windows partition (mounted as /windows), but now I had no way to boot into windows to retrieve files.</p>
<h3>The fix</h3>
<p>And of course, I had no freaking clue how to manually modify GRUB2&#8242;s startup screen.  But after some digging, I figured out how to do it.  This worked for me in Ubuntu 9.10 Karmic Koala.  Hopefully it will save someone else&#8217;s day:</p>
<ol>
<li>Figure out where windows is.  Is it /dev/sda1 (very likely)? /dev/sda2?  To do this:
<ol>
<li>System &gt; Administration &gt; Disk Utility</li>
<li>Click each partition and find the one which matches the size of your bootable windows parition and which, when selected, shows a partition type of HPFS/NTFS. Example:<br />
<a href="http://james.revillini.com/wp-content/uploads/2010/01/Screenshot-Palimpsest-Disk-Utility.png" rel="shadowbox[post-316];player=img;"><img class="alignnone size-medium wp-image-317" title="Screenshot-Palimpsest Disk Utility" src="http://james.revillini.com/wp-content/uploads/2010/01/Screenshot-Palimpsest-Disk-Utility-300x289.png" alt="" width="300" height="289" /></a></li>
<li>Note the location of the partition; it is the last line of the descriptors of the partition. In the screenshot above, mine is <strong>/dev/sda1</strong>.</li>
</ol>
</li>
<li>Press ALT+F2</li>
<li>enter the command <strong>gksudo gedit /etc/grub.d/40_custom</strong></li>
<li>below the comments in this file, and below any other entries which may have been added by one thing or another, add the following:
<pre class="brush: plain;">[/sourcecode]</pre>
<p>echo &#8220;Adding Windows XP on {LOCATION OF YOUR WINDOWS PARTITION}&#8221; &gt;&amp;2<br />
cat &lt;&lt; EOF<br />
menuentry &#8220;Windows XP Professional (on {LOCATION OF YOUR WINDOWS PARTITION})&#8221; {<br />
insmod ntfs<br />
<span style="white-space: pre;"> </span>set root=(hd0,{JUST THE LAST NUMBER OF THE LOCATION OF YOUR WINDOWS PARTITION})<br />
<span style="white-space: pre;"> </span>drivemap -s (hd0) ${root}<br />
<span style="white-space: pre;"> </span>chainloader +1<br />
}<br />
EOF[/shortcode]</li>
<li>Replace {LOCATION OF YOUR WINDOWS PARTITION} in the code above with the location of your windows partition.</li>
<li>Replace {JUST THE LAST NUMBER OF THE LOCATION OF YOUR WINDOWS PARTITION} with the last number of the location of your windows partition. E.g. /dev/sda<strong>1</strong> would be <strong>1</strong>.Your file will now look something like this:<br />
<a href="http://james.revillini.com/wp-content/uploads/2010/01/Screenshot-40_custom-etc-grub.d-gedit.png" rel="shadowbox[post-316];player=img;"><img class="alignnone size-medium wp-image-319" title="Screenshot-40_custom (-etc-grub.d) - gedit" src="http://james.revillini.com/wp-content/uploads/2010/01/Screenshot-40_custom-etc-grub.d-gedit-300x230.png" alt="" width="300" height="230" /></a></li>
<li>Save the file and close the editor.</li>
<li>Press ALT + F2.</li>
<li>enter the command <strong>gksudo grub-mkconfig</strong></li>
</ol>
<p>That should be it.  When you reboot, you should see your windows as a bootable option again.</p>
<h3>Morals</h3>
<p>The moral of this tale is to avoid startup-manager for grub configuration changes unless you&#8217;ve not got funky partitions. Keep in mind that future versions of start-up manager may fix this issue; the version i&#8217;m using is 1.9.12-ubuntu1.</p>
<h3>Credits</h3>
<p>I would not have been able to troubleshoot this issue if it weren&#8217;t for the following gracious contributions to the global knowledgebase.</p>
<ul>
<li><a href="http://ubuntuforums.org/showthread.php?p=8191211#post8191211">Grub2 Introduction</a> by <a href="http://ubuntuforums.org/member.php?u=647614">ranch hand</a></li>
<li><a href="https://help.ubuntu.com/community/Grub2">Grub2 @ Ubuntu Help Wiki</a> by many people</li>
<li><a href="http://ubuntuforums.org/showthread.php?t=818177">HOWTO: StartUp Manager &amp; Kernel Display Options</a> by <a href="http://ubuntuforums.org/member.php?u=223945">drs305</a></li>
<li>many others who posted about their 40_custom grub file configurations</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://james.revillini.com/2010/01/08/solved-ubuntu-startup-manager-killed-my-windows-partition-entry-in-grub2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
