Latest News: I posted a guide on how to install patches/kernels to the hidden EFI partition: here
(Older posts on this subject, leading up to me actually getting it to work are archived here)
As we all know, dfe's excellent modified Boot-132 bootloader allows us to place extra kernel extensions on a ramdisk, which can be used to boot the retail Leopard DVD on Core architecture PCs. An amazing milestone in OSx86 history, as i'm sure we all agree.
But what exactly is required to run the retail Leopard DVD and the so-called vanilla (ie Apple-supplied) kernel? Why can't my Pentium D run it?
It turns out the kernel performs an explicit check for the CPU 'family'. Only processors in 'Family 6' (or P6 processors) are permitted to boot. Pentium 4 and its derivatives (including Celeron D and Pentium D) are in Family 7 (P7).
There are a whole bunch of intel CPUs in the P6 family, but only Core Solo and above have SSE3, thus effectively limiting the kernel to Core processors.
64-bit operation adds another level of complexity - the only implementation of a certain routine in the kernel code (bcopy) in 64-bit mode uses SSSE3 (Supplemental SSE3), which - again - only Core and better CPUs have.
The upshot is that my machine *requires* a patched kernel to boot. The changes needed are fairly minimal, but as it stands my machine cannot run the kernel which is on the retail Leopard DVD.
Thus my thoughts turned to another approach - can I specify the 'extra' kernel extensions *and* a kernel, and have the machine boot from the DVD? I emailed dfe to ask if this is something he could add support for, only to discover it was already possible:
If you look slightly more closely at the code you'll realize that it names the ramdisk rd(u,p) just like hard drives are hd(u,p). So it already works to do something like rd(0,1)/mach_kernel.custom assuming you have a file mach_kernel.custom in the root of the ramdisk and the partition is numbered 1. I think partition numbers start at 1 so you should be ok with that. If not try 0.
It's been a while since I did this but I remember it working fine. That is, you simply enter the full path to the kernel on the boot command-line followed by any options.
This led me to perform a whole bunch of experiments to try to get my Pentium D to boot the retail DVD. See here for the blow-by-blow account of me getting this to work
Ok munky, get to the damn point. Where's the beef?
Heh.. ok, well here's what i've managed so far:
- Booted the retail DVD from a modified boot-132 CD.
- Installed successfully to a fresh partition on a GPT disk.
- Booted the installed partition and completed setup, again by booting from the boot-132 CD.
To boot, you need to place a suitable patched kernel in the root of the ramdisk image (initrd.img), and at boot time, after typing in the two-digit code to boot the Leopard DVD (or your hard disk partition), you boot thus:
rd(0,1)/mach_kernel.patched -legacy boot-uuid=<uuid of boot device>
rd(0,1)/mach_kernel.patched -legacy rd=diskXsY
So, to break that down:
rd(0,1) refers to the ramdisk, so rd(0,1)/mach_kernel.patched is how we're specifying the kernel to boot.
-legacy is needed if the kernel cannot operate in 64-bit mode. the kernel i have been testing with is an experimental pre-release kernel and still has SSSE3 routines in the 64-bit code, so I have to force 32-bit operation.
boot-uuid=<uuid> or rd=diskXsY - this is the real trick. specifying a kernel on a different device causes the boot sequence to switch the 'root' device to the device which holds the kernel. trying to boot without specifying the uuid or root device (rd) will cause mach to try to boot from the ramdisk itself. this is obviously not what we want. so you need to specify the uuid or the correct bsd address of the device you want to boot - the Leopard DVD or the installed partition.
Remember, this is all down to dfe and his cunningness, and his helpfulness and patience in assisting me. Thanks dfe!!!