It’s easy to install OpenBSD on mac hardware the right way. Simply download what you need and follow the install guide. What’s not so easy is installing OpenBSD the wrong way. This guide is intended to help someone who may have gotten anxious and strayed from doing things The Right Way(tm) [see also, The Easy Way(tm)]. It is also a warning. RTFM. Read it twice.
Take notes. Installing OpenBSD can take as little as 20 mins or as much as the rest of your life…. It all depends on how you approach it. This is the rest of your life approach 😉
With all that said, let’s get down to business.
Step 1 – Preparations
First of all you need an eMac. The emac is one of those in-between apple
models- it looks like a cross between the first iMac and the new iMac. It’s
a one piece unit, all inclusive. I assume you have that already. It helps
if you have a powerbook handy, maybe even one running OS X. I found it to
be very helpful. You’ll also need one blank cd (at least) and a working
internet connection. Patience is not required! In fact if you had patience
you could install OpenBSD the easy way (remember the easy way is to just
read the directions and follow them. Feel free to give up trying the hard
way at any time!)
Step 2 – I could do this blindfolded
Here’s where the real fun begins! Download the entire macppc folder from
your favorite mirror and put it in the sites folder of your powerbook. You
don’t need the packages, just everything in /pub/OpenBSD/$VERSION/macppc/.
Trust me. Get the whole folder. From that folder find the iso image (there’s
only one iirc) and burn it. Burn it the right way, there’s no need to do that
wrong just to add extra fun 😉
Once your cd is ready to go, pop it in your emac and boot it up by holding
c on the keyboard while it powers up. You should see a bunch of text scroll
by as the installer begins. Once you get to the prompt asking you what you
want to do, say install. Duh it’s what you’re here for isn’t it?
Now you get some warnings about data loss *pssssh* data shmayta we don’t
care so just get by those however you can. The OpenBSD folks won’t let you
just press enter so you might need to type “yes” explicitly. Don’t worry though,
they won’t stop you from making your life difficult, no one can!
When you get to a choice between HFS and MBR choose MBR. Don’t bother
reading the screen just enter it and lets’s go! We want this done NOW don’t
we? Of course!
Ok now you tell the installer you want to use the whole disk. Do you think
you really want to use os x on this old emac? No way… You already have a
powerbook with os x on it anyway right? 🙂
Here is where you should definitely stop paying attention to what’s on the
screen. There’s a warning there about removing the i partition or something?
On to step 3!
Step 3 – Making life difficult
Are you ready to make things hard? So far it’s been pretty easy right? We have
come to that crucial moment where everything goes wrong. You should be in
the disklabel editor by now. You might not know what that is, and if you don’t…
you should be installing OpenBSD the right way, not this way. So assuming you
know what disklabel is, use it to delete the a and i and anything else in there that
isn’t the c partition. Why not c? Come on! Every OpenBSD sophomore knows that
the c partition represents the whole disk and is not to be touched. Duh! Just get
rid of everything else.
Create partitions any way you like… I guess it all depends on how much space you
have on the disk. Once you’re done, w and q and say yes to those prompts that
whine something about you losing all of your data. When the formatting is done,
we’ll continue.
Step 4 – That was easy!
Ok now that we made it through the disk setup, I imagine you’re smart enough to
get the networking set up. It’s pretty easy since you have a dhcp server. Don’t you?
You should… it makes things pretty easy 😉 Once you’re done with all that (you’re
so smart!) it’s time to install the OS.
I suggest you use that powerbook with os x that I mentioned earlier. Makes things so much
easier. All you need to do is put that macppc folder (directory, whatever) into your
Sites directory (folder, whatever) and turn on personal web sharing. Then we tell the
OpenBSD install program we want to use http. No proxy, and no need to list the servers.
We are going to use the server on the powerbook. *cough* The powerbook is on a network
with the emac isn’t it?
Right. So tell the install program the IP address of your PB (don’t put http://) and then
the directory (usually it’s ~User/macppc or something like that… but you’re smart enough
to figure that out aren’t you? that’s why you’re doing things the hard way!). It should work
(of course it does you genius!) and so you can just choose the install sets you want and say
done. Look at that! It’s installing!
Step 5 – Oops
Well hey whattya know?! OpenBSD seems to be complaining about a missing i partition. Ha!
Looks like maybe we should not have removed it earlier. I didn’t see anything in the INSTALL
doc though? Did you? Oh we didn’t really *read* that did we? haha *sigh* Oh well – you can fix this. It’s not like you’re an OpenBSD newbie! haha (you’re a sophomore!). But how?
Step 6 – Ok why is this so hard?
Figure it out yet? Well it sure took me a while haha. The problem is that we really do need
that i partition, and if we had done things the Right Way(tm) also known as the Easy Way(tm)
this would have been revealed to us while we were paying attention to the output from the
installer. You see after you choose MBR as your type and you say you want to use the whole
disk, the OpenBSD install program will create and format an i partition, which is where the
ofwboot program is copied (which is what allows OpenBSD to boot… imagine that!)
Well what I did to recover from this issue was get a firewire cable (luckily I had one handy)
and boot with my PB plugged in via target disk mode (t during boot up). This allowed me to
repartition the drive with my mac. Then I used fdisk -i from the installer shell just to be sure
that the MBR was fixed up, and I zeroed out the disklabel. After that, I actually READ the
install documentation AND the output during the install. Yeah, I gave up and went the easy
route 😉 It turns out that all you need to do is add i and make sure that it’s your 1MB msdos
partition. I used the b option to tell disklabel to use everything from sector 2049 to the end
of the disk, since i was from 0 to 2048. After I did that… I got a contratulations! message
instead of a “OpenBSD will not be able to boot” message. 🙂 Hooray!
Now I’m having fun and installing all the packages I want… this is great. I could have been
doing this yesterday if I had gone the easy way… 😉 Learn anything?