xref: /openbsd/distrib/notes/i386/prep (revision db3296cf)
1NOTE: If you wish to install OpenBSD on your whole disk, i.e. you do
2not want DOS or any other operating system to reside on your hard
3disk, you can skip this section and go on to the section that
4describes installation, below.  If you're upgrading your system from a
5previous release of OpenBSD, you should have proceeded directly to the
6section about upgrading; you need none of the information presented
7here.
8
9First and foremost, before beginning the installation process, MAKE
10SURE YOU HAVE A RELIABLE BACKUP of any data on your hard disk that you
11wish to keep.  Repartitioning your hard disk is an excellent way to
12destroy important data.
13
14Second, if you are using a disk controller which supports disk geometry
15translation, be sure to use the same parameters for OpenBSD as for DOS
16or the other operating systems installed on your disk.  If you do not,
17it will be much harder to make OpenBSD properly coexist with them.
18Utilities exist which will print out the disk geometry which DOS sees;
19some versions of DOS "fdisk" also do this.  If you have an "EIDE" hard
20disk, DOS and OpenBSD probably won't see the same geometry, and you must
21be careful to find out the DOS geometry and tell OpenBSD about it during
22the installation.
23
24Third (but related to the second point above), if you are using a hard
25disk with more sectors than DOS or your controller's BIOS supports without
26some kind of software translation utility or other kludge, you MUST
27BE SURE that all partitions which you want to boot from must start and end
28below cylinder 1024 by the BIOS's idea of the disk, and that all DOS
29partitions MUST EXIST ENTIRELY BELOW cylinder 1024, or you will either not
30be able to boot OpenBSD, not be able to boot DOS, or you may experience
31data loss or filesystem corruption.  Be sure you aren't using geometry
32translation that you don't know about, but that the DOS "fdisk" program
33does!
34
35The OpenBSD root partition must also reside completely within the BIOS
36supported part of the hard disk -- this would typically be 504M, 2G or 8G,
37depending upon the age of the machine and its BIOS.  Due to a limit of the
38OpenBSD boot loader, the root partition must be within the first 8G even if
39the BIOS supports more.  Note that only the root partition has this issue,
40once OpenBSD is loaded, the entire disk is available for use.
41
42Fourth, use the other operating system's "fdisk" program or partition
43editor to create at least one of the partitions to be used for that
44operating system.  If that operating system is already set up to use the
45entire disk, you will have to back it up, remove and recreate a smaller
46partition for it, and then restore the data from that partition.  You do
47not have to create an OpenBSD partition at this time, the OpenBSD install-
48ation will give you an opportunity to create the partition needed for
49OpenBSD.
50
51Finally, do whatever is necessary to restore order to the partition
52you took space away from.  If it was a DOS partition, you probably
53will need to use "format" to create a new file system on it, and then
54restore your important files from your backups.  Other operating
55systems will have different needs; most will need to reformat the
56partition, and if it was their "main" partition, will probably need
57to be reinstalled.
58
59Once you've backed all your data up, there is a tool called fips 2.0
60that can shrink your FAT-based DOS/Windows partition to make room for
61OpenBSD.  It is included in the MACHINE tools area of this distribution as
62a convenience.  It is strongly advised that you read its documentation
63and understand the consequences of your actions before using it.  In some
64cases, defragmenting your disk and running fips may be much faster than
65reinstalling your DOS partition from the backup.
66
67Your hard disk is now prepared to have OpenBSD installed on it, and
68you should proceed with the installation instructions.
69