[syslinux] Custom MBR

Kjetil.Mikkelborg at kongsberg.com Kjetil.Mikkelborg at kongsberg.com
Mon Jan 5 00:33:33 PST 2009

actually, I to had this problem with software from safeguard easy some years back, and the way i solved it, was to take a copy of the first 1024 bytes of the disk, (both mbr + partition information), install linux in the free space, make grub chainload image from disk, so when sge booted, it got both mbr and partition table from grub, so sge did not understand that the actual disk layout included a linux install, since the partition table it saw had windows active, and free space after windows which in that version of the partition table was unused.


But still, all this was done just with plain linux and grub, so no syslinux here.

-----Original Message-----
From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On Behalf Of Geert Stappers
Sent: 14. desember 2008 10:33
To: syslinux at zytor.com
Subject: Re: [syslinux] Custom MBR

Op 20081213 om 15:48 schreef YYZ:
> Hi,
> I have a multi-boot setup with windows installed on the active primary
> partition. Now this partition is encrypted and the only way to boot
> windows is through a custom boot loader provided by the encryption
> software (which requires entering a pre-boot password to unlock the
> decryption key). Unfortunately, this boot loader is pretty lame (in terms
> of multi-boot capabilities) and is completely inflexible (in that, it must
> reside in mbr + unused sectors of track0 and cannot be relocated). However,
> it's first stage in the mbr can be backed up in a file and chainloaded (as
> long as subsequent stages in track0 are intact). Additionally, it won't
> boot windows unless this partition is active.
> Now I could boot other operating systems by adding entries to the boot.ini
> of the encrypted windows system but this way, I would be required to enter
> the password even though those other operating systems that I finally boot
> are not encrypted. Not only that, this leads to the decryption keys loaded
> in the memory even when I'm not running encrypted windows.
> Now I want to completely bypass this boot loader by overwriting its first
> stage in MBR with custom code (while keeping the windows partition active)
> to transfer control to syslinux installed in an available partition (which
> in my case is a logical drive). Once I'm in syslinux, I can easily start
> any operating system I want (even the encrypted windows by chainloading
> the original mbr that I backed up in a file).
> Now, I looked at the syslinux mbr source (the newer version) and it
> appears to already have the code to parse the extended partition tables.
> With little modification, it should be possible to make it do what I want.
> Unfortunately, though somewhat familiar with assembly language, I don't
> think it's something I can pull-off myself.
> That's the reason for my request to bundle such a custom mbr with
> syslinux - it could act as a first stage loader for an unconditional boot
> into syslinux. The users would be able to install this MBR into sector 0,
> set the correct byte to the # of partition where syslinux is installed
> (0,1,2,3 or primary 4 onwards for logical), and the MBR code would find,
> load and execute the corresponding boot sector. Once in syslinux, they
> can interactively decide which operating system they want to boot into.
> Of course users can use the traditional mbr based on the activation flag,
> if they don't want this functionality.
> Thanks!

To me it sounds like the wish of having multiple MBRs,
but that conflicts the rule of "there is only one master".

For another MBR, Master Boot Record, use another bootdevice.
Such as floppy disk or USB memory stick.

Write the MBR on that extra device with a bootloader _installer_
Don't do writing of MBR with  bootloader.
(a bootloader is for bootloading, sure not for writing boot information)

Geert Stappers
Those who care about the discussion,
care about the discussion order,
they reply below the text.

Syslinux mailing list
Submissions to Syslinux at zytor.com
Unsubscribe or set options at:
Please do not send private replies to mailing list traffic.

More information about the Syslinux mailing list