Author Topic: Logical partition booting using chain0  (Read 4078 times)

0 Members and 1 Guest are viewing this topic.

compgamer89

  • Entrant
  • Posts: 1
Logical partition booting using chain0
« on: April 10, 2009, 01:05:48 PM »
Not sure if this is still supported or even in the code, but I noticed looking in the 1.0.11 sources that chain0 seems to support booting boot1h from a logical partition - but when testing it, it booted my first logical partition instead of Leopard (which was on the second).  Looking in chain0.s, the problem seemed to come from an utter weirdness in the extended boot record spec (http://en.wikipedia.org/wiki/Extended_boot_record): the starting sector for entry 1 of an EBR is relative to the LBA of that specific EBR (i.e., for most EBRs it's always 63), but the starting sector for entry 2 of an EBR is relative to the LBA of the original EBR (i.e. the start of the extended partition as a whole).  It seems like it did match properly, but with all offsets being considered relative to the original EBR, all of them would cause the first logical to be loaded instead.  Seems like the code could be easily fixed to accommodate this (fix the first entry of the EBR immediately after reading it into memory, or a cleaner, less hacky way if memory permits), but unfortunately I have zero assembly experience, so I'm not sure if I can code this up myself (register-jutsu is up there with self-surgery on my list of scary things in life).

Again, I don't know if this is still a supported feature, but it seems like extremely low-hanging fruit, and personally I would be able to make great use of it (my Leopard is on logical part. 2, and right now GRUB doesn't seem happy loading Chameleon 2.0 as a multiboot kernel, with an initrd ramdisk containing the Extra folder - if anyone could tell me whether that is a supported feature, I'd also be extremely grateful :).

Anyway, thanks!

2009-04-14: Update: I managed to slightly modify the chain0.s from the Chameleon 1.0.11 source to fit my needs,
and it chains properly to boot1h now.  Note that this source is extremely untested, but at least it seems to work.  YMMV.  Note: There seems to be another patched version of chain0 at http://wiki.osx86project.org/wiki/index.php/Chain0, but I have no idea if it works :D.  Anyway, here it is!
« Last Edit: April 14, 2009, 08:49:46 PM by compgamer89 »

macdanny

  • Observer
  • Posts: 15
Re: Logical partition booting using chain0
« Reply #1 on: June 17, 2009, 09:42:08 PM »
Did you ever find out if logical partition booting is supported in version 2? I have an older version on a usb key and it loads my logical partition installed osx fine but I want to use chameleon on the internal disk so I can lose the extra steps of using a thumb drive. I'm not sure what file I need off my thumb drive to put on the hard disk.