⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 574.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
            </TD>
          <TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 
        border=0></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff 
        border=0>
         <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
              
              <TR>
                <TD vAlign=top align=middle width="60%">
                  <TABLE cellSpacing=0 cellPadding=0 width="100%" 
                  background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
                    <TBODY>
                    <TR>
                        <TD vAlign=top width="80%"> 
                          <DIV align=center>
                        <FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
                            </FORM>
                        <TABLE cellSpacing=0 cellPadding=0 width="95%" 
                          border=0><TBODY>
                          <TR>
                            <TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif" 
                          height=30></TD></TR></TBODY></TABLE>
                        <TABLE cellSpacing=0 cellPadding=3 width="95%" 
                        align=center border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=3 width="100%" 
                              border=0>
                                <TBODY>
                                <TR>
                                      <TD vAlign=top> 
<p><FONT class=normalfont><B><font color=blue>小菜鸟与grub的故事</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>来自:Linux知识宝库<br>联系方式:无名<br><br>记念我花了一个晚上搞定GRUB的艰苦历程,也送给有同样难题的兄弟.<br>
<br>
故事是这样的:原先小菜鸟我有一块40G的硬盘,装了2k和98,快乐又太平.后来拿到手RedHat 7.3,不免心痒拿出来装...可是原先40G的硬盘满满当当Linux塞不进,一冲动,就把老奔机器上一块10G的硬盘给卸了,当做我装Linux的硬盘,也省去了分区的麻烦.谁知,麻烦就来了...<br>
好了,不要扔蛋,正题来了.<br>
Linux在安装并配置Loader之时,我理所当然选择了GRUB,但是发现:他要覆盖我/dev/hda1中的mbr,也就是我原先那块40G硬盘的mbr,这还了得?我本来是不想让我原先的硬盘被改写的,那里面的数据对我太重要了,万一一个安装失败,它就给我个boot failure那我岂不是哭死?但是那下拉选单中又没有/dev/hdc1(在我机器上是那个10G小硬盘),无奈之下退出,只好将大硬盘先disable掉.再装,成功了,能写小硬盘的mbr了,我欢欣鼓舞,继续......<br>
于是,问题渐渐显露,我在用Linux时候,想换到Windows下要启动2次:一次先把cmos中的启动顺序该为先启动大硬盘,也就是windows所在硬盘,再存进cmos重新启动,一开始还能忍受,日子久了,不胜其烦...于是萌生了修改grub能启动我的Windows 分区的想法...这也便是痛苦的开始<br>
<br>
先是看RH自代的文档盘,找了一个样例文件,如下:<br>
default=linux<br>
timeout=10<br>
color=green/black light-gray/blue<br>
<br>
# section to load linux<br>
title linux<br>
root (hd0,1)<br>
kernel /vmlinuz root=/dev/hda5<br>
boot<br>
<br>
# section to load Windows 2000<br>
title windows<br>
#(hd1,2)是我机器上装Windows硬盘的id<br>
rootnoverify (hd1,2)<br>
chainloader +1<br>
<br>
哟,加3句话可以搞定?好,试试!重启,选择windows,死机...默哀中.除了耳熟能祥的Ctrl+Alt+Del按什么都没用.于是到这里发了贴子,北南老大教育我要多用搜索,脸红,是的,我后来看了他给的几篇文章,GRUB是够清楚了,连它的command line模式我也差不多能用的很熟,可是,大家也猜到了,死机依旧.我当然确定了我没有弄错硬盘分区的id,但是屏幕上没有任何显示!这让大多数的Troubleshooting和FAQ都变的像一纸空文.我快泄气了.<br>
<br>
由于不好意思再到论坛里瞎问,只能继续在文档盘里找结果.The Official Red Hat Linux Reference Guide中给出了几个链接,去看看!<br>
第一个去的地方:<br>
http://www.linuxgazette.com/issue64/kohli.html<br>
唔,学到了不少:<br>
<br>
Let's try another example with Windows installed in /dev/hda1 or (hd0,0). The procedure for booting with Windows is as follows:<br>
<br>
#在menu.lst也就是grub.conf文件中:<br>
rootnoverify (hd0,0)<br>
makeactive<br>
chainloader +1<br>
boot<br>
<br>
喔,原来需要加一个makeactive和boot!!怎么都没人高诉我讷?试试!(满心欢喜)<br>
结果,问题依旧....<br>
好把,继续找出路:<br>
http://www.redhat.com/mirrors/LDP/H...-with-GRUB.html<br>
好,Redhat的官方支持,准没错!<br>
嗯,在文档里看到了修改menu.lst文件的另一个版本:<br>
<br>
title Windows 2000<br>
unhide (hd0,0)<br>
hide (hd0,1)<br>
hide (hd0,2)<br>
rootnoverify (hd0,0)<br>
chainloader +1<br>
makeactive<br>
<br>
需要将非linux分区隐藏?我试试......<br>
死机....<br>
重启....<br>
问题来了!我的GRUB怎么变成文本格式了?!我怎么启动??<br>
真的,GRUB变回了你在控制台中的命令行bash-like方式,这这这,怎能不叫人眼前一黑?<br>
冷静,feng_ye,冷静,想想,对了!一定是hide命令隐藏了linux分区,那么恢复它!通过按&lt;tab&gt;获得帮助,我unhide了所有的分区...按&lt;Esc&gt;,回到了可爱的(可恶的?)GRUB GUI界面(呼~还好,没冲动把Linux重装,因为我没有启动软盘)<br>
<br>
看来都不行...在我心灰意懒之余我到了GNU的主页作最后一次挣扎,(谁知,嘿嘿)<br>
<br>
http://www.gnu.org/software/grub/<br>
<br>
那里有相当专业的FAQ和TroubleShooting, 而我也在那里发现了救命稻草:<br>
原文如下:<br>
<br>
If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:<br>
<br>
grub&gt; map (hd0) (hd1)<br>
grub&gt; map (hd1) (hd0)<br>
<br>
好像......就是它!!<br>
<br>
尔后, 我修改了我的menu.lst,去掉了hide, unhide, 全文件如下:<br>
# grub.conf generated by anaconda<br>
#<br>
# Note that you do not have to rerun grub after making changes to this file<br>
# NOTICE: You do not have a /boot partition. This means that<br>
# all kernel and initrd paths are relative to /, eg.<br>
# root (hd0,1)<br>
# kernel /boot/vmlinuz-version ro root=/dev/hdc2<br>
# initrd /boot/initrd-version.img<br>
#boot=/dev/hdc<br>
default=0<br>
timeout=10<br>
splashimage=(hd0,1)/boot/grub/splash.xpm.gz<br>
title Red Hat Linux (2.4.18-5)<br>
root (hd0,1)<br>
kernel /boot/vmlinuz-2.4.18-5 ro root=/dev/hdc2 hdd=ide-scsi<br>
initrd /boot/initrd-2.4.18-5.img<br>
title Red Hat Linux (2.4.18-3)<br>
root (hd0,1)<br>
kernel /boot/vmlinuz-2.4.18-3 ro root=/dev/hdc2 hdd=ide-scsi<br>
initrd /boot/initrd-2.4.18-3.img<br>
title Windows<br>
map (hd0) (hd1)<br>
map (hd1) (hd0)<br>
rootnoverify (hd1,2)<br>
chainloader +1<br>
makeactive<br>
boot<br>
<br>
原来如此. 怪不得我以前在控制台打grub检索硬盘分区和在启动时进入command-line mode检索分区得到的硬盘列表正好相反(很拗口是吧?就是hd0的分区变成了hd1的,而hd1的分区变成了hd0的).原来用map命令可以虚拟掉换两硬盘的id.<br>
<br>
重启, 成功!<br>
<br>
经验三条:1,不要没做研究就到论坛上问,除非你的时间太紧迫;<br>
2,英文很重要,读懂官方文件和Online manual,对我们好处多多;<br>
3,坚持不懈,我就不信它牛得过我?!<br>
<br>
后记: 多谢北南,虽然没有在他的教程里找到答案(说不定也有?), 但是也获益非潜.后来在RH的文档盘里也发现了这关键的map命令,只是当初没留意...
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -