Table of Contents
These instructions should work well for installing OpenBSD dual-boot with Microsoft Windows on the same hard-disk. Multi-booting between OpenBSD and other operating systems gives you the opportunity to learn the advanced features of OpenBSD while still using your favourite Windows applications in Microsoft Windows.
These instructions discuss how you can use Boot Managers to configure your system to boot either OpenBSD or your MS Windows OS.
The following introduction items will help you better understand the steps to configure dual-boot.
Dualboot is achieved by using a third-party utility to configure the master boot sector (which also contains the master boot record) to support multiple operating system startup. OpenBSD ships with an early version of os-bs in the 2.7/tools directory.
For those who have already partitioned their hard disks, just read through the next section to get an idea another way you could have partitioned your system.
Because it seems to come up often, here are really important stuff from the documentation (INSTALL.386) please read the rest of the file for more complete instructions. This is but a very brief summary
Warning. The following is definitely going to wipe all information from your hard disk so make sure (a) you have backed up all data and programs (b) your back-ups are reliable (c) you can recover from your backup files.
Partition the hard-disk using Microsoft Windows 98's fdisk program. Divide the size of your hard-disk as you wish and setup MSWindow's FAT partition as the primary partition. (FAT32 works well with these instructions) For example, on my 4GB HDD I'm just going to split the drive into two 2GB partitions.
For those relatively new to fdisk partitioning you take a major risk. Read other documentation on FDISK before continuing.
Install MS Windows (or format the primary partition, C:, as bootable using format c: /s)
During the installation of OpenBSD you will need to give directions for configuring the Hard Disk. The following are guidelines for configuring the disk layout with 'fdisk' and 'disklabel' which are both automatically initiated by the installation process.
Follow the installation process for OpenBSD to the point when it informs you which hard-disks it has discovered on your system, and which disk you wish to designate as the boot disk.
Available disks are:
Which disk is the root disk? [wd0] <HIT ENTER>
On many 386 class machines wd0 will be the device name for the hard-disk, continuing with the installation and the next prompt should be whether you wish to use the complete hard-disk for OpenBSD's exclusive use.
Do you want to use the *entire* disk for OpenBSD? [no] <HIT ENTER>
NO. If you are going to be using the same hard-disk for OpenBSD and Windows, then select NO as we choose to double-boot into at least another operating system on the same hard-disk.
Selecting no should have started fdisk and placed the prompt inside fdisk working on the primary boot disk (wd0 in this example.) Do not use reinit.
Only LBA values are valid in ending cylinder for partition #3.
Enter 'help' for information
Doing a "print" at this command prompt should list for us at least four partitions
fdisk: 1> p
Disk: wd0 geometry:
790/255/63 [12691350 sectors]
The display shows the current allocation of partitions for the hard-drive. In our case example, the initial partition "0" is allocated to Windows 95 (FAT32). Since no other partition has been setup, partitions 1 through 3 are unallocated.
We pull out the calculator and do a little maths. Add the Offset and Size of Partition 0 to find the offset where we will start our OpenBSD partition.
DOS Offset X + Size Y = OpenBSD Offset Z
63 + 12,675,222 = 12,675,285
I've used commas for readability, do not use them when typing the results.
12,675,285 is the final sector where the Win95 FAT-32 partition reaches, so we start our next (OpenBSD) on the next sector if possible.
End 12,675,285; ==> start 12,675,286?
Now, we create the OpenBSD partition by editing an available partition. We're just picking 1, the next available partition slot from the above diagram.
fdisk: 1> e 1
For the partition type we specify A6 (for OpenBSD). We will not edit the Cylinder/Head/Sector (CHS) mode. For tha partition offset we will use our calculated number above. For the partition size we can take the offered maximum size from the system (the rest of available drive space)
fdisk: 1> e 1
The result of our venture can be displayed by using "p" print. Just in case we typed in something wrong. If you make a mistake you can go back by using "e" edit again, or just "exit" without saving changes.
Writing current MBR to disk.
After "q" Quit and Write, the changes you have been made are written to the Master Boot Record and you should be continued into the rest of the installation process.
The installation process should continue with the disklabel, and should show the MSDOS partition as "i". Obviously you do not want to kill partition "i" or this will seriously cause problems (?-)
Initial label editor (enter '?' for help at any prompt)
offset fstype [fsize bsize cpg]
Once you complete installing OpenBSD you can continue with the boot configuration.
from disklabel -e wd0
I have listed the Boot Managers as I have found them, 1st through the OpenBSD CD distributions, ftp site, and as I have come across discussions in the mailing lists. Hopefully this non-alphabetic listing helps you if you have difficulty in obtaining a boot manager.
Most of these Boot Managers have good documentation for installation and configuration. Please remember to read their documentation, together with this, to ensure your dual boot system works.
My favourite, easiest to install (in most situations) is the GAG
[ref: installation CD, go on and get radical, buy one. It is also available from the OpenBSD ftp site.]
Operating System Boot Selector (OS-BS) is supplied as a self-extracting MSDOS program (os-bs135.exe) in the 2.X/tools directory. [It's there in 2.7, I think I recall seeing it in 2.6, and I have no idea where my 2.5 CDs gone to sleep, prior to that I didn't exist.]
If you are installing OpenBSD from the Internet, download the os-bs135.exe and place it on the FAT partition or save it to a floppy diskette.
The OS-BS program should display a list of partitions it recognises and prompt you to specify which partitions you wish to make bootable. After you have specified which partitions are bootable it will then list those partitions and ask you to
Your Boot Manager has been configured, restart your computer and OS-BS will prompt you to choose which OS to boot.
OS-BS 2.0Beta8 is an updated development from the 1.x serious http://www.prz.tu-berlin.de/~wolf/os-bs.html Fortunately a commercial venture bought up the distribution rights to the software, and fortunately the author released this version.
The 2.0 beta looks much nicer than version 1.x, a more GUIsh (text Windows) with easy navigation.
Warning from the Readme File:
|Currently os-bs uses WITHOUT ASKING(!) the sectors 2, 3, 4, 5 on cylinder 0, head 0 on the first disk. On almost all disks I ever saw these sectors (and the whole first track, except sector 1 which contains the Master Boot Record) are unused. (BTW, the reason why some boot viruses like this place...).|
If you don't like the warning above, don't use 2.0Beta8, buy the retail product or use 1.35. Of course it worked fine for me, but that's another story.
There is some discussion in the documentation about how unco-operative most OS's are about where they must be located to boot. Fortunately OpenBSD has been real nice for me and there was no special configuration apart from just installing OpenBSD onto a second drive and setting up 2.0Beta8 (originally had it working fine with Partition Magic 5.0's Boot Manager)
Windows NTFS Partition is listed as ID 07, System: OS/2 HPFS, QNX or Advanced Unix.
A heap of configuration options. The latest release should be especially useful for Win9X users (ie. it comes with a Win32 installation program, although you have to drop back to DOS to complete the installation.)
One interesting feature in mbtmgr is it supposedly allows you to specify which partition information to make visable to the OS you are configuring. For some reason this resolved an inability I had to configure my Win2000 FAT32 drive so I can mount it in OpenBSD (or Linux Mandrake 7.) hmmmm.
I think the value of the Win32 installation is to get all the documentation (html files) onto your system, as well as letting you install stuff programmers love (assembly source code etc.) Urgghhh!!!! This boot manager seems to be maintained so if you want to program some boot stuff, there's technical information here that is most likely to be helpful, as well as like-hearted souls.
Almost forgot to put this in. Commercial software does work (although this one didn't live up the the speal for which I had originally bought the package.)
Partition Magic's Boot Manager works fine with FAT32 and OpenBSD (across multiple drives even.) Real nice graphical screen after boot up, I can't remember what I did to install it, but it must have been easy otherwise I would have dug in to write something.
Wonderful thing having well written manuals. Go commercial ware (now where did I put that CD, I've got to get my machine back together 8.p
The best thing I liked about this ? You just create a boot disk (whether from Unix or DOS) and your ready to install. Unfortunately (?) this means that your system must support a 3 1/2" High Density Floppy drive.
Installation is well documented and a brief outline is listed:
rawrite is supplied with the image file and also available together with ntrw from the CD Distribution or ftp site. The Unix instructions (for raw writing to the floppy disk) may be incorrect.
I used the following to create the boot disk onto my floppy:
|dd if=disk.dsk of=/dev/fd0a bs=512 count=2880|
Dualbooting is possible between an OpenBSD setup and Windows NT 4/2000 formatted with the NTFS file system. As most of the above Boot Managers require some FAT partition on which to install (ie execute from a DOS command prompt) I have previously had to follow the below long route to have the more secure NTFS file system and OpenBSD dualboot. Of course an advantage of retaining FAT32 is that you can mount that drive space into OpenBSD if you wish.
You may not need to follow the procedures listed below, they were a just the configuration I went through to get it to work.
1. Install Windows NT/2000 (FAT32 - use FAT for install, convert to NTFS afterwards.)
2. Install OpenBSD
3. Boot in DOS
4. Install/Configure Dual-boot package
(success using both mattsoft Boot Manager, GAG, and OS-BS 2.0B8)
5. Boot in Windows NT/2000 and convert the FAT32 partition to NTFS
Now I can multiboot between Windows 2000 (NTFS partition) and OpenBSD 2.7 (A6 OpenBSD partition)
From sickrotten <protected-email> Wed Mar 21 12:22:23 2001
Subject: OpenBSD articles
#1: Big-big tnx. for your _excellent_ OpenBSD tutorial ! I'm a newbie in the world of UNIX (btw. 1-2 weeks of OpenBSD-ing, i never use any *NIX before), and i found your tutorial very useful !
#2: In section "DualBoot" you wrote about various bootmanagers. I can recommend you one nice proggy called "System Commander" - see it @ http://www.v-com.com Besides multibooting it also allow partitioning/repartitioning HDDisks ;-) very good tool. This prog. is commercial.
Fuf. English is tight for me ;-)
// KOT (aka ROTTEN), Russia.
Copyright (c) 2000/1/2 Samiuela LV Taufa. All Rights Reserved.
I reserve the right to be totally incorrect even at the best advice of betters. In other words, I'm probably wrong in enough places for you to call me an idiot, but don't 'cause you'll hurt my sensibilities, just tell me where I went wrong and I'll try again.
You are permitted and encouraged to use this guide for fun or for profit as you see fit. If you republish this work in what-ever form, it would be nice (though not enforceable) to be credited.
Multi-booting, configuring Dualboot with OpenBSD
Copyright © 2000/1/2 NoMoa.COM All rights reserved.