2 Pages V   1 2 >  
Reply to this topic
 Chainloading bootsector of logical partition with EXTLINUX installed, fails. Patch included, Logical-partition-residing bootloader chainload patch
post Jan 27 2010, 10:13 PM
Post #1
Icecube
Silver Member   ****
Group: Advanced user

  Joined: 7-September 08
Posts: 641
Thank(s): 172


Belgium


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/230905
http://forums.gentoo.org/viewtopic.php?p=5142693#5142693

It 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).


--------------------

The revenue from clicking on publicity at this post is helping Icecube
Boot Land shares publicity revenue with its members.

.
+Quote Post
post Jan 28 2010, 09:51 AM
Post #2
Wonko the Sane
Gold Member   *****
Group: Advanced user

  Joined: 8-January 10 From: The Outside of the Asylum

Posts: 2,277
Thank(s): 252


Italy


Cross linking to this thread (though cannot say if an actual connection exists):
http://www.boot-land.net/forums/index.php?showtopic=10200

Wonko


--------------------
+Quote Post
post Jan 30 2010, 04:54 PM
Post #3
Sha0
Frequent Member   ***
Group: Advanced user

  Joined: 1-August 07 From: Boot-Land Forums

Posts: 436
Thank(s): 121


Canada


Attached is your patched GRLDR.

EDIT: Upload failed. You are not permitted to upload this type of file

Ok, then. Never mind.

EDIT: Needed to put it in a .ZIP file, I guess.
Attached File(s)
Attached File  grldr.zip ( 114.48K ) Number of downloads: 81
 
+Quote Post
post Jan 30 2010, 04:59 PM
Post #4
Wonko the Sane
Gold Member   *****
Group: Advanced user

  Joined: 8-January 10 From: The Outside of the Asylum

Posts: 2,277
Thank(s): 252


Italy


QUOTE (Sha0 @ Jan 30 2010, 05:54 PM) *
Attached is your patched GRLDR.


You should stop using these Romulan scared9.gif cloaking devices for attachments....happy22.gif

cheers.gif

Wonko


--------------------
+Quote Post
post Jan 30 2010, 05:17 PM
Post #5
Sha0
Frequent Member   ***
Group: Advanced user

  Joined: 1-August 07 From: Boot-Land Forums

Posts: 436
Thank(s): 121


Canada


QUOTE (Wonko the Sane @ Jan 30 2010, 11:59 AM) *
You should stop using these Romulan scared9.gif cloaking devices for attachments....happy22.gif


Fixed now.
+Quote Post
post Jan 30 2010, 05:42 PM
Post #6
Wonko the Sane
Gold Member   *****
Group: Advanced user

  Joined: 8-January 10 From: The Outside of the Asylum

Posts: 2,277
Thank(s): 252


Italy


QUOTE (Sha0 @ Jan 30 2010, 06:17 PM) *
Fixed now.


Yep, the United Federation of Planet technology is a bit dated, and likes only .zip or .7z archives.....wink.gif

Hopefully soon some Cardassian technology will inject some new features....

Wonko


--------------------
+Quote Post
post Jan 30 2010, 06:40 PM
Post #7
Icecube
Silver Member   ****
Group: Advanced user

  Joined: 7-September 08
Posts: 641
Thank(s): 172


Belgium


It doesn't work with the patched grldr mad.gif


--------------------
+Quote Post
post Jan 31 2010, 07:55 AM
Post #8
davlak
Member   **
Group: Members

  Joined: 5-June 08
Posts: 57
Thank(s): 0


Italy


WOW as predicted by WONKO this patch solved my problem too

http://www.boot-land.net/forums/index.php?showtopic=10200

many many thanks!

smile.gif
+Quote Post
post Jan 31 2010, 09:02 AM
Post #9
Wonko the Sane
Gold Member   *****
Group: Advanced user

  Joined: 8-January 10 From: The Outside of the Asylum

Posts: 2,277
Thank(s): 252


Italy


Hmmm. dubbio.gif


If I get it right it now works on davlak's problem that is slightly different from the one Icecube tried to fix? unsure.gif

Icecube had a problem in chainloading the PBR of a Logical Volume inside extended.
davlak had a problem in accessing the Logical Volume inside extended.

I guess a further patch to the patch is needed.

Wonko


--------------------
+Quote Post
post Jan 31 2010, 11:32 AM
Post #10
Icecube
Silver Member   ****
Group: Advanced user

  Joined: 7-September 08
Posts: 641
Thank(s): 172


Belgium


When I do (original and patched version):
CODE
title Boot Extlinux
root (hd0,5)
chainloader (hd0,5)+1

I get (EXTLINUX error):
CODE
Boot Error

I can list all files and folders correctly (original and patched version):
CODE
root (hd0,5)
ls /

EXTLINUX and SYSLINUX need the correct value in SI:
QUOTE
If an active partition is found, that partition's boot record is read into 0000:7c00 and the MBR code jumps to 0000:7c00 with SI pointing to the partition table entry that describes the partition being booted. The boot record program uses this data to determine the drive being booted from and the location of the partition on the disk.

http://www.ata-atapi.com/hiwmbr.html


--------------------
+Quote Post

2 Pages V   1 2 >
Reply to this topic
1 User(s) are reading this topic ()



Collapse

  Topic Replies Topic Starter Views Last Action
No New Posts Offline Registry
Read and Write to an offline registry hive
4 erwan.l 1,165 28th August 2010 - 09:41 AM
Last post by: erwan.l
No new Chainloading AUTOEXEC/COMMAND.COM?
Work around for troublesome Dell Diagnostic with Certian BIOSes/Models
36 delicatepc 1,653 23rd August 2010 - 04:20 PM
Last post by: gCumm
No New Posts Offline enable the built-in administrator account in Windows 7 and Vista
0 Michael Pietroforte 271 6th August 2010 - 07:18 PM
Last post by: Michael Pietroforte
No New Posts Office 2010 home use for VL customers | Service Manager 2010 Configuration Pack | IE least vulnerable browser | SSDs replace HDDs?
0 Michael Pietroforte 143 26th July 2010 - 09:55 PM
Last post by: Michael Pietroforte
No New Posts Offline Update any Windows & Office with WSUS tool
0 jamal 302 24th July 2010 - 10:42 AM
Last post by: jamal