Sunday, May 18, 2008

OSX Server on a Macbook

I was interested in doing this for 2 reasons - osx server is a great product - far superior to windows server:

- it uses open source software like apache, php, ruby instead of proprietary products
- has a nice integrated gui that is familiar
- is much cheaper that windows server with a reasonable pricing model
- is quite light - i ran 10.4 on an ancient mdd dual 550 cpu mode  with 1.5 gig ram 

I've been using it at home for a while - it replaced the red hat server that did good duty for many years. I still have a ppc 8550 around here somewhere running Appleshare IP the server version for the pre-osx machines. 

The macbook provides decent performance in a small package. This is the black 13.3" model the intel duo core @ 2Ghz, an 80gig SATA hd and 2 gig of ram. The only problem with the machine is the airport card died - killed by windows running in boot camp. Possibly due to overheating?

First we removed the existing hard drive in the macbook. You just remove the battery and unplug the power and then remove the ram door rail and slide out the hard disk. We replaced it with a larger sata western digital drive. This does not have an apple rom. 

When we booted the 10.5 server dvd it did not find the hard disk even when we ran the disk utility. This is a long-standing problem with using non-apple hard disks. One solution has been to use the same make of drives, ie fujitisu in the old macs and toshiba in laptops. Another solution is to use a 3rd party hard drive partitioner.

We decide to create a gparted boot disk that will enable us to use the open source hd partitioning utility. The idea is to format the disk as a mac volume.

Only problem is we can't get the osx install DVD to eject. All the usual tricks do not work. We may need to replace the original hd to boot from an then eject the dvd or install to an external drive that osx can recognize.  We pull the external 250gig hd from \\godzilla a ubuntu machine and plug it it and boot from the dvd. The installer picks up the drive so we run disk utility and reformat it as mac os extended with a GUID partition table and begin the install.

We choose the standard server configuration and answer the standard questions. We choose dhcp as the network setup as this is a mobile server and gave it the name of gnickers with outgoing email to our mail gateway. We also enabled VPN and created an class user called 9762. Users can login to the macbook by doing ssh, they can also do screen sharing with VNC.

oops - forgot the existing 10.4 server is called gnickers so the install has renamed this to gnickers(2) which we will have to fix using server preferences once the install is finished.


Ok now that it is working we reboot using the gparted liveCD. Grub 0.97 menu appears and we choose the gparted-liveCD macbook option. The GUI boots up and we see /dev/sda2 being displayed. This is the 250 gig external. Trackpad is not working so we plug in a usb mouse. 

We find no internal drive so it looks like it is not functioning. Click Exit. We will have to put this drive in an external case to work and put the original drive back in. The exit icon does not seem to work so we do CREL ALT Backspace to shutdown the X server and issue a reboot  command to get back to osx. Eject the gparted CD and shut down the machine.

Off  to the local computer store to get an external 2.5" sata case.



No comments: