Install Mac OS X 10.5.6 – Step 2 – Installing Mac OS X 10.5.8 on AMD Athlon X2

This is step is slightly easier than step 1. You need to boot with the the DVD burned in step 1 and install Mac OS X 10.5.6.

Was waiting for 5 minutes still stuck in the grey screen

If it doesn’t boot in reasonable amount of time, please boot in verbose mode. Press F8 to enter start up options and provide the option -v to boot in verbose mode. If you get a no entry sign or ask you to reboot, you are probably out of luck, still reboot and see whether your luck changes 🙂

Customize the installation

It’s important to select the correct drivers and other patches for the installation to work properly. In my case I had to select the following:

  • Video Driver: NVInject 512MB
  • OSx386 tools

If you are using PS/2 keyboard and mouse you will have to install the PS/2 patch. I’m not sure how well this will work as I have USB keyboard and mouse.

Here are some “screen shots” while installing. Please bear with the quality, I’m a horrible photographer 🙂

Patch the iPC DVD image – Step 1 – Installing Mac OS X 10.5.8 on AMD Athlon X2

When booting the DVD it was always stuck at “Still waiting for root device…”, this was because there was no kext for SATA chip for my motherboard (nForce 405 chip). It was simple has adding the required kext to the DVD and rebuilding the Extensions.mkext. Unfortunately you will need a working Mac OS X installation to do this. Follow the instructions bellow.

Mount the image in read write mode

$ hdiutil mount iPC_OSx86_10.5.6.iso -readwrite

Extract kexts from mkext

$ mkdir /tmp/Extensions
$ mkextunpack -d /tmp/Extensions Extensions.mkext

Copy kexts and remove unwanted kexts

$ cp -R nForceLan.kext /tmp/Extesions/
$ cp -R AppleNForceATA.kext /tmp/Extensions/
$ find /tmp/Extensions/ -name "*Intel*" -print0 | xargs -0 rm -R

Cache kext into mkext

$ sudo chown -R root:wheel /tmp/Extensions/
$ sudo chmod -R 755 /tmp/Extensions/
$ kextcache -a i386 -m /tmp/Extensions.mkext /tmp/Extensions

Copy Extenions.mkext to /System/Library on the ISO

$ cp /tmp/Extensions.mkext .

That’s it, now unmount the ISO and burn it to a DVD. Now we are ready to move on to the next step. I’ll be posting the details for actual installation Mac OS X 10.5.6 tomorrow.

/tmp/Extensions

Installing Mac OS X 10.5.8 on AMD Athlon X2

Mac OS X 10.5.8I managed to install Mac OS X 10.5.8 on an AMD Athlon X2 system after little trouble. I’ll post the procedure to make sure if I have to do it again I can easily refer and someone trying to do the same can save the trouble. This will be composed of a series of posts, a post per step.

In the mean time find out the specifications of your box. I’m using GIGABYTE GAPM61SME-S2 motherboard with AMD Athlon X2 CPU. If your specifications are just like mine go ahead and download all the files listed bellow, otherwise download 1-3 and then look for kexts for your motherboard.

System specification

  • AMD Athlon X2 2800
  • nVidia GeForce 6100/nForce 405 chipset
  • 1 x 2 GB of DDR2 DIMM
  • On board ethernet (nForce 10/1oo Mbit)
  • Realtek ALC883 CODEC chip
  • SATA HDD (nForce sata controller)
  • USB Mouse
  • USB Keyboard
  • DVD Drive

Downloads

  1. iPC OSx86 Leopard 10.5.6 Intel AMD SSE2 SSE3 DVD (Google and find out, you will have to download via Bit torrent)
  2. Mac OS X 10.5.7 Update (http://keti.ws/95282)
  3. Mac OS X 10.5.8 Combo Update (http://keti.ws/95283)
  4. nForceLAN (http://keti.ws/94281)
  5. AppleNForceATA (http://keti.ws/95281)

Steps

  1. Patch the iPC DVD image (Otherwise the DVD will never boot)
  2. Install Mac OS X 10.5.6
  3. Remove all Intel kexts (Improves the boot time)
  4. Install Mac OS X 10.5.7 update
  5. Install Mac OS X 10.5.8 update

Await step 1, Patching the iPC DVD image tomorrow.

Using custom error pages in Varnish

While playing around with the fancy error pages I wanted to use them with Varnish as well. Since there is no means to include a file or serve a file from Varnish (without serving from a back end server), I went with inline C snippet to read and serve the error pages. Please note that the style sheet and the images are being served from a CDN. Otherwise it will have to be cached prior to the back end server becoming inaccessible. Here is the whole vcl_error sub. You will notice that we fall back to default Varnish error page for anything other than 5XX errors.

sub vcl_error {
set obj.http.Content-Type = "text/html; charset=utf-8";

if ( obj.status >= 500 && obj.status <= 505) {
C{
#include <stdio.h>
#include <string.h>

FILE * pFile;
char content [100];
char page [10240];
char fname [50];

page[0] = '\0';
sprintf(fname, "/var/www/errors/%d.html", VRT_r_obj_status(sp));

pFile = fopen(fname, "r");
while (fgets(content, 100, pFile)) {
strcat(page, content);
}
fclose(pFile);
VRT_synth_page(sp, 0, page, "<!-- XID: ", VRT_r_req_xid(sp), " -->", vrt_magic_string_end);
}C
} else {
synthetic {"
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>"} obj.status " " obj.response {"</title>
</head>
<body>
<h1>Error "} obj.status " " obj.response {"</h1>
<p>"} obj.response {"</p>
<h3>Guru Meditation:</h3>
<p>XID: "} req.xid {"</p>
<address>
<a href="http://www.varnish-cache.org/">Varnish</a>
</address>
</body>
</html>
"};
}

return (deliver);
}

Hope someone will find this useful as I had to put some effort to find out all the internal Varnish function names

Fancy HTTP Error pages – 5xx

If you hadn’t noticed my site was giving HTTP 500 errors last couple of days. The issue was found to be a segfault and it’s fixed now. That got me to come up with a set of funny and slick HTTP error pages. I only came up with HTTP 5xx error pages, I believe HTTP 4xx error pages should be specific to the site. You can download them here. If you want to take a peek, here is the list. HTTP 500, 501, 502, 503, 504, 505. Feel free to modify them and share what you come up with.

How to customize a WordPress plugin and upgrade

Sometimes you want to make minor changes to WordPress plugins that no body except your self would want. Then comes the issue of upgrading to new versions of the plugin. git-svn is the perfect tool for this. It has all the cool features of the distributed SCM git and ability to pull from subversion (and push to it as well). Here is how I do it:

  1. Clone the trunk
    git svn clone http://svn.wp-plugins.org/web-invoice/trunk/
    
  2. Make your changes
  3. Commit changes locally
    git commit -a
    
  4. Pull new changes (e.g. new release). Git is very good at merging, you will not have conflicts unless you edit exact same lines in the local version. Still a manual merge shouldn’t be too complicated
    git svn rebase
    

In the example I have taken the svn trunk of Web Invoice WordPress plugin. Hope you find this information useful next time you hack a WordPress plugin.

Dialog GSM has been deceiving the public

Dialog GSM (biggest telecom provider in Sri Lanka) has been deceiving the public about their Family package tarrifs. Their marketing material, customer service representatives and the web site states there is a commitment of Rs. 250 (Local call charges) per supplementary connection and no commitment for the primary connection. Until February it was the case, but from March they started to have a commitment for the primary connection as well. I made a complaint to Dialog and initial response was prompt but there after one person from the billing department agreed that there was a mistake and 2 weeks later another person called up and said it was correct and the marketing material was wrong. Just to clarify I contacted the customer service department to clarify things viola, their intial response was that there is no commitment for the primary package but when I insisted that it may be wrong and many minutes of waiting they got back to me saying there is a group commitment of  Rs. 250.

If you have a Dialog Family package please go through your bills for February and March (April if you have already got it) 2009 and you will see the difference. Please post a comment if you are affected and even if you are not affected leave a comment then we might be able to find a pattern 🙂 . It might not affect you if your primary connection makes more than Rs. 250 worth of local calls, not the case with me.

If you want to see my bills please leave a comment, it’s 8 pages, little too much to post in a blog.

I believe this is clearly deceiving the public. Shame on you Dialog GSM.