<?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>WiredRevolution.com &#187; bootloader</title>
	<atom:link href="http://www.wiredrevolution.com/tag/bootloader/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wiredrevolution.com</link>
	<description>A Bit of Linux Wisdom</description>
	<lastBuildDate>Wed, 18 Jan 2012 22:45:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Install the GRUB boot loader to the MBR</title>
		<link>http://www.wiredrevolution.com/system-administration/install-the-grub-boot-loader-to-the-mbr?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-the-grub-boot-loader-to-the-mbr</link>
		<comments>http://www.wiredrevolution.com/system-administration/install-the-grub-boot-loader-to-the-mbr#comments</comments>
		<pubDate>Sat, 29 Nov 2008 02:58:03 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[system administration]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[bootloader]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[grub-install]]></category>
		<category><![CDATA[loader]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=740</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/sysadmin_icon.png" width="80" height="94" alt="" title="system administration" /><br/>You might need to reinstall the boot loader to the master boot record (MBR) if it becomes corrupted or erased. This can occur for example if Windows is installed on another partition which overwrites the MBR. There are two ways to reinstall grub, automatically using grub-install, and manually through grub itself. grub-install is a script [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/system-administration/disable-ext3-boot-time-check-with-tune2fs' rel='bookmark' title='Permanent Link: Disable ext3 boot-time check with tune2fs'>Disable ext3 boot-time check with tune2fs</a></li>
<li><a href='http://www.wiredrevolution.com/gentoo/upgrade-gentoo-linux-kernel' rel='bookmark' title='Permanent Link: Upgrade Gentoo Linux Kernel'>Upgrade Gentoo Linux Kernel</a></li>
<li><a href='http://www.wiredrevolution.com/gentoo/run-a-command-at-boot-with-gentoo' rel='bookmark' title='Permanent Link: Run a command at boot with Gentoo'>Run a command at boot with Gentoo</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/sysadmin_icon.png" width="80" height="94" alt="" title="system administration" /><br/><p>You might need to reinstall the boot loader to the master boot record (<strong>MBR</strong>) if it becomes corrupted or erased. This can occur for example if Windows is installed on another partition which overwrites the MBR.</p>
<p>There are two ways to reinstall grub, automatically using <strong>grub-install</strong>, and manually through <strong>grub</strong> itself. grub-install is a script which calls grub underneath and in most cases it is your best solution. Sometimes the manual approach is better if you have a complex setup or the first option fails.</p>
<p>The GRUB naming scheme for hard drives and partitions is a bit confusing at first. Hard drive and partition numbers are ordererd with the count starting at zero. They are ordered based on the boot sequence in BIOS, so different types (IDE, SCSI, or RAID) my be intermixed.</p>
<p>For example a system with 2 PATA disks and 1 SATA disk might have the following drive mapping.<br />
<strong>/dev/hda = (hd0)</strong> = drive 1<br />
<strong>/dev/hda1 = (hd0,0)</strong> =  drive 1, partition 1<br />
<strong>/dev/hdb2 = (hd1,1)</strong> = drive 2, partition 2<br />
<strong>/dev/sda1 = (hd2,0)</strong> = drive 3, partition 1</p>
<p>These steps require root privileges so switch to root or <a href="http://www.wiredrevolution.com/commands/submit-commands-as-root-with-sudo">use sudo</a>.</p>
<p>Install automatically with <strong>grub-install</strong>.  The first argument is the hard drive where the boot loader will installed onto the MBR.  It will use your current root directory partition for the rest of the installation. Change &#8220;/dev/sda&#8221; to the correct device for your system.</p>
<pre>
# grub-install /dev/sda
</pre>
<p>If you have a separate boot partition use the <strong>&#8211;root-directory</strong> option to install GRUB on that device instead of your root partition.</p>
<pre>
# grub-install --root-directory=/boot /dev/sda
</pre>
<p>The second method will allow you to install the boot loader manually with <strong>grub</strong>. Start by launching the GRUB command shell.</p>
<pre>
# grub
</pre>
<p>If your not sure of the device to specify for the installation, you can ask GRUB to tell you. Run this command and GRUB will attempt to find your GRUB installation on all available device partitions on the system.  If found GRUB will output all the partitions containing GRUB installations in GRUB naming format. You can select the correct device and use in the next step.</p>
<pre>
grub> find /boot/grub/menu.lst
</pre>
<pre>
 (hd0,0)
</pre>
<p>Set your root partition which contains the boot directory as well as the GRUB installation. You can use the output from the step above.</p>
<pre>
grub> root (hd0,0)
</pre>
<p>Install GRUB to the MBR of your first hard drive device.</p>
<pre>
grub> setup (hd0)
</pre>
<p>Exit Grub.</p>
<pre>
grub> quit
</pre>
<p>Reboot, you should hopefully see the menu on start up.</p>
<pre>
# reboot
</pre>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/system-administration/disable-ext3-boot-time-check-with-tune2fs' rel='bookmark' title='Permanent Link: Disable ext3 boot-time check with tune2fs'>Disable ext3 boot-time check with tune2fs</a></li>
<li><a href='http://www.wiredrevolution.com/gentoo/upgrade-gentoo-linux-kernel' rel='bookmark' title='Permanent Link: Upgrade Gentoo Linux Kernel'>Upgrade Gentoo Linux Kernel</a></li>
<li><a href='http://www.wiredrevolution.com/gentoo/run-a-command-at-boot-with-gentoo' rel='bookmark' title='Permanent Link: Run a command at boot with Gentoo'>Run a command at boot with Gentoo</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/system-administration/install-the-grub-boot-loader-to-the-mbr/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

