<?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 2: OpenBSD">
    <p>Now let's take a look at the disklabel with this command:</p>
    <pre>
# disklabel wd0</pre>
    <p>If you're installing on a different disk than wd0, type that disk in the command instead of wd0.</p>
    <p>The command will show the partitions on the disklabel:</p>
    <pre>
#          size       offset fstype [fsize bsize    cpg]
  a:   67109440    629147640 4.2BSD   2048 16384      1 # /
  b: 
  c:     931.5G            0 unused
  i:     100.0G         2048   NTFS
  j:     200.0G    209717248  MSDOS</pre>
    <p>We'll be copying the OpenBSD boot record to the FAT32 partition (shown by OpenBSD as "MSDOS"), as the install image cannot access NTFS. To do this, we mount that partition, which is wd0j for me:</p>
    <pre>
# mount /dev/wd0j /mnt</pre>
    <p>The command didn't output anything - that means the partition mounted successfully.</p>
    <p>Now for the command to copy the partition boot record:</p>
    <pre>
# dd if=/dev/rwd0a of=/mnt/OPENBSD.PBR bs=512 count=1</pre>
    <p>Note "rwd" instead of "wd" - we're accessing the raw partition data, not the filesystem, and the "r" stands for raw.</p>
    <p>Then we unmount the FAT32 partition, remove the install disc and reboot:</p>
    <pre>
# umount /mnt
# reboot</pre>
    <p>Yes, the command is "umount", not "unmount". It's spelled like this since very old Unix systems had a 6-character filename limit and the name "umount" stayed to this day.</p>
    <p>After rebooting, the computer boots to Windows XP. In Windows, we need to copy the OPENBSD.PBR file from the FAT32 partition to the Windows partition, which is C: for me.</p>
    <p>Then we open C:\BOOT.INI in Notepad (or any other plain text editor). If you can't see the file, enable showing hidden files and system files in Windows Explorer options. The file will look somewhat like this:</p>
    <pre>
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect</pre>
    <p>At the end of the file, we add this line, then save:</p>
    <pre>
C:\OPENBSD.PBR="OpenBSD"</pre>
    <p>We can also change the "timeout" line to set how many seconds will the computer wait before automatically booting into Windows - I set it to 30 seconds.</p>
    <p>That's it for part 2! From now on, the PC will show a menu on startup allowing to choose booting Windows XP or OpenBSD. In part 3, I'll be installing FreeDOS on this computer and getting it to triple boot with Windows XP and OpenBSD!</p>
	<p><a href="quadb2_5.wml">Page 5</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>

