Grub4dos can't chainload my second logical partition (EXTLINUX installed) correctly:
CODE
title Boot Extlinux
root (hd0,5)
chainloader (hd0,5)+1
EXTLINUX (and SYSLINUX) trust the info from the loader that loads the boot sector of the partition, not the partition offset stored on the partition itself.
A patch for Grub Legacy can be found:
Logical-partition-residing bootloader chainload patch for GRUB Legacy
http://bugs.gentoo.org/230905http://forums.gentoo.org/viewtopic.php?p=5142693#5142693It needs a little adaptation before you can apply it:
CODE
$ diff -u stage2/disk_io.c.orig stage2/disk_io.c
--- stage2/disk_io.c.orig 2009-06-20 17:53:46.000000000 +0200
+++ stage2/disk_io.c 2010-01-27 21:31:59.939631640 +0100
@@ -49,6 +49,9 @@
static char *unique_string;
static unsigned long cur_part_offset;
static unsigned long cur_part_addr;
+static unsigned long cur_part_start;
+static int cur_part_entry;
+
static int do_completion;
int dir (char *dirname);
@@ -525,6 +528,7 @@
src = (char *) SCRATCHADDR + BOOTSEC_PART_OFFSET;
while (dst < (char *) BOOT_PART_TABLE + BOOTSEC_PART_LENGTH)
*dst++ = *src++;
+ PC_SLICE_START (BOOT_PART_TABLE - PC_SLICE_OFFSET, cur_part_entry) = cur_part_start;
/* Clear the active flag of all partitions. */
for (i = 0; i < 4; i++)
@@ -965,6 +969,8 @@
cur_part_offset = part_offset;
cur_part_addr = BOOT_PART_TABLE + (entry << 4);
+ cur_part_start = part_start;
+ cur_part_entry = entry;
#endif /* ! STAGE1_5 */
/* If this is a valid partition... */
I can't compile Grub4dos (configure: error: GRUB requires a working absolute objcopy; upgrade your binutils), so if anyone can compile it, I can test it (patch against the 2009-06-20 version, not the experimental versions).