third

"It was not his fault he was a Third." - Enders Game
 blog | photos | videos | search | links

NetBSD on a Mac Mini

 ||  blog  || 

April 30, 2008

So I spent some time this weekend cleaning and unpacking old stuff, and I happened to find my mac mini. It was the first gen mac mini PPC G4.

I haven't used it since I moved, and its just really really old and 256mb of ram is terrible for doing anything Mac OS X wise on it. So I figured it was time to make the mini into a server. Enter NetBSD.

I haven't installed anything on ppc or with open firmware before so this was a fun experience. NetBSD however has great support for ppc, and it was really nice to be back in my preferred OS. There is nothing like logging into a newly installed operating system to find that nothing is running until you tell it to run. This is why NetBSD won me over many years ago. I have had a long hiatus from BSD since working at a Linux company got me to go down the dark path of vmlinuz. Happy to say I am coming out of the linux trance and back to my roots.

If you have a mac mini ppc and would like to put NetBSD on it, here are some quick and dirty notes to get you up and running ASAP.

First we need to get booting working, tried to hold down 'C' while starting up and that didn't work. This is because the open firmware has to be used to boot the NetBSD installer. To do this we first have to partition our mac mini. I used a firewire cable and hooked my mac mini up to my macbook, boot the mac mini holding down the 't' key.

Then I used disk utility to partition the drive. Select 2 partition setup, create a small "boot" partition first, then the rest of the space for netbsd.

Now copy the ofwboot.xcf file from the NetBSD/macppc iso you downloaded, and drop it onto your new firewire "boot" drive.

Unmount the firewire drive by dragging it to the trash. Unplug your firewire and reboot the mac mini (just hold down the power button).

Now hold down option-apple-o-f during boot to get into open firmware.

To boot the NetBSD install disk issue the following command.

0 > boot cd:,ofwboot.xcf netbsd.macppc

You should now be installing NetBSD!

After installation there are still a couple more items to take care of. First we have to make netbsd boot up by default so we won't see the question mark mac guy.

One more thing of note.. We have to put our NetBSD kernel into our mac HFS+ partition. This is done by using the firewire method and copying the netbsd-GENERIC.gz file from the cd or compiling a new kernel and copying it to the boot partition of the firewire drive. Drag the firewire drive to the trash can and reboot the mac mini.

Finally boot up the mac mini, break into open firmware again and issue the following commands to make our new NetBSD install boot by default.

0 > setenv auto-boot? true
0 > setenv boot-device hd:,ofwboot.xcf
0 > setenv boot-file netbsd-GENERIC.gz
0 > reset-all
0 > shut-down

The shut-down isnt necessary you can boot from here but I like to make sure things work from cold boot

And your done! Power back up your mac mini in glorious NetBSD! The mini is small, doesn't use a lot of power and just perfect to be a server tucked away somewhere.

Disclaimer: I am not responsible for killing your mac mini, this simple install worked for me, it may not work for you, check the NetBSD site for macppc and Open Firmware information for your hardware.

Enjoy.

Related tags: mac, mac mini, netbsd, ppc

Ryan

NICE dude!

What kind of usage are you looking from it now? Is it going to host the Blog/web shiz?

Geo

Going to use it for a source code repository, and just messing around.

bob

Unless you edit the disklabel during the install, to place the first NetBSD slice after the end of the HFS+ partition, you'll overwrite the bootloader.

Geo

Correct, These instructions assume this.

Leave a comment

captcha