[hdt] [PATCH]: Add WEE boot code

Gert Hulselmans gerth at zytor.com
Wed Jun 23 12:49:35 PDT 2010


WEE, is a bootloader based on grub4dos. It fits in the first 63 sectors of
the drive.

The first 4 bytes are:
$ hexdump -n 4 /media/Data/ubcd-new/wee-2010-06-20/wee63.mbr
0000000 5eeb 0090
0000004

Or in the format get_mbr_string wants it:
$ hexdump -C -n 4 wee63.mbr
00000000  eb 5e 90 00                                       |.^..|
00000004

Patch tested in qemu:
  qemu -boot d -cdrom hdt.iso -hda wee-2010-06-20/wee63.mbr

- Gert Hulselmans


diff -up -r syslinux-4.00-pre58/com32/gpllib/disk/mbrs.c
syslinux-wee/com32/gpllib/disk/mbrs.c
--- syslinux-4.00-pre58/com32/gpllib/disk/mbrs.c	2010-06-23
02:09:52.000000000 +0200
+++ syslinux-wee/com32/gpllib/disk/mbrs.c	2010-06-23 21:28:05.035597445 +0200
@@ -71,6 +71,8 @@ void get_mbr_string(const uint32_t label
 	    strlcpy(buffer, "fbinst", buffer_size - 1);
 	else if (((label >> 8) & 0xff) == 0x80)
 	    strlcpy(buffer, "Grub4Dos", buffer_size - 1);
+	else if (((label >> 8) & 0xff) == 0x90)
+	    strlcpy(buffer, "WEE", buffer_size - 1);
 	else
 	    strlcpy(buffer, "Unknown mbr", buffer_size - 1);
 	break;



More information about the HDT mailing list