[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Drivemap module

From: Javier Martín
Subject: [PATCH] Drivemap module
Date: Tue, 10 Jun 2008 22:09:11 +0200

Since the last posts in the "reimplementing the legacy map command"
thread seemingly died silently, I'm sending the improved version of the
patch here. If the death of the thread was intentional, please just tell
me (either nicely or rudely) and I'll be off.

Recapitulating the other thread, this is a new module for x86-pc that
provides functionality similar to the legacy "map" command, i.e. allows
BIOS drives to be remapped and have the second HD appear as 0x80 (the
first), which is necessary because some OSes refuse to boot otherwise,
ignoring the "boot drive" passed to their loaders in DL (Windows XP and
other NTs); or can only boot with limited functionality (FreeDOS). The
syntax of this new command is similar to the old "map", though the
second argument must be the target BIOS drive number instead of a GRUB
device, though a hack-patch parsing them would be simple.

Regarding the objections raised by Vesa, I followed most of the advices,
removing chatter in the source and completely separating drivemap from
the kernel. However, I've left the "abort_on_error" part of the new
preboot-hook interface intact, mostly because I don't know how to
replace it. As drivemap is the only module using it, the problem should
be harmless for now, but a solution should be devised - not by me,
though, finals are here (literally, I had one today).

I hope I didn't leave anything out this time. This code has been tested
on the following situations:
 * Emulators: Bochs & QEMU, booting FreeDOS in (hd1) with another fat
partition in (hd0) - works wonderfully, and even allows access to both
drives if they are crossmapped and a faux root=(hd0) is set.
 * Real hardware: an Athlon64 (939) CPU on a Gigabyte motherboard,
booting Windows XP Pro x64 in (hd1) with Ubuntu in (hd0) - works too,
with no hacks required at all (by the way, booting XP was my reason to
do this).

Well, here it is. Have a nice day!


Attachment: drivemap.patch
Description: Text Data

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

reply via email to

[Prev in Thread] Current Thread [Next in Thread]