Wednesday, 15 June 2016

Install OpenBSD from Easy2Boot

You can download and install OpenBSD by adding the cd59.iso network install ISO to E2B.

OpenBSD 59 Desktop

However, if you want to use the non-network installer, install59.iso, you will find that OpenBSD installer script/wizard will not be able to find the installation files (which are, of course, hidden inside the ISO).

I tried adding the ISO as a partition to (hd0,3), but the OpenBSD installer did not like that partition structure, because it did not contain a 'Magic number'.

I next tried extracting the files from the ISO and placing them on the root of the E2B drive, however, it appears that the OpenBSD installer cannot access the E2B NTFS filesystem during the installation stage.

I next created a FAT32 .imgPTN file from the ISO, but this would not boot from grub4dos as OpenBSD does not use grub4dos, grub2 or syslinux to boot.

My final attempt was to boot from the ISO file but I also added the .imgPTN file as partition 3 to the E2B drive. This worked, and I was able to point the OpenBSD installer to the files on the FAT32 partition 3 volume - however, it did not like the case of the filenames (I guess?), so I needed to tell the installer to ignore the checks when it complained about them.

You can see the responses in the screenshot above (I used a VM, so the drive letters may not be the same as on a real system).

The final .mnu file that I came up with is shown below (note some lines are long and wrap over):

# Drag-and-drop the installxx.iso onto the MPI_FAT32 Desktop shortcut to make a .imgPTN file
# Add the installxx.iso, installxx.imgPTN and this .mnu file to \_ISO\LINUX\MNU folder
# During installation, choose install set from MSDOS partition on E2B drive
#  >> INSTALL.amd64 not found - say 'yes' to use anyway
#  >> Directory does not contain SHA256.sig - say 'yes' to continue without verification
# On reboot to E2B, you will need to delete the (hd0,3) partition

iftitle [ if exist $HOME$/install59.iso ] OpenBSD install\n Install OpenBSD (requires FAT32 .imgPTN file)\n Answer 'yes' to use install set for INSTALL.amd64\n and SHA256.sig questions.\n On reboot to E2B, delete new hd0,3 partition.
# suppress QRUN auto-suggestions
set NOSUG=1
/%grub%/QRUN.g4b $HOME$/install59.iso
#add FAT32 ptn image
ls (bd)$HOME$/install59.imgPTN > nul || pause ERROR: $HOME$/install59.imgPTN NOT FOUND!
partnew (hd0,3) 0x0C (bd)$HOME$/install59.imgPTN
boot

Because it adds a FAT32 partition onto the E2B drive, when you next boot to E2B, then E2B will detect the extra partition and prompt you to delete it (which you should do).

I will add this menu to the Sample mnu Files folder in the next Beta version of E2B v1.81.

This method could be used for other similar installers that have problems finding the 'cd' once booted.

P.S. To save space, you can use cd59.iso (7.5MB) instead of install59.iso (223MB) (but use install59.iso to make the .imgPTN file).