Changes between Initial Version and Version 1 of Ticket #4028


Ignore:
Timestamp:
Jun 14, 2009, 9:05:23 PM (11 years ago)
Author:
meianoite
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4028 – Description

    initial v1  
    11Attached is a 512 byte PMBR boot loader that looks for the UUID of a Haiku GPT partition and boots it, falling back to MBR partitions if said UUID isn't found or if the (primary) GPT is corrupted or non-existent.
    2        Its usefulness is in being a generalised IPL that supports both partitioning styles, allowing it to be used transparently and even allowing disks to be converted from one partitioning style to the other with ease, should the need for more partitions or volumes over 2TiB arise (for instance when cloning an older disk to a newer, more capacious one).
    3        It also paves the way for Haiku to create and support booting from multiple volumes larger than 2TiB, which we're in the very privileged position of enjoying efficiently in the near future due to BFS. Another use case is taking a disk from a Intel EFI machine, plugging it on a BIOS machine and boot just fine; and vice-versa.
    4        As mentioned, if there are valid partitions defined in the MBR, and the primary GPT becomes corrupt, it can fall back to loading the MBR partition with the active flag set, if one is defined.
    5        Currently there's no provision for falling back to the GPT copy that lives in the end of the disk, due to the 512 bytes constraint; supporting this would require either some major refactoring of the code or disabling the support for booting from MBR using calls to int13h other than function 4200h, "LBA Read from Disk".
    62
    7        It was tested on emulators and on my actual, proper computer. It can load Windows, Haiku and FreeBSD;  the number of sectors to load from the partition is adjustable, but beware that int13h 4200h only supports up to 127 (0x7f) sectors, or a loader of almost 64KiB; so don't specify a larger number. This is not checked on the code, again because of space constraints.
     3Its usefulness is in being a generalised IPL that supports both partitioning styles, allowing it to be used transparently and even allowing disks to be converted from one partitioning style to the other with ease, should the need for more partitions or volumes over 2TiB arise (for instance when cloning an older disk to a newer, more capacious one).
     4
     5It also paves the way for Haiku to create and support booting from multiple volumes larger than 2TiB, which we're in the very privileged position of enjoying efficiently in the near future due to BFS. Another use case is taking a disk from a Intel EFI machine, plugging it on a BIOS machine and boot just fine; and vice-versa.
     6
     7As mentioned, if there are valid partitions defined in the MBR, and the primary GPT becomes corrupt, it can fall back to loading the MBR partition with the active flag set, if one is defined.
     8
     9Currently there's no provision for falling back to the GPT copy that lives in the end of the disk, due to the 512 bytes constraint; supporting this would require either some major refactoring of the code or disabling the support for booting from MBR using calls to int13h other than function 4200h, "LBA Read from Disk".
     10
     11It was tested on emulators and on my actual, proper computer. It can load Windows, Haiku and FreeBSD;  the number of sectors to load from the partition is adjustable, but beware that int13h 4200h only supports up to 127 (0x7f) sectors, or a loader of almost 64KiB; so don't specify a larger number. This is not checked on the code, again because of space constraints.