[haiku-bugs] [Haiku] #8434: Building to GPT disks may write boot-code to wrong partition

#8434: Building to GPT disks may write boot-code to wrong partition
--------------------------+------------------------------
 Reporter:  tqh           |        Owner:  bonefish
     Type:  bug           |       Status:  new
 Priority:  normal        |    Milestone:  R1
Component:  Build System  |      Version:  R1/Development
 Keywords:                |   Blocked By:
 Blocking:                |  Has a Patch:  0
 Platform:  All           |
--------------------------+------------------------------
 I use GPT partioning on my disks, and have a UEFI boot-partition and then
 ordinary partitions like this:
 {{{
 gptsync /dev/sda

 Current GPT partition table:
  #      Start LBA      End LBA  Type
  1           2048         4095  BIOS Boot Partition
  2           4096     62918655  Basic Data (Linux)
  3       62918656     87494655  Basic Data (Haiku)
  4       87494656    107974655  Basic Data (Haiku)

 Current MBR partition table:
  # A    Start LBA      End LBA  Type
  1              1         2047  ee  EFI Protective
  2           2048         4095  da  Non-FS data
  3           4096     62918655  83  Linux
  4 *     62918656     87494655  eb  BeOS
 }}}

 Building under Linux to /dev/sda4 will write the build to sda4, but write
 the boot code to sda3 because the GPT and the MBR layout is not directly
 mappable to each other.
 I've verified this problem from the output when building and the offsets
 given are for sda3.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8434>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: