


<?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>Wow! Ubuntu &#187; O湛狼O-aitilife</title>
	<atom:link href="http://wowubuntu.com/author/lijiantao/feed" rel="self" type="application/rss+xml" />
	<link>http://wowubuntu.com</link>
	<description>Ubuntu 及 Linux 新闻、技巧、软件及游戏！</description>
	<lastBuildDate>Wed, 16 May 2012 04:19:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Ubuntu 10.10+Win7 双系统重装 Win7 后恢复 Ubuntu 引导方法</title>
		<link>http://wowubuntu.com/fix-grub.html</link>
		<comments>http://wowubuntu.com/fix-grub.html#comments</comments>
		<pubDate>Sat, 05 Mar 2011 01:14:48 +0000</pubDate>
		<dc:creator>O湛狼O-aitilife</dc:creator>
				<category><![CDATA[技巧]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://wowubuntu.com/?p=3294</guid>
		<description><![CDATA[起因: 虽然一直在ubuntu下工作,但是前几天突然发现dreamweaver有wordpress的代码提示功能,让小狼心动不已,所以就打算在一直当成游戏机的win7上去搭建iis的php环境,鼓捣了一阵子后....悲剧地发现竟然无法打开was服务,说是找不到这个服务,百度,google了一阵，发现只有两个办法，尝试了一下都不成功，没办法.只能选择重装了,正好装个windows server 2008感觉感觉服务器版的windows有什么优点。 装完server 2008之后重启就更加悲剧地发现grub启动菜单不见了....不是重装了windows之后又要重装ubuntu吧....配置了好久的说,OMG!小狼决定说什么也不能重装ubuntu，就虚心地向google求救,经过一段时间的折腾,终于成功引导回ubuntu。现在就说说一下引导过程吧,注意了小狼用的是liveCD方法,就是装系统时用的光盘,没有的童鞋可以跳过了，当然想参考一下的也可以继续往下看。 恢复引导方法： 1.放进liveCD,重启,看到有界面出来的时候,选择试用,不要点安装。 2.进入ubuntu试用版后,打开终端,在左上角的应用程序-&#62;附件-&#62;终端那 3.输入以下命令: sudo fdisk -l   //得到的结果类似下面。查看ubuntu的根目录在那,这里没办法直接看出来,只能靠你自己识别,可以从分区的大小判断是不是根分区，就是在装ubuntu时，挂载点为 / 的那个分区 从图中的结果看出来，根分区在sda12.因为小狼记得分/分区的时候是分了20G的大小，并且当时是先分了/分区，然后再分了一个20G的/home分区的。所以判断出sda12是/分区，而不是sda13，虽然它也是20G.把sda12记住。 注意：如果分区的时候，你单独把boot分区分出来了，还要多一步工作，就是找出boot分区: 从上图可以看出,boot分区在sda8，因为它是最小的，只有200M.（你装ubuntu的时候分了多少就是多少） 记住sda8。 4.输入 sudo mount /dev/sda8 /mnt 因为小狼的单独把boot分区分出来了,并且它的位置在sda8.如果你没有单独把boot分区分出来.那就修改一下位置,改为 sudo mount /dev/你的/分区所在位置 /mnt 5.输入 sudo grub-install --root-directory=/mnt /dev/sda8 同样，如果你没有把boot分区单独分出来就改成 sudo grub-install --root-directory=/mnt /dev/你的/分区的位置 这里应该不会有什么问题，因为如果位置不对，无法安装，你可以一直输这个命令直到位置对了为止. 6.如果出现了no error report。那你就差不多成功了.然后sudo init 6.重启。 7.重启之后你会无奈地发现......windows也无法启动了，进入的是grub的命令行.....不要怕。进到这里你已经离成功不远了. 输入: root (hdX,Y）   //x为硬盘位置，如果你只有一快硬盘,X=0,如果有多块，相应设置x。Y为boot分区所在位置,这里是8.如果没有单独分boot分区,y就是你的/分区所在位置 linux /vmlinuz-2.xxxxx-generic [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">相关文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fubuntu-tweak07.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Ubuntu Tweak 0.7.0 正式发布</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fnatty-dev.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Ubuntu 11.04 开发新动态：Banshee 成默认，新的 Grub 背景色等等</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fubuntu-tips-applet-%25E9%259A%258F%25E6%259C%25BA%25E6%2598%25BE%25E7%25A4%25BA-linux-%25E6%258A%2580%25E5%25B7%25A7.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Ubuntu Tips Applet : 随机显示 Linux 技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fubuntu-tweak-061.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Ubuntu Tweak 0.6.1发布，支持12.04</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fgrub-customizer.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Grub Customizer  1.5 发布</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p><strong><span style="text-decoration: underline;">起因:</span></strong><br />
虽然一直在ubuntu下工作,但是前几天突然发现dreamweaver有wordpress的代码提示功能,让小狼心动不已,所以就打算在一直当成游戏机的win7上去搭建iis的php环境,鼓捣了一阵子后....悲剧地发现竟然无法打开was服务,说是找不到这个服务,百度,google了一阵，发现只有两个办法，尝试了一下都不成功，没办法.只能选择重装了,正好装个windows server 2008感觉感觉服务器版的windows有什么优点。</p>
<p><span id="more-3294"></span></p>
<p>装完server 2008之后重启就更加悲剧地发现grub启动菜单不见了....不是重装了windows之后又要重装ubuntu吧....配置了好久的说,OMG!小狼决定说什么也不能重装ubuntu，就虚心地向google求救,经过一段时间的折腾,终于成功引导回ubuntu。现在就说说一下引导过程吧,注意了小狼用的是liveCD方法,就是装系统时用的光盘,没有的童鞋可以跳过了，当然想参考一下的也可以继续往下看。</p>
<p><strong>恢复引导方法：</strong></p>
<p>1.放进liveCD,重启,看到有界面出来的时候,选择试用,不要点安装。</p>
<p>2.进入ubuntu试用版后,打开终端,在左上角的<span style="color: #ff0000;">应用程序-&gt;附件-&gt;终端</span>那</p>
<p>3.输入以下命令:</p>
<p>sudo fdisk -l   //得到的结果类似下面。查看ubuntu的根目录在那,这里没办法直接看出来,只能靠你自己识别,可以从分区的大小判断是不是根分区，就是在装ubuntu时，挂载点为 <span style="color: #ff0000;">/ </span>的那个分区</p>
<p><img class="alignnone size-medium wp-image-738" src="http://www.aitilife.com/wp-content/uploads/2011/03/fdisk-300x127.png" alt="fdisk" width="300" height="127" /></p>
<p>从图中的结果看出来，根分区在sda12.因为小狼记得分/分区的时候是分了20G的大小，并且当时是先分了/分区，然后再分了一个20G的/home分区的。所以判断出sda12是/分区，而不是sda13，虽然它也是20G.把sda12记住。</p>
<p><strong><span style="color: #ff0000;">注意：<span style="color: #000000;">如果</span></span><span style="color: #000000;">分区的时候，你单独把boot分区分出来了，还要多一步工作，就是找出boot分区:</span></strong></p>
<p>从上图可以看出,boot分区在sda8，因为它是最小的，只有200M.（你装ubuntu的时候分了多少就是多少）</p>
<p>记住sda8。</p>
<p>4.输入</p>
<blockquote><p>sudo mount /dev/sda8 /mnt</p></blockquote>
<p>因为小狼的单独把boot分区分出来了,并且它的位置在sda8.如果你没有单独把boot分区分出来.那就修改一下位置,改为</p>
<blockquote><p>sudo mount /dev/你的/分区所在位置 /mnt</p></blockquote>
<p>5.输入</p>
<blockquote><p>sudo grub-install --root-directory=/mnt /dev/sda8</p></blockquote>
<p>同样，如果你没有把boot分区单独分出来就改成</p>
<blockquote><p>sudo grub-install --root-directory=/mnt /dev/你的/分区的位置</p></blockquote>
<p>这里应该不会有什么问题，因为如果位置不对，无法安装，你可以一直输这个命令直到位置对了为止.</p>
<p>6.如果出现了no error report。那你就差不多成功了.然后sudo init 6.重启。</p>
<p>7.重启之后你会无奈地发现......windows也无法启动了，进入的是grub的命令行.....不要怕。进到这里你已经离成功不远了.</p>
<p>输入:</p>
<p>root (hdX,Y）   //x为硬盘位置，如果你只有一快硬盘,X=0,如果有多块，相应设置x。Y为boot分区所在位置,这里是8.如果没有单独分boot分区,y就是你的/分区所在位置</p>
<p>linux /vmlinuz-2.xxxxx-generic root=/dev/sda12(无论你有没有把boot分区单独分出来,这里都要写/根分区的位置，否则无法完成启动,这里可以按tab完成填写)</p>
<p>如果没有单独把boot分区分出来，就是</p>
<blockquote><p>linux /boot/vmlinuz-2.xxxxx-generic root=/dev/sda12<br />
initrd /initrd.img-2.xxxxx-generic</p></blockquote>
<p>或</p>
<blockquote><p>initrd /boot/initrd.img-2.xxxxx-generic<br />
boot</p></blockquote>
<hr />
<p>到这里已经差不多完成了.因为你已经可以进入原来的ubuntu了，但是如果就这样不管了，那么下一次重启还需要重复一次上面的工作。这也太渗人了。。。</p>
<p>那最后就修复一下grub吧.</p>
<p>打开终端,输入</p>
<blockquote><p>sudo update-grub</p></blockquote>
<p>看到</p>
<blockquote><p>Generating grub.cfg ...<br />
Found linux image: /boot/vmlinuz-2.6.35-27-generic<br />
Found initrd image: /boot/initrd.img-2.6.35-27-genericFound Windows Server 2008 (loader) on /dev/sda1<br />
done</p></blockquote>
<p>恭喜，现在已经全线完工了。赶快重启一下看看熟悉的grub引导菜单是不是回来了～</p>
<hr />
<p>关于grub看以看看小狼以前的文章:<a href="http://www.aitilife.com/how-to-decrease-grub-menu-item-in-ubuntu/">http://www.aitilife.com/how-to-decrease-grub-menu-item-in-ubuntu/</a></p>
# 本文采用<a href="http://creativecommons.org/licenses/by/2.5/cn/">CC协议</a>进行授权，转载本文请注明<a href="http://wowubuntu.com/fix-grub.html" title="Permalink">本文链接<a>。/  15  条留言
<hr>
- <a href="http://twitter.com/ubuntu_tips">Twitter</a> 
/ <a href="http://t.sina.com.cn/utips">微博</a> 
/ <a href="http://wowubuntu.com/ask">问答</a> 
/ <a href="http://wowubuntu.com/submit">投稿</a>
/ <a href="http://wowubuntu.com/join">加入我们</a> wow0slx6bcs721xo1udcc<br>- 高性价比 <a href="http://wowubuntu.com/vps.html">Ubuntu VPS</a> / 本站架设于<a href="http://www.photonvps.com/billing/aff.php?aff=129"> PhotonVPS </a> / 定制 <a href="http://tto.me/kfstee">Ubuntu T-Shirt</a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">相关文章：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fubuntu-tweak07.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Ubuntu Tweak 0.7.0 正式发布</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fnatty-dev.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Ubuntu 11.04 开发新动态：Banshee 成默认，新的 Grub 背景色等等</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fubuntu-tips-applet-%25E9%259A%258F%25E6%259C%25BA%25E6%2598%25BE%25E7%25A4%25BA-linux-%25E6%258A%2580%25E5%25B7%25A7.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Ubuntu Tips Applet : 随机显示 Linux 技巧</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fubuntu-tweak-061.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Ubuntu Tweak 0.6.1发布，支持12.04</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fwowubuntu.com%2Fgrub-customizer.html&from=http%3A%2F%2Fwowubuntu.com%2Ffix-grub.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 13px !important;">Grub Customizer  1.5 发布</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://wowubuntu.com/fix-grub.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

