<?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>Tairan's Story &#187; grub</title>
	<atom:link href="http://www.tairan.net/index.php/tag/grub/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tairan.net</link>
	<description>「知之真切笃实处即是行。行之明觉精察处即是知，知行工夫不可离。」</description>
	<lastBuildDate>Mon, 26 Jul 2010 12:12:25 +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>Install GRUB using grub-install</title>
		<link>http://www.tairan.net/index.php/2009/01/08/install-grub-using-grub-install/</link>
		<comments>http://www.tairan.net/index.php/2009/01/08/install-grub-using-grub-install/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 08:46:45 +0000</pubDate>
		<dc:creator>Daniel Wang</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[我的声音]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.tairan.org/?p=187</guid>
		<description><![CDATA[From Tairan&#8217;s Story, post Install GRUB using grub-install 用过GRUB以后才知道这个玩意的强大。GRUB加上各种Linux kernel，可以组合成各种启动和安装系统方式。 现在总结一下安装GURB。 环境： Virtual Box #虚拟机 LFS-LiveCD #提供安装GRUB环境 省略若干配置虚拟机的文字&#8230; 我们需要在一块新磁盘上安装GRUB，这块磁盘在系统中为 /dev/hda 首先要分区，格式化。(fdisk, mkfs.xfs)。目前GRUB也支持XFS文件系统启动了 挂载分区 mkdir /tmp/hda mount /dev/hda1 /tmp/hda 安装 grub-install --recheck --root-directory=/tmp/hda /dev/hda 注意: 如果不挂载分区，我这里会提示，不知道其他人有没有遇到这个情况 grub-install does not have any corresponding BIOS drive 另外在指定驱动器的时候不需要指定分区号 (hda1) 至此，GRUB就安装结束了，重启计算机后就会发现GRUB的提示环境了。 From Tairan&#8217;s Story, post Install GRUB using grub-install © [...]]]></description>
			<content:encoded><![CDATA[<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2009/01/08/install-grub-using-grub-install/">Install GRUB using grub-install</a></p>
</div>
<p>用过GRUB以后才知道这个玩意的强大。GRUB加上各种Linux kernel，可以组合成各种启动和安装系统方式。<br />
现在总结一下安装GURB。</p>
<p>环境：<br />
Virtual Box #虚拟机<br />
LFS-LiveCD #提供安装GRUB环境</p>
<p>省略若干配置虚拟机的文字&#8230;</p>
<p>我们需要在一块新磁盘上安装GRUB，这块磁盘在系统中为 /dev/hda</p>
<p>首先要分区，格式化。(fdisk, mkfs.xfs)。目前GRUB也支持XFS文件系统启动了</p>
<p>挂载分区</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>hda
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hda1 <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>hda</pre></div></div>

<p>安装</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">grub-install <span style="color: #660033;">--recheck</span> <span style="color: #660033;">--root-directory</span>=<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>hda <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>hda</pre></div></div>

<p>注意:<br />
如果不挂载分区，我这里会提示，不知道其他人有没有遇到这个情况</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">grub-install does not have any corresponding BIOS drive</pre></div></div>

<p>另外在指定驱动器的时候不需要指定分区号 (hda1)</p>
<p>至此，GRUB就安装结束了，重启计算机后就会发现GRUB的提示环境了。
<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2009/01/08/install-grub-using-grub-install/">Install GRUB using grub-install</a></p>
</div>
<hr />
<p><small>© Daniel Wang for <a href="http://www.tairan.net">Tairan's Story</a>, 2009. |
<a href="http://www.tairan.net/index.php/2009/01/08/install-grub-using-grub-install/">Permalink</a> |
<a href="http://www.tairan.net/index.php/2009/01/08/install-grub-using-grub-install/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.tairan.net/index.php/2009/01/08/install-grub-using-grub-install/&title=Install GRUB using grub-install">del.icio.us</a>
<br/>
Post tags: <a href="http://www.tairan.net/index.php/tag/grub/" rel="tag">grub</a>, <a href="http://www.tairan.net/index.php/tag/linux/" rel="tag">linux</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tairan.net/index.php/2009/01/08/install-grub-using-grub-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multisystem boot via GRUB</title>
		<link>http://www.tairan.net/index.php/2009/01/07/multisystem-boot-via-grub/</link>
		<comments>http://www.tairan.net/index.php/2009/01/07/multisystem-boot-via-grub/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 02:54:15 +0000</pubDate>
		<dc:creator>Daniel Wang</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[我的声音]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.tairan.org/?p=181</guid>
		<description><![CDATA[From Tairan&#8217;s Story, post Multisystem boot via GRUB 以前安装多系统(Linux®+Windows®)都是在一个硬盘上，先安装Windows后安装Linux，然后使用GRUB (or LILO)来引导系统。 如今生活富裕了，硬盘也多了起来，为了更方便的重装系统。我把Linux®和Windows®分别安装在不同的硬盘上。这时就不用严格限制安装系统谁先谁后了。(其实不是Windows®是笨，而是故意不支持通用引导) 硬盘物理连接结构如下 hdd0 &#8212; Primary IDE 安装 Linux hdd2 &#8212; Second IDE 安装Windows 为什么不在同一根IDE线上安装硬盘呢？往下看 安装Linux并使用GRUB作为boot程序 进入BIOS，把 Primary IDE 设置为 Disable 安装Windows，此时Windows会将hdd2认作当前计算机中的Primary Disk，这样就会在hdd2的MDR创建引导文件。系统安装完毕，这样就可以通过在BIOS来设置first boot来分别引导Linux或Windows了。 接下来配置GRUB，通过GRUB来引导Windows，而不是频繁的修改BIOS。 编辑 /boot/grub/menu.lst 加上下面的代码 title Windows XP map &#40;hdd0&#41; &#40;hdd2&#41; map &#40;hdd2&#41; &#40;hdd0&#41; rootnoverify &#40;hdd2,0&#41; chainloader +1 这段配置中最重要的就数那两行map指令了。这个是专门为(DOS/Windows)准备的。参见 GRUB Manual 这样就可以使用GRUB来分别引导Linux和Windows了. [...]]]></description>
			<content:encoded><![CDATA[<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2009/01/07/multisystem-boot-via-grub/">Multisystem boot via GRUB</a></p>
</div>
<p>以前安装多系统(Linux<sup>®</sup>+Windows<sup>®</sup>)都是在一个硬盘上，先安装Windows后安装Linux，然后使用GRUB (or LILO)来引导系统。<br />
如今生活富裕了，硬盘也多了起来，为了更方便的重装系统。我把Linux<sup>®</sup>和Windows<sup>®</sup>分别安装在不同的硬盘上。这时就不用严格限制安装系统谁先谁后了。(其实不是Windows<sup>®</sup>是笨，而是故意不支持通用引导)<br />
硬盘物理连接结构如下<br />
hdd0 &#8212; Primary IDE 安装 Linux<br />
hdd2 &#8212; Second IDE 安装Windows<br />
为什么不在同一根IDE线上安装硬盘呢？往下看<br />
安装Linux并使用GRUB作为boot程序<br />
进入BIOS，把 Primary IDE 设置为 <strong>Disable</strong><br />
安装Windows，此时Windows会将hdd2认作当前计算机中的Primary Disk，这样就会在hdd2的MDR创建引导文件。系统安装完毕，这样就可以通过在BIOS来设置first boot来分别引导Linux或Windows了。<br />
接下来配置GRUB，通过GRUB来引导Windows，而不是频繁的修改BIOS。<br />
编辑 /boot/grub/menu.lst 加上下面的代码</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">title Windows XP
map <span style="color: #7a0874; font-weight: bold;">&#40;</span>hdd0<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>hdd2<span style="color: #7a0874; font-weight: bold;">&#41;</span>
map <span style="color: #7a0874; font-weight: bold;">&#40;</span>hdd2<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>hdd0<span style="color: #7a0874; font-weight: bold;">&#41;</span>
rootnoverify <span style="color: #7a0874; font-weight: bold;">&#40;</span>hdd2,<span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
chainloader +<span style="color: #000000;">1</span></pre></div></div>

<p>这段配置中最重要的就数那两行map指令了。这个是专门为(DOS/Windows)准备的。参见 <a target="_blank" href="http://www.gnu.org/software/grub/manual/html_node/DOS_002fWindows.html#DOS_002fWindows">GRUB Manual</a></p>
<p>这样就可以使用GRUB来分别引导Linux和Windows了.</p>
<p>总结:<br />
学习一个工具如何使用,首先的就是通读使用手册. 然后不断的动手去做! 如此,<strong><em>当你不断的向期望的目标努力的时候就获得了经验!</em></strong></p>
<p>文章中提到的<br />
Windows 即是 Windows<sup>®</sup><br />
Linux 即是 Linux<sup>®</sup></p>
<p>这些都是人家的注册商标，要尊重！
<div style="font-style: italic">
<p><strong>From</strong> <a href="http://www.tairan.net/">Tairan&#8217;s Story</a>, <strong>post</strong> <a href="http://www.tairan.net/index.php/2009/01/07/multisystem-boot-via-grub/">Multisystem boot via GRUB</a></p>
</div>
<hr />
<p><small>© Daniel Wang for <a href="http://www.tairan.net">Tairan's Story</a>, 2009. |
<a href="http://www.tairan.net/index.php/2009/01/07/multisystem-boot-via-grub/">Permalink</a> |
<a href="http://www.tairan.net/index.php/2009/01/07/multisystem-boot-via-grub/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://www.tairan.net/index.php/2009/01/07/multisystem-boot-via-grub/&title=Multisystem boot via GRUB">del.icio.us</a>
<br/>
Post tags: <a href="http://www.tairan.net/index.php/tag/grub/" rel="tag">grub</a>, <a href="http://www.tairan.net/index.php/tag/linux/" rel="tag">linux</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tairan.net/index.php/2009/01/07/multisystem-boot-via-grub/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
