[syslinux] Modify memdisk to mask/overlay start of hard drive

Geert Stappers stappers at stappers.nl
Sun Oct 23 22:01:20 PDT 2011

On Sun, Oct 23, 2011 at 11:53:53AM -0700, Erik Jensen wrote:
> On Sat, Oct 22, 2011 at 1:20 PM, Alexander Foken <alexander at foken.de> wrote:
> > On 10/21/2011 08:37 PM, Erik Jensen wrote:
> >>
> >> I have a somewhat unique problem I am trying to solve that requires me
> >> to temporarily replace the first 63s of the main hard drive and boot
> >> the result. Basically, I am hoping it is possible to modify memdisk to
> >> serve requests for the first 63 sectors from a ram disk and pass other
> >> requests through to the hard drive. There will never be a read
> >> spanning the two, so I don't need it to be able to handle that
> >> complexity. Also, it will alway be masking the first 63s of the first
> >> hard drive, so it doesn't need to be configurable.
> >>
> >> How complicated would it be to modify memdisk to support this? Any
> >> advice on where to make the change? I do have some programming
> >> experience, but none in assembly.
> >>
> >> Thanks
> >
> > That highly depends on the operating system that accesses the harddisk. DOS
> > uses BIOS INT 0x13 (see <URL:http://www.ctyme.com/intr/int-13.htm>), so
> > installing your own INT 0x13 handler or hacking the one installed by memdisk
> > should be sufficient. Other systems like Linux, *BSD, Windows, install their
> > own set of drivers once the system has been loaded. For those systems, you
> > would need to install a modified INT 0x13 handler for the boot phase, and a
> > modified system-specific driver once the system switches to its own drivers.
> >
> > Alexander
> Only the boot loader needs to see the overlay. Once the OS enters
> protected mode, it doesn't matter.

To me it sounds like re-inventing initrd, the initial ramdisk ...

Geert Stappers
> And is there a policy on top-posting vs. bottom-posting?

More information about the Syslinux mailing list