[FAQ Index] [To Section 3 - Getting started with OpenBSD] [To Section 5 - Building the System from Source]
OpenBSD has long been respected for its simple and straight forward installation process, which is consistent across all platforms.
All platforms use a very similar installation procedure, however there are some minor differences in details on a few platforms. In all cases, you are urged to read the platform-specific INSTALL document in the platform directory on the CD-ROM or FTP sites (for example, i386/INSTALL.i386, macppc/INSTALL.macppc or sparc/INSTALL.sparc).
The OpenBSD installer is a special kernel with a number of utilities and install scripts embedded in a pre-loaded RAM disk. After this kernel is booted, the operating system is extracted from a number of compressed tar(1) (.tgz) files from a source other than this pre-loaded RAM disk. There are several ways to boot this install kernel:
Floppy disk images are provided which can be used to create an install floppy on another Unix-like system, or on a Windows system. Typical file names are floppy54.fs, though several platforms have multiple floppy images available.
Once the install kernel is booted, you have several options of where to get the install file sets. Again, not every platform supports every option.
Before you start your install, you should have some idea what you want to end up with. You will want to know the following items, at least:
As examples, we will look at the installation images available for the i386 and sparc platforms.
The i386 platform has six separate installation disk images to choose from:
The sparc platform has four separate installation disk images to choose from:
You can create a CD-ROM using the cd54.iso or install54.iso files. The exact details here are left to the reader to determine with the tools they have at their disposal.
In OpenBSD, you can create a CD from an ISO image using cdio(1):
# cdio tao cd54.iso |
Most CD recorders sold for Windows and Macintosh systems come with software that can burn ISO images to blank media. If yours does not, there are various no-cost applications that can do this for you.
Other Unix-like systems use applications such as cdrkit.
Precise details and device names may vary from Unix variant to Unix variant; use what is appropriate for your system.
To create a formatted floppy, use the fdformat(1) command to both format and check for bad sectors.
# fdformat /dev/rfd0c Format 1440K floppy `/dev/rfd0c'? (y/n): y Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done. |
If your output is like the above example, then the disk is OK. However, if you do not see ALL "V"'s then the disk is most likely bad, and you should try a new one.
To write the image file to the disk, use dd(1). An example usage of dd(1) is below:
# dd if=floppy54.fs of=/dev/rfd0c bs=32k |
Once the image is written, check to make sure that the copied image is the same as the original with the cmp(1) command. If the diskette is identical to the image, you will just see another prompt.
# cmp /dev/rfd0c floppy54.fs |
To prepare a floppy in Windows, first use the native formatting tools to format the disk, verifying that the disk has no bad sectors.
To write the installation image to the prepared floppy you can use ntrw.exe, which can be downloaded from the tools directory on any of the FTP mirrors.
Example usage of ntrw:
C:\> ntrw floppy54.fs a: 3.5", 1.44MB, 512 bytes/sector bufsize is 9216 1474560 bytes written |
You can also install by booting bsd.rd from an existing OpenBSD partition, or over the network using the PXE boot process.
You will need the system to be at a monitor ROM prompt, which typically looks like "ok ". If you are using a Sun keyboard, press and hold "STOP" while tapping "A". If using a serial console, a BREAK should return you to the monitor prompt.
Use the following command to boot from the floppy:
ok boot floppy |
Usually, you can boot from the CDROM drive of a Sun system from the boot prompt by typing 'boot cdrom':
ok boot cdrom |
The installer will create a partitioning plan based on the size of your hard disk. While this will NOT be a perfect layout for all people, it provides a good starting point and a good overall strategy for figuring out what you need.
We will start with a very simple install, with brief discussions of the options provided, and using the magic of hypertext links, allow you to read more on the topics that interest you and explore your options.
Installation notes for each platform are on the install CDs and FTP servers, in the file INSTALL.<plat>, where <plat> is your platform, for instance, i386.
At almost any point during the OpenBSD install process, you can terminate the current install attempt by hitting CTRL-C and can restart it without rebooting by running install at the shell prompt. You can also enter a "!" at most places in the installation to get to a shell prompt, then exit the shell to return to the installer.
When your boot is successful, you will see a lot of text messages scroll by. This text, on many architectures in white on blue, is the dmesg, the kernel telling you what devices have been found and how they are hooked to other devices. A copy of this text is saved as /var/run/dmesg.boot.
Then, you will see the following:
... root on rd0a swap on rd0b dump on rd0b erase ^?, werase ^W, kill ^U, intr ^C, status ^T Welcome to the OpenBSD/i386 5.4 installation program. (I)nstall, (U)pgrade or (S)hell? i |
And with that, we reach our first question. You have the three options shown:
At any prompt except password prompts you can escape to a shell by typing '!'. Default answers are shown in []'s and are selected by pressing RETURN. You can exit this program at any time by pressing Control-C, but this can leave your system in an inconsistent state. Choose your keyboard layout ('?' or 'L' for list) [default] Enter |
In most cases, the default keyboard layout (or terminal type if a serial console install is being done) is appropriate; however don't just take the default, respond appropriately.
System hostname? (short form, e.g. 'foo') puffy |
This value, along with the DNS domain name (specified below), will be saved in the file /etc/myname, which is used during normal boot to set the hostname of the system. If you do not set the domain name of the system, the default value of 'my.domain' will be used.
Available network interfaces are: fxp0 vlan0. Which one do you wish to configure? (or 'done') [fxp0] Enter |
vlan0 is the VLAN virtual interface. For our purposes here, we are going to ignore this option and stick to the physical interfaces. If you have multiple physical interfaces, they will be listed here. Note that they are identified by driver name, not generic Ethernet devices. In this case, "fxp0" refers to the first device using the fxp(4) driver, fxp1 would be the second device, etc. More on device naming is in FAQ 6.
After selecting the device you wish to configure, you will now configure it. In many cases, you will want to configure it using DHCP:
IPv4 address for fxp0? (or 'dhcp' or 'none') [dhcp] Enter Issuing hostname-associated DHCP request for fxp0. DHCPDISCOVER on fxp0 to 255.255.255.255 port 67 interval 1 DHCPOFFER from 192.168.1.250 (08:00:20:94:0b:c8) DHCPREQUEST on fxp0 to 255.255.255.255 port 67 DHCPACK from 192.168.1.250 (08:00:20:94:0b:c8) bound to 192.168.1.199 -- renewal in 43200 seconds. |
DHCP will configure the IP address, subnet mask, default gateway, DNS domain name and DNS servers. If you are not using DHCP, you will need to specify all these things manually; see the more detailed discussion below.
If you have any IPv6 configuration to do or there are other interfaces to configure (or you don't like how you configured the previous one), you can do that now, but in our case, we are done:
IPv6 address for fxp0? (or 'rtsol' or 'none') [none] Enter Available network interfaces are: fxp0 vlan0. Which one do you wish to configure? (or 'done') [done] Enter Using DNS domainname example.org Using DNS nameservers at 192.168.1.252 |
Now, we set the root account password:
Password for root account? (will not echo) PaSsWoRd Password for root account? (again) PaSsWoRd |
Use a secure password for the root account. Remember, on the Internet, they ARE out to get into your computer, and they will be trying lots of common passwords people think are really clever.
You will later be given a chance to create an administrative account and disable remote (SSH) access to the root account, but you still want a good password on your root account.
Start sshd(8) by default? [yes] Enter |
Usually, you will want sshd(8) running. If your application has no need for sshd(8), there is a small theoretical security advantage to not having it running.
Start ntpd(8) by default? [no] y NTP server? (hostname or 'default') [default] Enter |
You are here given an option of running OpenNTPD, OpenBSD's NTP implementation. OpenNTPD is a low-impact way of keeping your computer's clock accurately synchronized. The default configuration, using pool.ntp.org, uses a large number of free-access time servers around the world.
One reason you may NOT want to run ntpd(8) is if you are running a dual-boot system mostly using another OS which doesn't use a GMT-set hardware clock, and you don't want OpenBSD altering the time for your other OS.
Do you expect to run the X Window System? [yes] Enter |
Not all platforms will ask if you expect to run X, those that do ask require a sysctl to be set to use X. Answering "y" here will modify /etc/sysctl.conf to include the line machdep.allowaperture=1 or machdep.allowaperture=2, depending on your platform.
If you do not intend to run X on this system or are not sure, answer 'N' here, as you can easily change it by editing /etc/sysctl.conf and rebooting, should you need to later. There is a potential security advantage to leaving this aperture driver xf86(4) disabled, as the graphics engine on a modern video card could potentially be used to alter memory beyond the processor's control. Note that non-graphical applications that require X libraries and utilities to run do NOT need this sysctl to be set.
Do you want the X Window System to be started by xdm(1)? [no] y |
xdm(1) starts the X environment at system boot. We'd recommend doing this at install only if you are very confident that X will work on your system by default. Otherwise, configure X before setting up xdm(1).
Change the default console to com0? [no] Enter |
Setup a user? (enter a lower-case loginname, or 'no') [no] Enter |
You are being given an opportunity to create a user OTHER than root for system maintenance. This user will be a member of the "wheel" group so they can run su(1) and mail addressed to root will be forwarded to them. You will be prompted for a password.
Note that if you wish to create the user, enter the user's name, not "y" or "yes".
What timezone are you in? ('?' for list) [Canada/Mountain] US/Michigan |
OpenBSD assumes your computer's real-time clock (RTC) is set to GMT, but you also have to specify what time zone you are in. There may be several valid answers for your physical location. Hitting "?" at the prompt will help guide you to finding the best (most specific) time zone name.
Note that the installer will quite often guess correctly for your time zone, and you can then just hit "Enter".
More on setting the time zone here.
Laying out your disk appropriately is probably the most difficult part of an OpenBSD install. The good news is the default layout works well for learning OpenBSD.
Setting up disks in OpenBSD varies a bit between platforms. For i386, amd64, macppc, zaurus and armish, disk setup is done in two stages. First, the OpenBSD slice of the hard disk is defined using fdisk(8), then that slice is subdivided into OpenBSD partitions using disklabel(8).
Some users may be a little confused by the terminology used here. It will appear we are using the word "partition" in two different ways. This observation is correct. There are two layers of partitioning in the above OpenBSD platforms, the first, one could consider the Operating System partitioning, which is how multiple OSs on one computer mark out their own space on the disk, and the second one is how the OpenBSD partition is sub-partitioned into individual filesystems. The first layer is visible as a disk partition to DOS, Windows, and any other OS that uses this disk layout system, the second layer of partitioning is visible only to OpenBSD and those OSs which can directly read an OpenBSD filesystem.
OpenBSD's new installer attempts to make your disk layout tasks easier by having a sane default for "general" use. Note that many people will still want to customize the default, or use their own disk layout, but new users should probably start with this configuration until they see what they need to do differently. Note that the default layout will vary depending on how large your disk system is.
For now, we'll take the defaults on our 40G disk.
Available disks are: wd0. Which one is the root disk? (or 'done') [wd0] Enter Use DUIDs rather than device names in fstab? [yes] Enter Disk: wd0 geometry: 5221/255/63 [40960 Megabytes] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 06 0 1 1 - 521 254 63 [ 63: 8385867 ] DOS > 32MB 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Use (W)hole disk or (E)dit the MBR? [whole] Enter Setting OpenBSD MBR partition to whole wd0...done. |
Note that this disk has a pre-existing partition on it -- using "whole" disk will remove it!.
Setting up the "whole" disk for OpenBSD does a number of important things:
More information on fdisk partitioning your disk below.
Now we will break up our OpenBSD fdisk partition into OpenBSD disk partitions using disklabel(8):
Setting OpenBSD MBR partition to whole wd0...done. The auto-allocated layout for wd0 is: # size offset fstype [fsize bsize cpg] a: 1024.0M 64 4.2BSD 2048 16384 1 # / b: 199.0M 2097216 swap c: 40960.0M 0 unused d: 2822.9M 2504768 4.2BSD 2048 16384 1 # /tmp e: 4295.0M 8286112 4.2BSD 2048 16384 1 # /var f: 2048.0M 17082240 4.2BSD 2048 16384 1 # /usr g: 1024.0M 21276544 4.2BSD 2048 16384 1 # /usr/X11R6 h: 5426.7M 23373696 4.2BSD 2048 16384 1 # /usr/local i: 1699.7M 34487520 4.2BSD 2048 16384 1 # /usr/src j: 2048.0M 37968576 4.2BSD 2048 16384 1 # /usr/obj k: 20367.4M 42162880 4.2BSD 2048 16384 1 # /home Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] Enter |
The installer has presented us with its proposed "Auto layout" for OpenBSD partitions on our disk, which we are going to accept.
If the proposed layout is not appropriate for your needs, you can, of course, edit the default or customize it completely, more details on the disklabel partitioning below.
NOTE for re-installers: The new installer will not clear your old disklabel if you chose "(C)ustom Layout", but you will need to re-specify each mount point using the 'm' option in disklabel(8).
The installer now creates those partitions and creates file systems on them using newfs(8), and mounts them for installation:
/dev/rwd0a: 1024.0MB in 2097152 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0k: 20367.4MB in 41712448 sectors of 512 bytes 101 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0d: 2822.9MB in 5781344 sectors of 512 bytes 14 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0f: 2048.0MB in 4194304 sectors of 512 bytes 11 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0g: 1024.0MB in 2097152 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0h: 5426.7MB in 11113824 sectors of 512 bytes 27 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0j: 2048.0MB in 4194304 sectors of 512 bytes 11 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0i: 1699.7MB in 3481056 sectors of 512 bytes 9 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0e: 4295.0MB in 8796128 sectors of 512 bytes 22 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/wd0a on /mnt type ffs (rw, asynchronous, local) /dev/wd0k on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0f on /mnt/usr type ffs (rw, asynchronous, local, nodev) /dev/wd0g on /mnt/usr/X11R6 type ffs (rw, asynchronous, local, nodev) /dev/wd0h on /mnt/usr/local type ffs (rw, asynchronous, local, nodev) /dev/wd0j on /mnt/usr/obj type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0i on /mnt/usr/src type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid) |
You will note there is a c partition we seem to have ignored. This partition is your entire hard disk; don't attempt to alter it.
Location of sets? (cd disk ftp http or 'done') [cd] ftp HTTP/FTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] Enter Server? (hostname, list#, 'done' or '?') [ftp5.usa.openbsd.org] mirror.example.org |
If you can't remember your favorite (or any!) mirror's location, the installer will often be able to come up with a default of a mirror which will work well for you. Otherwise, hit "?" to have a list of mirrors displayed, and select the number of a mirror that will work well for you.
Server directory? [pub/OpenBSD/5.4/i386] Enter Login? [anonymous] Enter |
The public FTP mirrors all support anonymous downloads, of course, but you may have a local machine which requires a login and password.
You can now adjust the list of file sets.
Select sets by entering a set name, a file name pattern or 'all'. De-select sets by prepending a '-' to the set name, file name pattern or 'all'. Selected sets are labelled '[X]'. [X] bsd [X] etc54.tgz [X] xbase54.tgz [X] xserv54.tgz [X] bsd.rd [X] comp54.tgz [X] xetc54.tgz [ ] bsd.mp [X] man54.tgz [X] xshare54.tgz [X] base54.tgz [X] game54.tgz [X] xfont54.tgz Set name(s)? (or 'abort' or 'done') [done] Enter |
At a bare minimum, you need to have a kernel (bsd), the base54.tgz and etc54.tgz file sets. Unless you know what you are doing, stick with the default sets. You can add and remove file sets using "+" and "-" chars in front of the file set name, and also use wildcards:
And now, we start our install! This is the point at which you might want to come back later if you have a slow computer or Internet connection, though with a fast computer and local files, this process may take just a couple minutes or less!
bsd 100% |*************************************| 9399 KB 00:05 bsd.rd 100% |*************************************| 6350 KB 00:03 base54.tgz 100% |*************************************| 55803 KB 00:26 etc54.tgz 100% |*************************************| 511 KB 00:00 comp54.tgz 100% |*************************************| 47533 KB 00:28 man54.tgz 100% |*************************************| 9761 KB 00:06 game54.tgz 100% |*************************************| 2568 KB 00:02 xbase54.tgz 100% |*************************************| 10562 KB 00:06 xetc54.tgz 100% |*************************************| 64774 00:00 xshare54.tgz 100% |*************************************| 4373 KB 00:04 xfont54.tgz 100% |*************************************| 38869 KB 00:17 xserv54.tgz 100% |*************************************| 25954 KB 00:15 Location of sets? (cd disk ftp http or 'done') [done] Enter |
Yes, it is asking us again where we wish to install things from. This is so either missed, forgotten or failed file sets can be re-installed, and also so custom file sets can be installed.
Again, we just take the default, we are done installing files
Saving configuration files...done. Generating initial host.random file...done. Making all device nodes...done. CONGRATULATIONS! Your OpenBSD install has been successfully completed! To boot the new system, enter 'reboot' at the command prompt. When you login to your new system the first time, please read your mail using the 'mail' command. # |
One of your first things to read after you install your system is afterboot(8).
You may also find the following links useful:
Which one do you wish to configure? (or 'done') [xl0] Enter IPv4 address for xl0? (or 'dhcp' or 'none') [dhcp] 192.168.1.37 Netmask? [255.255.255.0] 255.255.254.0 IPv6 address for xl0? (or 'rtsol' or 'none') [none] Enter |
After that set of questions, you will be given a chance to configure any other network adapters that your machine has. If you specify another network adapter here, the above questions repeat.
Available network interfaces are: xl0 vlan0. Which one do you wish to configure? (or 'done') [done] |
Now, you will set up the default gateway and DNS servers, things that impact all network adapters:
Default IPv4 route? (IPv4 address, 'dhcp' or 'none') 192.168.1.1 add net default: gateway 192.168.1.1 DNS domain name? (e.g. 'bar.com') [my.domain] example.org DNS nameservers? (IP address list or 'none') [none] 192.168.1.250 192.168.1.251 |
Note that multiple DNS servers can be listed, separated by spaces.
Sometimes, you will have to do something more, for example set up a wireless access key or hard-set a duplex or speed setting (don't do this unless you absolutely HAVE to, fixing your switch configuration is a much better idea!). You are now given a chance to drop to the shell and do any manual configuration that you would like.
Do you want to do any manual network configuration? [no] y Type 'exit' to return to install. # ifconfig xl0 media xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:08:74:2c:df:9c groups: egress media: Ethernet autoselect (100baseTX full-duplex) status: active supported media: media 10baseT media 10baseT mediaopt full-duplex media 100baseTX media 100baseTX mediaopt full-duplex media autoselect inet 192.168.1.37 netmask 0xfffffe00 broadcast 192.168.1.255 # ifconfig xl0 media 100baseTX mediaopt full-duplex # ifconfig xl0 xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:08:74:2c:df:9c groups: egress media: Ethernet 100baseTX full-duplex status: active inet6 fe80::208:74ff:fe2c:df9c%xl0 prefixlen 64 scopeid 0x1 inet 192.168.1.37 netmask 0xfffffe00 broadcast 192.168.1.255 # exit ...setup resumes... |
(back to where we might have been)
Multiple time zone definition files will sometimes give the same current time, but may have different history. For example, EST5EDT and US/Michigan have the same time NOW, but back in 1975, the rules were different, so if you were doing math with dates and times that involved 1975, you would care about the differences. You should use the most specific and accurate timezone file you can for your region, rather than one that just gives the correct time at this moment.
OpenBSD's installer will help you find an appropriate time zone file for you if you are not sure. Simply hit "?" at each prompt, and the installer will show you options. If the first level of answers doesn't suite you, pick a continent or country, and look at your options there:
What timezone are you in? ('?' for list) [right/EST5EDT] ? Africa/ Chile/ GB-Eire Israel NZ-CHAT UCT America/ Cuba GMT Jamaica Navajo US/ Antarctica/ EET GMT+0 Japan PRC UTC Arctic/ EST GMT-0 Kwajalein PST8PDT Universal Asia/ EST5EDT GMT0 Libya Pacific/ W-SU Atlantic/ Egypt Greenwich MET Poland WET Australia/ Eire HST MST Portugal Zulu Brazil/ Etc/ Hongkong MST7MDT ROC posix/ CET Europe/ Iceland Mexico/ ROK posixrules CST6CDT Factory Indian/ Mideast/ Singapore right/ Canada/ GB Iran NZ Turkey What timezone are you in? ('?' for list) [right/EST5EDT] US What sub-timezone of 'US' are you in? ('?' for list) ? Alaska Central Hawaii Mountain Samoa Aleutian East-Indiana Indiana-Starke Pacific Arizona Eastern Michigan Pacific-New What sub-timezone of 'US' are you in? ('?' for list) Michigan |
We've now set the time to "US/Michigan". This creates a symbolic link in /etc pointing to the appropriate zoneinfo file in /usr/share/zoneinfo, something like this:
Note the directory "right/", this directory includes leap second adjustments, but otherwise duplicates the standard zoneinfo choices. More here./etc/localtime -> /usr/share/zoneinfo/US/Michigan
(back to where we might have been)
fdisk(8) is used to mark off the OpenBSD part of your hard disk. It helps mark off the part of the disk used by OpenBSD from the parts used by other OSs or system functions.
If you have a partition on your disk you wish to retain or wish to leave space for another partition, you will NOT want to chose "(W)hole disk", but will need to edit the partition table with fdisk(8). More information on manually running fdisk(8) can be found here. Before working with any system that has data you don't wish to lose, make sure you have a good backup. It is very easy in this process to clobber important data, so make sure you are ready to get it back, if need be.
If you are adding OpenBSD to an existing system, you will probably need to create some free space on your system before installing OpenBSD. This will usually involve deleting or possibly reducing the size of existing partitions. The program gparted has been found useful for shrinking the partitions of many popular OSs, making it possible to install OpenBSD on the freed space.
In this example, we will assume we are starting with a blank 40G disk and wish to create a multi-boot system, reserving 5G at the beginning of the disk for Windows, and the rest for OpenBSD. Note that a blank drive has to have valid MBR boot code and signature written to the disk before it can be booted.
The process is very much the same for working around an existing partition, you just need to skip over the parts where we create the Windows partition and worry about installing the MBR boot code.
Available disks are: wd0. Which one is the root disk? (or 'done') [wd0] Enter MBR has invalid signature; not showing it. |
If the disk had a valid MBR in place, it would show you the existing partition table, which can be a good way to show if a disk may have data on it already.
Use (W)hole disk or (E)dit the MBR? [whole] e You will now create a single MBR partition to contain your OpenBSD data. This partition must have an id of 'A6'; must *NOT* overlap other partitions; and must be marked as the only active partition. Inside the fdisk command, the 'manual' command describes all the fdisk commands in detail. Disk: wd0 geometry: 4998/255/63 [80293248 Sectors] Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Enter 'help' for information fdisk: 1> |
First of all notice the fdisk prompt. The number "1" indicates the first level of partition tables -- if you were editing an extended partition, it would be "2" (or bigger). Extended partitions are partitions which have their own sub-partition table, getting around the IBM AT four partition design limit. Extended partitions won't be covered here.
First, we will make partition "0" a 5G Windows partition (using NTFS), and partition "1" will be our OpenBSD partition using the rest of the disk.
fdisk: 1> e 0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Partition id ('0' to disable) [0 - FF]: [0] (? for help) |
Since we don't know by memory what the partition ID is for NTFS, we hit "?" here to get a list.
Partition id ('0' to disable) [0 - FF]: [0] (? for help) ? Choose from the following Partition id values: 00 unused 20 Willowsoft 66 NetWare 386 A9 NetBSD 01 DOS FAT-12 24 NEC DOS 67 Novell AB MacOS X boot 02 XENIX / 27 Win Recovery 68 Novell AF MacOS X HFS+ 03 XENIX /usr 38 Theos 69 Novell B7 BSDI filesy* 04 DOS FAT-16 39 Plan 9 70 DiskSecure B8 BSDI swap 05 Extended DOS 40 VENIX 286 75 PCIX BF Solaris 06 DOS > 32MB 41 Lin/Minux DR 80 Minix (old) C0 CTOS 07 NTFS 42 LinuxSwap DR 81 Minix (new) C1 DRDOSs FAT12 08 AIX fs 43 Linux DR 82 Linux swap C4 DRDOSs < 32M 09 AIX/Coherent 4D QNX 4.2 Pri 83 Linux files* C6 DRDOSs >=32M 0A OS/2 Bootmgr 4E QNX 4.2 Sec 84 OS/2 hidden C7 HPFS Disbled 0B Win95 FAT-32 4F QNX 4.2 Ter 85 Linux ext. DB CPM/C.DOS/C* 0C Win95 FAT32L 50 DM 86 NT FAT VS DE Dell Maint 0E DOS FAT-16 51 DM 87 NTFS VS E1 SpeedStor 0F Extended LBA 52 CP/M or SysV 8E Linux LVM E3 SpeedStor 10 OPUS 53 DM 93 Amoeba FS E4 SpeedStor 11 OS/2 hidden 54 Ontrack 94 Amoeba BBT EB BeOS/i386 12 Compaq Diag. 55 EZ-Drive 99 Mylex EE EFI GPT 14 OS/2 hidden 56 Golden Bow 9F BSDI EF EFI Sys 16 OS/2 hidden 5C Priam A0 NotebookSave F1 SpeedStor 17 OS/2 hidden 61 SpeedStor A5 FreeBSD F2 DOS 3.3+ Sec 18 AST swap 63 ISC, HURD, * A6 OpenBSD F4 SpeedStor 19 Willowtech 64 NetWare 2.xx A7 NEXTSTEP FF Xenix BBT 1C ThinkPad Rec 65 NetWare 3.xx A8 MacOS X Partition id ('0' to disable) [0 - FF]: [0] (? for help) 07 |
Now we define its starting and ending points:
Do you wish to edit in CHS mode? [n] |
CHS mode allows you to specify disk space in Cylinders, Heads and Sectors. Keep in mind that for modern hard disks, the CHS numbers are completely bogus, just three numbers that translate to a sector on the disk, which is translated to your drives physical geometry (which probably varies across the disk anyway).
If you answer "y" here, you will be prompted for the starting and ending cylinder, head and sector. If you answer "no" here (as we will), you will be prompted for starting sector and the size. Editing by CHS is often easier when working around an existing partition, starting sector and size is often easier when you want to quickly create a partition of a given size.
offset: [0] 64 |
The fdisk platforms need gap before the first partition. The exact amount will not matter on modern machines, OpenBSD defaults to 64 sectors. This is recommended for performance reasons on modern disks, and does not matter on older disks.
size: [0] 5g Rounding to nearest cylinder: 10490382 |
The "Size" value can be the number of sectors (512 bytes each), or the desired capacity when followed by a "k", "m" or "g". When editing using offset and size, fdisk will round your partition so it ends on a cylinder boundary (OpenBSD doesn't care about this, and it is possible no modern OS cares about this, but some might have at one time).
Now, let's look at our new partition:
fdisk:*1> p Disk: wd0 geometry: 4998/255/63 [80293248 Sectors] Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 07 0 1 1 - 652 254 63 [ 63: 10490382 ] NTFS 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused fdisk:*1> |
Note that the prompt now includes an "*", this means there are unsaved changes.
We've now created our Windows partition. Note that this partition is so far just reserved space on the disk, it isn't formatted; no file system exists here. You will worry about that when you install Windows; we've accomplished our goal of reserving space for the Windows partition to be created later.
Now we create our OpenBSD partition. In this case, the partition ID will be "A6".
fdisk:*1> e 1 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Partition id ('0' to disable) [0 - FF]: [0] (? for help) a6 Do you wish to edit in CHS mode? [n] Enter offset: [0] |
uh-oh! What's our offset? Simple -- the offset of the previous partition plus the size of the partition, in this case, 63+10490382 = 10490445.
offset: [0] 10490445 size: [0] * fdisk:*1> |
Note that here, we entered "*" as the size, meaning "rest of the disk". Again, we could have entered the size in sectors, "m" or "g" if we wanted to leave space for something else.
Now we look at our partition table:
fdisk:*1> p Disk: wd0 geometry: 4998/255/63 [80293248 Sectors] Offset: 0 Signature: 0x0 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 07 0 1 1 - 652 254 63 [ 63: 10490382 ] NTFS 1: A6 653 0 1 - 4998 5 63 [ 10490445: 69802803 ] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused fdisk:*1> |
WE AREN'T DONE YET!
This disk is not yet bootable!
As it was a brand new disk, the disk's
MBR was completely blank.
The "Signature: 0x0" message there shows there is not a valid signature
(0xAA55), which indicates there definitely is not a valid boot code.
Of course, you could have a valid signature without valid boot code,
through either random bad luck or damage to the existing boot code, but
an invalid signature pretty well indicates you are lacking boot code, so
we will install it now using the "update" command:
fdisk:*1> update Machine code updated. fdisk:*1> |
We also have to "flag" a partition as "active" so the boot ROM knows what partition to boot from:
fdisk:*1> f 1 Partition 1 marked active. |
Now, let's see how it looks:
fdisk:*1> p Disk: wd0 geometry: 4998/255/63 [80293248 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------------- 0: 07 0 1 1 - 652 254 63 [ 63: 10490382 ] NTFS *1: A6 653 0 1 - 4998 5 63 [ 10490445: 69802803 ] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused fdisk:*1> |
A checklist of things you want to make sure about before you exit fdisk(8):
(Back to where we may have been)
All partitions which have native FFS partitions on them should be within the OpenBSD fdisk(8) partition, however non-OpenBSD partitions can (and usually should) be outside the OpenBSD fdisk partition.
More information on using disklabel can be found here.
More information on the why partitioning is good and strategy for a good partitioning plan are below.
The OpenBSD installer will attempt to auto-partition your disk in a usable, "general purpose" configuration, based on the size of your disk. If your disk is big enough, unused space will be allocated to the /home partition. While this is often quite useful, it doesn't satisfy all users' needs.
For our example, we'll assume we are building a static web server for some of our friends to use. We have a machine attached to a modest Internet connection, with a 40G disk, with most of it used for OpenBSD (with the same 5G Windows partition as the example above. Why? Maybe this system has a RAID controller which is supported by OpenBSD, but manageable only from within Windows. More likely, because the FAQ editor doesn't feel like maintaining lots of different example systems).
The web pages served by an OpenBSD web server will be in /var/www, and very little will be stored in /home, so this indicates a definite change from the default that needs to be made. For the sake of discussion, we'll also assume that we won't need to rebuild the OS from source on this machine (we'll do that elsewhere). The system will not run X, however being that some web applications expect X to be installed, we will have X installed. The machine is not overly powerful, it can't have more than 1G RAM in it, and it is unlikely our application will ever desire more than that.
So, after a bit of thought, our plan is to partition the system like this:
The auto-allocated layout for wd0 is: # size offset fstype [fsize bsize cpg] a: 1024.0M 10490445 4.2BSD 2048 16384 1 # / b: 252.1M 12587597 swap c: 39205.7M 0 unused d: 2319.3M 13103933 4.2BSD 2048 16384 1 # /tmp e: 3653.9M 17853877 4.2BSD 2048 16384 1 # /var f: 1149.8M 25337016 4.2BSD 2048 16384 1 # /usr g: 1024.0M 27691862 4.2BSD 2048 16384 1 # /usr/X11R6 h: 3422.6M 29789014 4.2BSD 2048 16384 1 # /usr/local i: 5122.3M 63 NTFS j: 1848.7M 36798433 4.2BSD 2048 16384 1 # /usr/src k: 1848.7M 40584654 4.2BSD 2048 16384 1 # /usr/obj l: 17540.2M 44370875 4.2BSD 2048 16384 1 # /home Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout? [a] c |
If we had only minor revisions, we'd probably opt to "Edit" the custom layout rather than starting from a clean slate, but we are going to do things the hard way here.
You will now create an OpenBSD disklabel inside the OpenBSD MBR partition. The disklabel defines how OpenBSD splits up the MBR partition into OpenBSD partitions in which filesystems and swap space are created. You must provide each filesystem's mountpoint in this program. The offsets used in the disklabel are ABSOLUTE, i.e. relative to the start of the disk, NOT the start of the OpenBSD MBR partition. Label editor (enter '?' for help at any prompt) > p OpenBSD area: 10490445-80293248; size: 69802803; free: 69802803 # size offset fstype [fsize bsize cpg] c: 80293248 0 unused i: 10490382 63 NTFS > |
Note there are already two partitions here -- the "c" partition which is always there and created for you, but disklabel(8) has also noticed the existing NTFS partition and assigned it a disklabel partition so it could potentially be accessed by OpenBSD (note, at this time, NTFS support is experimental and requires a custom kernel but FAT/FAT32 support is quite good).
We will now create our partitions. We will start with the "a" partition, our root partition:
> a a offset: [10490445] Enter size: [69802803] 100m Rounding to cylinder: 208845 FS type: [4.2BSD] Enter mount point: [none] / > |
Note that disklabel defaulted to the first available OpenBSD sector on the disk, which is what we want. It also defaulted to a size of all available space, which is NOT what we want. Here we overrode it with our preferred size, which can be specified in sectors, "M" or "G".
You will usually want to use the default FS type of "4.2BSD" for a FFS (Fast File System) or FFS2 partition, though other types you may find useful include "swap" and "RAID".
Finally is the mount point. Our "a" partition is the root partition, by definition.
Now, we do swap, which is our 'b' partition (again, this is a requirement -- 'b' on your boot disk is swap):
> a b offset: [10699290] Enter size: [69593958] 1g Rounding to cylinder: 2104515 FS type: [swap] Enter > |
Again, disklabel correctly calculated our starting sector, and presented us with a suggested size of "entire remaining space", which we again overrode with our desired size. Since this is the 'b' partition, disklabel assumed it was to be used for swap, and when we confirmed that, it didn't bother to ask us a mount point.
We are now ready to create the rest of the partitions.
> a d offset: [12803805] Enter size: [67489443] 2g Rounding to cylinder: 4209030 FS type: [4.2BSD] Enter mount point: [none] /usr > a e offset: [17012835] Enter size: [63280413] 100m Rounding to cylinder: 208845 FS type: [4.2BSD] Enter mount point: [none] /tmp > a f offset: [17221680] Enter size: [63071568] 2g Rounding to cylinder: 4209030 FS type: [4.2BSD] Enter mount point: [none] /usr/local > a g offset: [21430710] Enter size: [58862538] 1g Rounding to cylinder: 2104515 FS type: [4.2BSD] Enter mount point: [none] /usr/X11R6 > a h offset: [23535225] Enter size: [56758023] 1g Rounding to cylinder: 2104515 FS type: [4.2BSD] Enter mount point: [none] /home > a j offset: [25639740] Enter size: [54653508] 1g Rounding to cylinder: 2104515 FS type: [4.2BSD] Enter mount point: [none] /var > a k offset: [27744255] Enter size: [52548993] Enter FS type: [4.2BSD] Enter mount point: [none] /var/www > |
Note that on the /var/www partition ("k"), we just took the default to use all remaining available disk space. With modern monstrously huge drives, this is usually a bad idea. If you know you will never use it, don't allocate it, and save it for some future use.
Now, let's look at our results, using the "p" and "p m" commands:
> p OpenBSD area: 10490445-80293248; size: 69802803; free: 0 # size offset fstype [fsize bsize cpg] a: 208845 10490445 4.2BSD 2048 16384 1 # / b: 2104515 10699290 swap c: 80293248 0 unused d: 4209030 12803805 4.2BSD 2048 16384 1 # /usr e: 208845 17012835 4.2BSD 2048 16384 1 # /tmp f: 4209030 17221680 4.2BSD 2048 16384 1 # /usr/local g: 2104515 21430710 4.2BSD 2048 16384 1 # /usr/X11R6 h: 2104515 23535225 4.2BSD 2048 16384 1 # /home i: 10490382 63 NTFS j: 2104515 25639740 4.2BSD 2048 16384 1 # /var k: 52548993 27744255 4.2BSD 2048 16384 1 # /var/www > p m OpenBSD area: 10490445-80293248; size: 34083.4M; free: 0.0M # size offset fstype [fsize bsize cpg] a: 102.0M 10490445 4.2BSD 2048 16384 1 # / b: 1027.6M 10699290 swap c: 39205.7M 0 unused d: 2055.2M 12803805 4.2BSD 2048 16384 1 # /usr e: 102.0M 17012835 4.2BSD 2048 16384 1 # /tmp f: 2055.2M 17221680 4.2BSD 2048 16384 1 # /usr/local g: 1027.6M 21430710 4.2BSD 2048 16384 1 # /usr/X11R6 h: 1027.6M 23535225 4.2BSD 2048 16384 1 # /home i: 5122.3M 63 NTFS j: 1027.6M 25639740 4.2BSD 2048 16384 1 # /var k: 25658.7M 27744255 4.2BSD 2048 16384 1 # /var/www > |
Like with fdisk, you don't want your OpenBSD disklabel partitions to overlap (other than the 'c' partition, which overlaps everything, of course).
Write your changes and quit disklabel:
> w > q No label changes. newfs: reduced number of fragments per cylinder group from 13048 to 12992 to enlarge last cylinder group /dev/rwd0a: 102.0MB in 208844 sectors of 512 bytes 5 cylinder groups of 25.38MB, 1624 blocks, 3328 inodes each /dev/rwd0h: 1027.6MB in 2104512 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each newfs: reduced number of fragments per cylinder group from 13048 to 12992 to enlarge last cylinder group /dev/rwd0e: 102.0MB in 208844 sectors of 512 bytes 5 cylinder groups of 25.38MB, 1624 blocks, 3328 inodes each /dev/rwd0d: 2055.2MB in 4209028 sectors of 512 bytes 11 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0g: 1027.6MB in 2104512 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0f: 2055.2MB in 4209028 sectors of 512 bytes 11 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0j: 1027.6MB in 2104512 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0k: 25658.7MB in 52548992 sectors of 512 bytes 127 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/wd0a on /mnt type ffs (rw, asynchronous, local) /dev/wd0h on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0e on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0d on /mnt/usr type ffs (rw, asynchronous, local, nodev) /dev/wd0g on /mnt/usr/X11R6 type ffs (rw, asynchronous, local, nodev) /dev/wd0f on /mnt/usr/local type ffs (rw, asynchronous, local, nodev) /dev/wd0j on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0k on /mnt/var/www type ffs (rw, asynchronous, local, nodev, nosuid) Let's install the sets! ... |
(Back to where we may have been)
The complete OpenBSD installation is broken up into a number of separate file sets. Not every application requires every file set, however new users are recommended to install ALL of them. Here is an overview of each:
IF you need X, just install it. It won't hurt you any more than the application you are needing it for will.
If you do decide to not install the compiler, you will probably need another system to maintain and build updated software on. There are far more systems that have been compromised because of improper maintenance than there have been because a compiler was installed.
Obviously, the answer to this question varies tremendously based on your use of the system. OpenBSD can be installed in as little as 512M, but using that small of a device is something for advanced users. Until you have some experience, an 8G or larger hard disk is recommended to start with.
Unlike many other OSs, OpenBSD encourages users to partition their disk into a number of partitions, rather than having just one or two big partitions. There are a number of reasons to partition your disk:
Some additional thoughts on partitioning:
Preferably use one of the four primary MBR partitions for booting OpenBSD (i.e., extended partitions may not work).
Note that Windows 7 and Vista can resize their system partitions: go to the Control Panel, search for "partition", and enter the corresponding system tool. Right click on a partition, and you will notice you can shrink it. Its main limitation is that the Windows Exchange File can't be moved, so if you need more space, you may have to move/disable it.
Here are several options to multibooting:
boot hd0a:/bsdto cause the system to boot from hard drive 0, OpenBSD partition 'a', kernel file /bsd. Note you can also boot from other drives with a line like: "boot hd2a:/bsd" to boot off the third hard drive on your system. To boot from OpenBSD, slip your floppy in, reboot. To boot from the other OS, eject the floppy, reboot. (You can, of course, use this floppy to make a bootable CD, too.)
The boot(8) program is loaded from the floppy, looks for and reads /etc/boot.conf. The "boot hd0a:/bsd" line instructs boot(8) where to load the kernel from -- in this case, the first HD the BIOS sees. Keep in mind, only a small file (/boot) is loaded from the floppy -- the system loads the entire kernel off the hard disk, so this only adds about five seconds to the boot process.
# dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1Note: this is a really good time to remind you that blindly typing commands in you don't understand is a really bad idea. This line will not work directly on most computers. It is left to the reader to adapt it to their machine.
Now boot NT and put openbsd.pbr in C:. Add a line like this to the end of C:\BOOT.INI:
c:\openbsd.pbr="OpenBSD"
When you reboot, you should be able to select OpenBSD from the NT loader menu. There is much more information available about NTLDR at the NTLDR Hacking Guide.
On Windows XP you can also edit the boot information using the GUI; see the XP Boot.ini HOWTO.
Programs that do much of this for you are available, for example, BootPart. This program can be run from Windows NT/2000/XP, and will fetch the OpenBSD PBR, place it on your NT/2000/XP partition, and will add it to C:\BOOT.INI.
Note: The Windows NT/2000/XP boot loader is only capable of booting OSs from the primary hard drive. You can not use it to load OpenBSD from the second drive on a system.
With Vista, Microsoft dropped NTLDR support in favor of their newer Boot Configuration Data (BCD) store used for controlling the boot environment. Since BOOT.INI is no longer available for customization, a command-line utility, bcdedit, takes its place.
Once OpenBSD's PBR is copied to Vista's system partition, the following three commands are required to select and boot OpenBSD when the system is restarted:
C:\Windows\system32> bcdedit /create /d "OpenBSD/i386" /application bootsector The entry {05a763ce-d81b-11db-b3ec-000000000000} was successfully created. C:\Windows\System32>
The GUID returned here, 05a763ce-d81b-11db-b3ec-000000000000, is shown for illustrative reasons. Take note of the GUID displayed when you run this command as this value will need to be copied into the following commands. Simply copying the GUID shown above will not work.
The following two commands are also required:
C:\Windows\system32> bcdedit /set {05a763ce-d81b-11db-b3ec-000000000000} device boot The operation completed successfully. C:\Windows\system32> bcdedit /set {05a763ce-d81b-11db-b3ec-000000000000} path \openbsd.pbr The operation completed successfully. C:\Windows\system32>
This must be run in a shell with administrative privileges. Once you've located cmd.exe, right click to be able to select "run as administrator".
Note the absolute pathname of the imported PBR file. Do not add a drive letter as it is assumed that the file is placed in the system partition. bcdedit will not complain about an explicit drive specification, but the boot manager will later balk claiming that it cannot resolve the designated pathname.
Upon rebooting, Vista will be listed first in the boot manager ultimately followed by OpenBSD. Selecting either entry will boot the corresponding operating system.
If nothing happens, look around in the control panel for boot information. Most likely, your Windows boot is set up with no delay, so you don't see the boot menu. You can also use this to boot OpenBSD by default.
For more information, consult bcdedit's help by issuing:
C:\Windows\system32> bcdedit /?
or by searching Microsoft's documentation and Website. A good introduction can be found in this TechNet Frequently Asked Questions article.
For those who find manual configuration daunting, EasyBCD provides a GUI alternative.
Microsoft has enhanced BCD since releasing Vista to allow multiple versions of Windows to be booted through bcdedit. Because of this greater control, five commands are required to configure a multiboot environment with OpenBSD.
After copying OpenBSD's PBR into Windows 7's system partition, issue the following command to initialize the needed registry hive:
C:\Windows\system32> bcdedit /create /d "OpenBSD/i386" /application bootsector The entry {0154a872-3d41-11de-bd67-a7060316bbb1} was successfully created. C:\Windows\system32>
As admonished before, the {0154a872-3d41-11de-bd67-a7060316bbb1} GUID is system-dependent. Note the value you receive when executing, and copy it into the following commands:
C:\Windows\system32> bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} device boot The operation completed successfully. C:\Windows\system32> bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} path \openbsd.pbr The operation completed successfully. C:\Windows\system32> bcdedit /set {0154a872-3d41-11de-bd67-a7060316bbb1} device partition=c: The operation completed successfully. C:\Windows\system32> bcdedit /displayorder {0154a872-3d41-11de-bd67-7060316bbb1} /addlast The operation completed successfully. C:\Windows\system32>
Some other bootloaders OpenBSD users have used successfully include GAG, The Ranish Partition Manager, rEFIt, and GRUB.
Please refer to INSTALL.linux, which gives in depth instructions on getting OpenBSD working with Linux.
Just to remind people, it's important for the OpenBSD developers to keep track of what hardware works, and what hardware doesn't work perfectly, including the hardware sensors that are found in machines.
A quote from /usr/src/etc/root/root.mail
If you wish to ensure that OpenBSD runs better on your machines, please do us a favor (after you have your mail system configured!) and type something like: # (dmesg; sysctl hw.sensors) | \ mail -s "Sony VAIO 505R laptop, apm works OK" dmesg@openbsd.org so that we can see what kinds of configurations people are running. As shown, including a bit of information about your machine in the subject or the body can help us even further. We will use this information to improve device driver support in future releases. (Please do this using the supplied GENERIC kernel, not for a custom compiled kernel, unless you're unable to boot the GENERIC kernel. If you have a multi-processor machine, dmesg results of both GENERIC.MP and GENERIC kernels are appreciated.) The device driver information we get from this helps us fix existing drivers. Thank you!
Make sure you send email from an account that is able to also receive email so developers can contact you if they have something they want you to test or change in order to get your setup working. It's not important at all to send the email from the same machine that is running OpenBSD, so if that machine is unable to receive email, just
$ (dmesg; sysctl hw.sensors) | mail your-account@yourmail.domand then forward that message to
dmesg@openbsd.orgwhere your-account@yourmail.dom is your regular email account.
NOTES
The method above is very easy, but if you have chosen not to configure mail on your OpenBSD system, you should still send your dmesg to the developers. Save your dmesg output to a text file.
$ (dmesg; sysctl hw.sensors) > ~/dmesg.txtThen transfer this file (using FTP/scp/floppydisk/carrier-pigeon/...) to the system you normally use for email. Since the dmesg output you send in is processed automatically, be sure to check the following when using alternate email clients/systems:
Sometimes, you realize you really DID need comp54.tgz (or any other system component) after all, but you didn't realize this at the time you installed your system. Good news: There are two easy ways to add file sets after the initial install:
# tar -C / -xzvphf comp54.tgz |
Do NOT forget the 'p' option in the above command in order to restore the file permissions properly!
One common mistake is to think you can use pkg_add(1) to add missing file sets. This does not work. pkg_add(1) is the package management tool to install third party software. It handles package files, not generic tar files like the install sets.
If you are installing the xbase file set on your system for the first time using tar(1) and without rebooting, the shared library cache must be updated after the installation using ldconfig(8). To add all the X libraries to the cache:
Alternatively, you can just reboot your system, and this will be done automatically by the rc(8) startup script.# ldconfig -m /usr/X11R6/lib
Calling it a "RAM Disk kernel" describes the root filesystem of the kernel -- rather than being a physical drive, the utilities available after the boot of bsd.rd are stored in the kernel, and are run from a RAM-based filesystem. bsd.rd also includes a healthy set of utilities to allow you to do system maintenance and installation.
On some platforms, bsd.rd is actually the preferred installation technique -- you place this kernel on an existing filesystem, boot it, and run the install from it. On most platforms, if you have a running older version of OpenBSD, you can FTP a new version of bsd.rd, reboot from it, and install a new version of OpenBSD without using any removable media at all.
Here is an example of booting bsd.rd on an i386 system:
Using Drive: 0 Partition: 3 reading boot..... probing: pc0 com0 com1 apm mem[639k 255M a20=on] disk: fd0 hd0+ >> OpenBSD/i386 BOOT 3.18 boot> boot hd0a:/bsd.rd . . . normal boot to install . . . |
As indicated, you will be brought to the install program, but you can also drop to the shell to do maintenance on your system.
The general rule on booting bsd.rd is to change your boot kernel from /bsd to bsd.rd through whatever means used on your platform.
machine mem +0x3000000@0x1000000to add 48M (0x3000000) after the first 16M (0x1000000). Typically, if you had a machine with this problem, you would enter the above command first at the install floppy/CD-ROM's boot> prompt, load the system, reboot, and create an /etc/boot.conf file with the above line in it so all future bootings will recognize all available RAM.
It has also been reported that a ROM update will fix this on some systems.
# fdisk -u wd0Note: the "update" option within the interactive ("-e") mode of fdisk will not write the signature bytes required to make the disk bootable.
Users of very slow machines may wish to generate their keys on another computer, place them in a site54.tgz file, and install them with the rest of the file sets.
Display the list of known ftp servers? [no] yes Getting the list from 192.128.5.191 (ftp.openbsd.org)... FAILED Failed to change directory. Server IP address or hostname? |
This is normal and expected behavior during this pre-release part of the cycle. The install program looks for the FTP list on the primary FTP server in a directory that won't be available until the release date, so you get the above message.
Simply use the FTP mirror list to find your favorite FTP mirror, and manually enter its name when prompted.
Note: You should not see this if you are installing -release or from CD-ROM.
While this configuration can work, it can be a maintenance problem and should be fixed. To fix this, the disk's file systems must generally be recreated from scratch (though if you REALLY know what you are doing, you may be able to recreate just your disklabel and MBR, and only lose and have to rebuild the first OpenBSD partition on the disk).
Actual -release file sets should all match their stored checksums.
At times, snapshots may not have proper checksums stored with the install kernels. This will happen for various reasons on the building side, and is not reason to panic for development snapshots. If you are concerned about this, wait for the next snapshot.
This file set allows the user to add to and/or override the files installed in the 'normal' sets and thus customize the installation or upgrade.
You can also create and use hostname-specific install sets, which are named siteXX-<hostname>.tgz, for example, "site54-puffy.tgz". This allows easy per-host customized installations, upgrades, or disaster recovery.
Some example uses of a siteXX.tgz file:
Note that the install.site script would have to be in a siteXX.tgz file, while the upgrade.site script could be put in the root directory before the upgrade, or could be put in a siteXX.tgz file.
The scripts can be used to do many things:
The combination of siteXX.tgz and install.site/upgrade.site files is intended to give users broad customization capabilities without having to build their own custom install sets.
Note: if you will be doing your install from an http server, you will need to add your site*.tgz file(s) to the file index.txt in the source directory in order for them to be listed as an option at install time. This is not needed for FTP or other installs.
If this is an acceptable situation, you may find the dd command will do what you need, allowing you to copy one disk to another, sector-for-sector. This would provide the same functionality as commercial programs without the cost.
mount -t msdos /dev/fd0a /mnt dmesg >/mnt/dmesg.txt umount /mntIf you have another OpenBSD system, you can also write it to an OpenBSD compatible floppy -- often, the boot floppy has enough room on it to hold the dmesg. In that case, leave off the "-t msdos" above.
General information on setting up a serial console is provided elsewhere in the FAQ; in order to capture a log of the install, the following commands are usually sufficient.
i386
At the boot loader prompt, enter
boot> set tty com0
This will tell OpenBSD to use the first serial port (often called COM1 or COMA in PC documentation) as a serial console. The default baud rate is 9600.
Sparc/Sparc64
These machines will automatically use a serial console if started without a keyboard present. If you have a keyboard and monitor attached, you can still force the system to use a serial console with the following invocation at the ok prompt.
ok setenv input-device ttya ok setenv output-device ttya ok reset
[FAQ Index] [To Section 3 - Getting started with OpenBSD] [To Section 5 - Building the System from Source]