Inspired from a similar patch posted on grub-devel for Grub2 a simple patch
to allow syslinux or other bootloaders residing in logical partition to be
chainloaded from GRUB Legacy.
Regards
Fulvio Scapin
diff -ru grub-0.97/stage2/disk_io.c grub-0.97-patched/stage2/disk_io.c
--- grub-0.97/stage2/disk_io.c 2004-05-23 18:35:24.000000000 +0200
+++ grub-0.97-patched/stage2/disk_io.c 2008-07-06 00:56:03.000000000 +0200
@@ -746,6 +746,8 @@
#ifndef STAGE1_5
static unsigned long cur_part_offset;
static unsigned long cur_part_addr;
+static unsigned long cur_part_start;
+static int cur_part_entry;
#endif
/* Open a partition. */
@@ -815,6 +817,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... */
@@ -1142,6 +1146,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;
/* Set the active flag of the booted partition. */
for (i = 0; i < 4; i++)
_______________________________________________
Bug-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-grub