OpenBSD and NetBSD are two popular BSD operating systems. You can boot, install OpenBSD and NetBSD from Grub2 without losing data.

The way to do it here is similar to how to do it with FreeBSD. We also use Partition Image Mapper to avoid data loss. Please refer to the related articles for more details.

Boot OpenBSD and NetBSD from Grub2


First we will download OpenBSD and NetBSD. Note that you need to download the images of its USB. The OpenBSD disk image is named installXX.fs.

Once downloaded, we will use 7-Zip to open and extract its partition image files to the /AIO/Files/PartIMG directory on the AIO Boot disk. Depending on the version in which the file name may be different, you need to extract the largest file. You can rename this file for ease of remembering.

  • OpenBSD: 1.img
  • NetBSD: 0.img

Partition Image Mapper

Partition Image Mapper is part of AIO Boot. We will use this tool to MAP the partition image above as the real partition.

  1. Rename, copy the above partition image files to the AIO Boot drive.
  2. Copy PartIMGMapper.exe to another drive (eg C :).
  3. Run PartIMGMapper.exe
    OpenBSD and NetBSD

    1. Select /AIO/Files/PartIMG/PartIMG_ROOT.img in the first row. This is the partition image of Grub2. We will use Grub2 to boot into OpenBSD and NetBSD.
    2. Select the partition image file that you copied in step 1.
    3. In the Type section, select the corresponding format.
  4. Click the MAP button to use the images above as a real partition.
  5. The tool will back up the partition table information for later restoration. The file has .MBR extension in the same directory as PartIMGMapper.exe.
  6. Once used, run PartIMGMapper.exe, click UNMAP and select the previously backed up MBR file. All data and partitions will be restored as before.
  7. Boot into USB, then boot OpenBSD and NetBSD from the PartIMG Partition menu (press the k key for quick access).

PartIMG Mapper

PartIMG Mapper has the same features as Partition Image Mapper, but it runs directly on Grub2 and Grub4dos without Windows.

OpenBSD and NetBSD do not allow overlapping partitions. This means that the beginning of this partition is part of another partition. To fix this, just delete the partition where you are putting the 0.img and 1.img file above.


This is the Grub2 menu for those who want to do it manually.


menuentry "OpenBSD" {
	set root=hd0,msdos2
	kopenbsd /bsd


menuentry "NetBSD" {
	set root=hd0,msdos2
	knetbsd /netbsd
	insmod regexp
	knetbsd_module_elf /*/installation/miniroot/miniroot.kmod

This also works for other BSD operating systems based on OpenBSD and NetBSD. Wish success!

Leave a comment

Your email address will not be published. Required fields are marked *