How to install OpenBSD on a libreboot system

This section relates to preparing, booting and installing a OpenBSD distribution on your libreboot system, using nothing more than a USB flash drive (and dd). They've only been tested on a Lenovo ThinkPad x200.

Back to previous index

This section is only for the GRUB payload. For depthcharge (used on CrOS devices in libreboot), instructions have yet to be written in the libreboot documentation.

Prepare the USB drive (in OpenBSD)

Connect the USB drive. Check dmesg:
$ dmesg | tail
Check to confirm which drive it is, for example, if you think its sd3:
$ disklabel sd3

Check that it wasn't automatically mounted. If it was, unmount it. For example:
$ doas umount /dev/sd3i

dmesg told you what device it is. Overwrite the drive, writing the OpenBSD installer to it with dd. For example:
$ doas dd if=install60.fs of=/dev/rsdXc bs=1M; sync

You should now be able to boot the installer from your USB drive. Continue reading, for information about how to do that.

Back to top of page.

Installing OpenBSD without full disk encryption

Press C in GRUB to access the command line:

grub> kopenbsd (usb0,openbsd1)/6.0/amd64/bsd.rd

It will start booting into the OpenBSD installer. Follow the normal process for installing OpenBSD.

Back to top of page.

Installing OpenBSD with full disk encryption

Not working. You can modify the above procedure (installation w/o encryption) to install OpenBSD using full disk encryption, and it appears to work, except that its not yet clear how to actually boot an OpenBSD+FDE installation using libreboot+Grub2. If you get it working, please let us know.

Back to top of page.

Booting

Press C in GRUB to access the command line:

grub> kopenbsd -r sd0a (ahci0,openbsd1)/bsd

OpenBSD will start booting. Yay!

Back to top of page.

Configuring Grub

If you don't want to drop to the GRUB command line and type in a command to boot OpenBSD every time, you can create a GRUB configuration that's aware of your OpenBSD installation and that will automatically be used by libreboot.

On your OpenBSD root partition, create the /grub directory and add the file libreboot_grub.cfg to it. Inside the libreboot_grub.cfg add these lines:

default=0 timeout=3 menuentry "OpenBSD" {
    kopenbsd -r sd0a (ahci0,openbsd1)/bsd
}

The next time you boot, you'll see the old Grub menu for a few seconds, then you'll see the a new menu with only OpenBSD on the list. After 3 seconds OpenBSD will boot, or you can hit enter to boot.

Back to top of page.

Troubleshooting

Most of these issues occur when using libreboot with coreboot's 'text mode' instead of the coreboot framebuffer. This mode is useful for booting payloads like memtest86+ which expect text-mode, but for OpenBSD distributions it can be problematic when they are trying to switch to a framebuffer because it doesn't exist.

In most cases, you should use the vesafb ROM images. Example filename: libreboot_ukdvorak_vesafb.rom.

won't boot...something about file not found

You device names (i.e. usb0, usb1, sd0, sd1, wd0, ahci0, hd0, etc) and numbers may differ. Use TAB completion.

Back to top of page.

Copyright © 2014, 2015 Leah Rowe <info@minifree.org>
Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 4.0 International license or any later version published by Creative Commons; A copy of the license can be found at ../cc-by-sa-4.0.txt

Updated versions of the license (when available) can be found at https://creativecommons.org/licenses/by-sa/4.0/legalcode

UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.

TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.

The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.