Tuesday, May 26, 2015

5.7 amd64 X200: Creating / Using Easy2Boot installer for OpenBSD

Hi,

OpenBSD 5.7 is out and what am I gonna wait for? Ok now I'm running 5.7-CURRENT using snapshot, newly upgraded from 5.7-RELEASE but more on that later. Right now I want to share another good way to install OpenBSD using USB Drive.

If you read my Creating USB Flashdrive post, you may notice that the previous way will create a flashdrive installer solely for OpenBSD. It's a good option for a small capacity flashdrive, or for a big capacity flashdrives, if you want to store your favourite packages in it. But what if you wanted to make a multi OS installer flashdrive?

Why I wanted to have a multiboot flashdrive? Well, OpenBSD is not perfect. There's something that OpenBSD lack that other OS have. It is wider packages availability. There's a time that I wanted to install something and it's not yet available in OpenBSD. Be it lack of porter's interest and/or lack of resources to port it, there's that time that I need to use the specific application. Heck the only minus point for OpenBSD to me is less packages than GNU/Linux. And then I sometime have that sort of need to test other *BSD OS or GNU/Linux distro. That's why.

After a brief comparison of tools that I need to use, I choose Easy2Boot. I'm not going to write in details about setting up Easy2Boot. You can check their website for instructions. It's fairly easy to setup Easy2Boot as the installer will take care of almost everything IIRC.

What OSes I wanna put in there?
1) OpenBSD (of course!)
2) FreeBSD
3) Ubuntu Linux
4) Maybe UBCD or other tools

Again, I won't write in details about other things than OpenBSD. As Easy2Boot is Linux-friendly, there will be no problem preparing Linux distro for Easy2Boot. As for FreeBSD, you can check out Easy2Boot for FreeBSD section.

For OpenBSD, I tried using install57.iso and the result is:
Booting - booting is ok. Can go through (U)pgrade option but then Easy2Boot cannot mount the ISO file correctly so I cannot install the packages contained in it.

What's the option? I need to use the minimum installation ISO = cd57.iso. Easy2Boot can take care of booting up the minimal ISO and I can run the installation/upgrade process. Take note that I'm using Windows to prepare this.

1)  Download cd57.iso from OpenBSD FTP site.
2) Rename the cd57.iso into some filename that easy to figure out. eg: OpenBSD57-AMD64.iso. Easy2Boot is very picky about "." (dot). Make sure to only have 1 dot only.
3) Move the ISO into the prepared Easy2Boot flashdrive:
/_ISO/MAINMENU/
4) Run the /MAKE_THIS_DRIVE_CONTIGUOUS.cmd inside the root folder of the flashdrive.

Ok the booting part is done. As the ISO is just a minimal boot, I need to get the base packages ready.

1) Go to the root flashdrive. eg: /
2) Create 5.7/amd64/ folder.
3) FTP into OpenBSD FTP site to download the base packages. For -RELEASE, it's ftp.openbsd.org/pub/OpenBSD/5.7/amd64/ .
4) Download all the bsd* , *tgz and optionally-but-recommended SHA256* files into the /5.7/amd64/ inside the flashdrive.

Done. Now, this method is more like the usual installation method, right? And who said that OpenBSD is hard?

For installation:
1) After Easy2Boot is booted, choose your OpenBSD ISO to boot OpenBSD image and do (U)pgrade.
2) When the installer ask for the packages, choose disk, then choose not mounted, and then choose sd1i (depending on your system).
3) Point your installer to the directory 5.7/amd64 inside the mounted sd1i.
4) If you created the folder correctly and put the files in there, the installer should list all the files needed to do the installation/upgrade.
5) Install/Upgrade!

Let the installation continues and reboot. After reboot, do sysmerge, the usual stuff. Starting from 5.7, the etcXX.tgz and xetcXX.tgz is now in base. So the sysmerge command is much simpler now.

# sysmerge

That's it. I've tried installing both OpenBSD and Ubuntu Linux using Easy2Boot and so far it's great. I haven't tried FreeBSD though. I hope you will find this useful. Later then.

2 comments:

Steve Si said...

To install from install59.iso see my blog post
http://rmprepusb.blogspot.co.uk/2016/06/install-openbsd-from-easy2boot.html

Karl said...

Thanks Steve Si for the info. How's EUFI booting with your method? Would love to know the result.