<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
  <card id="article" title="Triple booting on an old PC, part 3: FreeDOS and GRUB4DOS">
    <p mode="wrap"><a href="#menu">Menu</a></p>
	<p><b>Installing GRUB4DOS</b></p>
	<p>GRUB is a very common and powerful bootloader most often used with Linux. GRUB4DOS is a version which can be started from a DOS system or NTLDR, supporting NTFS and FAT32.</p>
	<p>First, we need to download GRUB4DOS from its archived site at http://web.archive.org/web/20170206021010/http://download.gna.org/grub4dos/grub4dos-0.4.4.zip - it comes as a ZIP file.</p>
	<p>There's quite a bit of files in the ZIP archive, but the only 2 files we need are GRLDR and MENU.LST - we need to copy them to the root of the Windows partition (C:\ for me) <strong>and</strong> the root of the DOS partition (E:\ for me).</p>
	<p>GRLDR is the actual bootloader meant to be started from NTLDR, while MENU.LST is its configuration file.</p>
	<p>Let's open menu.lst in a text editor so we can tell GRUB4DOS how to boot FreeDOS. <strong>Do not</strong> use Notepad for this - it won't read the line endings properly. Any other editor will work fine, even edit.com from MS-DOS. The default MENU.LST looks like this at the top:</p>
	<pre>
color blue/green yellow/red white/magenta white/magenta
timeout 30
default /default

title find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root --ignore-floppies /ntldr
chainloader /ntldr
savedefault --wait=2</pre>
    <p>The "color" line is used to set the color scheme of GRUB4DOS. The "timeout" line lets us set how many seconds will it wait before it selects the default option. By default, there's a lot of entries which acn be handy for system repair - I'm going to leave them.</p>
    <p>To add an entry for FreeDOS, all we need to do is put the following after the "default" line (and before the first "title" line):</p>
    <pre>
title FreeDOS
rootnoverify (hd0,1)
chainloader +1</pre>
    <p>GRUB4DOS counts disks and partitions for 0, so (hd0,1) means FreeDOS is on the 2nd partition of the 1st HDD/SSD. If that's not the case on your setup, change it to point to DOS on your setup - for instance (hd1,1) for 2nd partition of 2nd HDD.</p>
    <p>The changed MENU.LST should look like this at the beginning:</p>
    <pre>
color blue/green yellow/red white/magenta white/magenta
timeout 30
default /default

title FreeDOS
rootnoverify (hd0,1)
chainloader +1

title find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root --ignore-floppies /ntldr
chainloader /ntldr
savedefault --wait=2</pre>
    <p>Let's save it both to C:\MENU.LST (Windows partition) and E:\MENU.LST (DOS partition), just to be sure.</p>
    <p>Now we only need to make GRUB4DOS bootable from NTLDR. Let's do this by adding the following line at the end of BOOT.INI:</p>
    <pre>
C:\GRLDR="FreeDOS"</pre>
    <p>I explained BOOT.INI in more detail in <a href="quadboo2.wml">part 2.</a></p>
    <p><b>Booting installed FreeDOS</b></p>
    <p>After a reboot, the computer should allow us to choose between Windows XP, OpenBSD and FreeDOS. Choosing the last one will open GRUB4DOS, where we can proceed to FreeDOS or use other GRUB4DOS options.</p>
    <p>That's it! I was planning to make a 4th part with ReactOS, but the installer refuses to boot on my Sempron PC - it hangs at a black screen. This sesries is only about installing the systems - I'll write about configuring them, installing drivers, software and so on later!</p>
	<p><a href="quadb3_2.wml">Page 2</a></p>
    <p><a href="#article">Top</a></p>
    <p><a href="#menu">Menu</a></p>
  </card>
  <card id="menu" title="crimson_phoneme's website">
    <p mode="wrap"><img src="../gfx/about.wbmp" alt="" /><a href="../index.wml#about">About</a></p>
    <p><img src="../gfx/blog.wbmp" alt="" /><a href="../index.wml#blog">Blog</a></p>
	<p><img src="../gfx/comp.wbmp" alt="" /><a href="../comp.wml">My computers</a></p>
	<p><img src="../gfx/links.wbmp" alt="" /><a href="../links.wml">Links</a></p>
  </card>
</wml>

