Coder Social home page Coder Social logo

egormkn / mbr-boot-manager Goto Github PK

View Code? Open in Web Editor NEW
87.0 7.0 27.0 956 KB

๐Ÿ’พ Master Boot Record with a boot menu written in Assembly

License: The Unlicense

Assembly 99.40% Batchfile 0.60%
assembler x86 bootloader nasm mbr bios boot master-boot-record operating-systems boot-manager

mbr-boot-manager's Introduction

MBR Boot Manager

Simple yet powerful Master Boot Record Boot manager that allows to select one of four primary partitions during the boot. Got tired with reinstalling Grub or other boot manager, that was overwritten by Windows? Now you can choose one of four primary partitions to boot with this tiny (512 bytes only) custom MBR.

Preview

Features

  • Windows, Linux, FreeDOS and any other bootable partitions are supported
  • Speeds up the boot process for your main OS
  • Supports multiple active partitions
  • Boot first active partition by default
  • If Shift is pressed during boot, a boot menu will appear
    • Use UP and DOWN arrows to choose partition in boot menu
    • Use Enter to select the partition you want to boot from
    • Use Esc to reboot your computer
  • Easy to install
  • Uses only the first sector of disk (512 bytes)
  • Absolutely free and open-source
  • Well-documented and optimised code
  • DIY: compile your own version with NASM

Installation

Windows

Download BootIce and run as Administrator. Select the disk, then Process MBR -> Restore MBR. Choose mbr.bin as restore file, make sure that "Keep signature and partition table untouched" is selected and choose "Restore".

Linux/Unix

Create a backup of your current MBR with dd if=/dev/sdX of=mbr_backup.bin bs=512 count=1.
Then run dd if=mbr.bin of=/dev/sdX bs=446 count=1 where X is a letter of the disk

Credits

License

This is free and unencumbered software released into the public domain. See our LICENSE file for more information.

mbr-boot-manager's People

Contributors

egormkn avatar shemplo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mbr-boot-manager's Issues

Reorganize repo

Strange files in root directory (buildboot, runboot, bochs-config) - remove from there

Does not work with any other bootable partitions ?

Hi,
I'm coding my own toy OS and I'm using your MBR Boot Manager. I made a simple kernel that prints "Hello" and put it in a FAT32 partition. For the FAT32 partition boot sector, I used a modified version of boot.asm from https://github.com/ishanthilina/USB-FAT32-Bootloader . I modified it to match my partition like so :


[BITS 16]
[ORG 0x0000]
jmp short START
nop

OEM_ID                db 		"MSWIN4.1"
BytesPerSector        dw 		512
SectorsPerCluster     db 		64
ReservedSectors       dw 		32
TotalFATs             db 		2
MaxRootEntries        dw 		0x0000
NumberOfSectors       dw 		0x0000
MediaDescriptor       db 		0xF0 ;F0 because I'm using Flash memory
SectorsPerFAT         dw 		0x0000
SectorsPerTrack       dw 		63
SectorsPerHead        dw 		255
HiddenSectors         dd 		0x00000800
TotalSectors          dd 		501251072
BigSectorsPerFAT      dd 		61181
Flags                 dw 		0x0000
FSVersion             dw 		0x0000
RootDirectoryStart    dd 		0x00000002
FSInfoSector          dw 		0x0001
BackupBootSector      dw 		0x0006

TIMES 12 DB 0 ;jumping to next offset

DriveNumber           db 		128
ReservedByte          db   		0
Signature             db 		0x29
VolumeID              dd 		0x0931FBD0
VolumeLabel           db 		"NO NAME    "
SystemID              db 		"FAT32   "

When I boot the computer, I can see the 4 partitions (I actually have only one partition but I understand why four partitions appears) on the flash drive. When I select the first and only (active) partition, the message "Boot sector error" and then reboot.

I tried debugging the MBR and from what I've seen, the code/condition that triggers the error message is the following :

CHECK_OS:
CMP WORD [0x7DFE], 0xAA55
JNZ PRINT_ERROR             ; Missing bootable mark <-- this part here

Clearly this shouldn't be happening because my FAT32 boot sector has the signature 0xAA55 (I can show the full FAT32.asm boot sector code if needed, it's just the same as https://github.com/ishanthilina/USB-FAT32-Bootloader expect for the aformentioned changes I made).

EDIT : The FAT32 Partition starts at sector 2048

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.