bsd.rd
)
that spawns a live environment running entirely in memory.
It contains the install script and a small number of utilities needed
to perform a complete installation.
These utilities can also be useful for disaster recovery.
The ramdisk kernel can be booted from a number of different sources:
If you have a running OpenBSD system, bsd.rd
is all you need to
reinstall or upgrade to a newer version.
To do so,
download and verify the new bsd.rd
,
place it on an existing filesystem, and boot from it.
The general method of booting bsd.rd
is to change your boot kernel
from /bsd
to /bsd.rd
through whatever means used on
your platform.
Booting from bsd.rd
on an amd64 system can be done like so:
Using drive 0, partition 3. Loading...... probing: pc0 com0 com1 mem[638K 1918M a20=on] disk: hd0+ hd1+ >> OpenBSD/amd64 BOOT 3.33 boot> bsd.rdThis will boot the kernel named
bsd.rd
from the first partition
of the first recognized hard disk.
If you need to specify a different drive or partition, just prefix the kernel name with its location. The following example would boot from the fourth partition of the second hard drive:
Using drive 0, partition 3. Loading...... probing: pc0 com0 com1 mem[638K 1918M a20=on] disk: hd0+ hd1+ >> OpenBSD/amd64 BOOT 3.33 boot> boot hd1d:/bsd.rdOpenBSD boot loaders are documented in the architecture-specific boot(8) man pages.
[alpha] [amd64] [arm64] [armv7] [hppa] [i386] [landisk] [luna88k] [macppc] [octeon] [powerpc64] [riscv64] [sparc64]
install70.img |
A disk image that can be written to a USB flash drive or similar device.
Includes the file sets.
amd64 | arm64 | i386 | octeon | powerpc64 | riscv64 | sparc64 |
miniroot70.img |
The same as above, but file sets are not included.
They can be pulled down from the internet or from a local disk.
alpha | amd64 | arm64 | armv7 | i386 | landisk | luna88k | octeon | powerpc64 | riscv64 | sparc64 |
install70.iso |
An ISO 9660 image that can be used to create an install CD/DVD.
Includes the file sets.
alpha | amd64 | hppa | i386 | macppc | powerpc64 | sparc64 |
cd70.iso |
The same as above, but file sets are not included.
alpha | amd64 | hppa | i386 | macppc | sparc64 |
floppy70.img |
Supports some older machines that lack other booting options.
amd64 | i386 | sparc64 |
Images can also be downloaded from a number of alternate mirror sites.
An SHA256
file containing checksums can be found in the same
directory as the installation files.
You can confirm that none of the downloaded files were mangled in transit
using the sha256(1) command.
$ sha256 -C SHA256 miniroot*.img (SHA256) miniroot70.img: OKOr, if you're using an OS with the GNU coreutils:
$ sha256sum -c --ignore-missing SHA256 miniroot70.img: OKHowever, this only checks for accidental corruption. You can use signify(1) and the
SHA256.sig
file to cryptographically verify the downloaded image.
$ signify -Cp /etc/signify/openbsd-70-base.pub -x SHA256.sig miniroot*.img Signature Verified miniroot70.img: OKNote that the signify package on other operating systems may not include the required public key, or it may be installed in another location.
The install70.iso
and install70.img
images do not
contain an SHA256.sig
file, so the installer will complain that
it can't check the signature of the included sets:
Directory does not contain SHA256.sig. Continue without verification? [no]This is because it would make no sense for the installer to verify them. If someone were to make a rogue installation image, they could certainly change the installer to say the files were legitimate. If the image's signature has been verified beforehand, it is safe to answer "yes" at that prompt.
Using OpenBSD, assuming the device was recognized as sd6
:
# dd if=install*.img of=/dev/rsd6c bs=1mNote that the raw I/O device is used:
rsd6c
rather than
sd6c
.
Details of this will vary on other platforms.
The GNU version of dd
will require bs=1M
(note the capital M)
instead.
If you're using a different OS, be sure to select the appropriate device
name: /dev/sdX
on Linux or /dev/rdiskX
on macOS
for example.
# cdio tao cd*.iso
The installer is designed to install OpenBSD in a very usable default
configuration with a minimum of user intervention.
In fact, you can often just hit <Enter>
to get a good OpenBSD
install, moving your hands to the rest of the keyboard only to enter the
root password.
After the dmesg(8) is shown, you will see the first installer question:
... root on rd0a swap on rd0b dump on rd0b erase ^?, werase ^W, kill ^U, intr ^C, status ^T Welcome to the OpenBSD/amd64 7.0 installation program. (I)nstall, (U)pgrade, (A)utoinstall or (S)hell?Choose
(I)nstall
and follow the instructions.
bsd
| The kernel (required) |
bsd.mp
| The multi-processor kernel (only on some platforms) |
bsd.rd
| The ramdisk kernel |
base70.tgz
| The base system (required) |
comp70.tgz
| The compiler collection, headers and libraries |
man70.tgz
| Manual pages |
game70.tgz
| Text-based games |
xbase70.tgz
| Base libraries and utilities for X11
(requires xshare70.tgz )
|
xfont70.tgz
| Fonts used by X11 |
xserv70.tgz
| X11's X servers |
xshare70.tgz
| X11's man pages, locale settings and includes |
New users are recommended to install all of them.
Some libraries from xbase70.tgz
, like freetype or fontconfig, can
be used outside of X by programs that manipulate text or graphics.
Such programs will usually need fonts, either from xfont70.tgz
or
font packages.
For the sake of simplicity, the developers decided against maintaining a minimal
xbase70.tgz
set that would allow most non-X ports to run.
(U)pgrade
.
When you get to the list of file sets, select the ones you need.
Unlike some other operating systems, OpenBSD encourages users to split their disk into a number of partitions, rather than just one or two large ones. Some of the reasons for doing so are:
nosuid
, nodev
, noexec
or
wxallowed
.
readonly
most of the time, which will eliminate the need for
a filesystem check after a crash or power interruption.
wxallowed
filesystem, it is recommended to have a separate
/usr/local
partition.
/home
partition can be nice.
New version of the OS?
Leave your /home
partition untouched, wipe and reload
everything else.
/var
and maybe even a separate /var/log
.
/usr
and /tmp
partitions.
not configured
,
this means that it is not currently supported by the kernel.
This may be improved in the future by sending the dmesg.
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!Alternatively, save your dmesg output to a text file and send us its contents:
$ (dmesg; sysctl hw.sensors) > ~/dmesg.txtPlease configure your email client to use plain text. In particular, do not use HTML formatting or forced line breaks. Put the dmesg into the body of the mail, not as an attachment.
site70.tgz
File Setsite70.tgz
.
Like the official file sets, this is a
tar(1) archive rooted in
/
and untarred with the -xzphf
options.
It is installed last, so it can be used to complement and modify the files from
a default install.
Furthermore, it is possible to use hostname-dependent sets named
site70-$(hostname -s).tgz
.
Note:
If you intend to provide the sets over HTTP(s), place site70.tgz
in your source directory and include it in your index.txt
.
It will then be an option at install time.
install.site
and upgrade.site
Scriptssite70.tgz
file set contains an executable file
/install.site
, the installer runs it with
chroot(8)
based at the freshly installed system's root.
Similarly, the upgrade script runs /upgrade.site
.
The latter can be placed in the system's root directory before rebooting
for the upgrade.
Example usage:
rc.firsttime
is executed once then deleted.
If you are adding OpenBSD to an existing system, you will probably need to create some free space before installing OpenBSD. In addition to your existing system's native tools, gparted may be useful for deleting or resizing existing partitions. Preferably use one of the four primary MBR partitions for booting OpenBSD. Extended partitions may not work.
rEFInd is reported to usually work. GRUB is reported to usually fail. In either case, you are completely on your own.
bcdedit
.
A good introduction can be found in
this article.
If you want a GUI alternative, you may want to try
EasyBCD.
You will need a copy of your OpenBSD install's Partition Boot Record (PBR). You can copy it to a file using a process similar to:
# dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1where
sd0a
is your boot device, and you will need to get the
file openbsd.pbr
to your Windows system partition.
Once OpenBSD's PBR is copied to the Windows system partition, you need a shell with administrative privileges to run the following commands:
C:\Windows\system32> bcdedit /create /d "OpenBSD/i386" /application bootsector The entry {0154a872-3d41-11de-bd67-a7060316bbb1} was successfully created. 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.Note that OpenBSD expects the computer's real-time clock to be set to Coordinated Universal Time (UTC). See this section for more info.