Skip to content

cpiker/mbr88

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MBR88

An OS independent 8088 op-code clean MBR for dual booting ELKS, FreeDOS or even modern operating systems. Includes an MBR patching tool that compiles natively for Linux, and cross compiles for ELKS via ia16-gcc, and FreeDOS via OpenWatcom. MBR assembly is provided in NASM syntax. Linux man pages and FreeDOS help files are included.

Safe for ELKS, but don't use this yet on FreeDOS yet, currently still testing the Watcom build of mbrpatch.

The MBR reserves space within it's tiny 512 byte area for a boot menu with editable partition labels (eleven characters max). MBR88 always presents a boot menu and waits for a key press. Since it never auto-boots it's good for desktops, but not suitable for servers. Only partitions marked with the 0x80 bootable flag appear in the menu but up to four partitions may be simultaneously marked as bootable. The boot menu also allows for booting from a floppy even when the machine autoboots to a hard disk first.

Patching Tool Usage

mbrpatch -r mbr.bin /dev/hda     # read live MBR to file (ELKS / Linux)
mbrpatch -r mbr.bin 80h          # read live MBR to file (FreeDOS)

mbrpatch mbr.bin                 # view the partition table

mbrpatch -p mbr.bin              # patch in new partitions or a disk ID
mbrpatch -u mbr.bin              # upgrade old MBR to MBR88, then edit
mbrpatch -n new.bin              # create a fresh MBR88 image

mbrpatch -w mbr.bin /dev/hda     # write MBR to disk (ELKS / Linux)
mbrpatch -w mbr.bin 80h          # write MBR to disk (FreeDOS)

Windows NT and Linux disk IDs are supported and may be modified if desired.

GPT, LILO and GRUB

As a safety feature, if mbrpatch detects a special record such as a GPT disk or a GRUB first stage loader it will refuse to alter it. You can pull such records but not change them. Only traditional MBRs are supported.

Screenshot ELKS/FreeDOS dualboot

Commemoration

Embedded in an unused region of an MBR88 record is the last byte that I could get off the Cassini spacecraft as it plummeted into Saturn. As far as I know it was the last complete byte to make it to Earth from the mission. She was a good ship, run by an even better team. Details are in the source comments.

Development

Written by C. Piker and Claude (Anthropic). Verified on a Leading Edge Model D with two floppy drives and a SD card reader with XTIDE installed. More hardware and OS verification is in the works.

Acknowledgement

Thanks to osdev.org for the reference material and insights that informed the design of this boot record, especially the creators of this page.

About

An 8088 safe MBR for multi-booting ELKS, FreeDOS or modern systems

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors