Opened 4 years ago

Closed 3 years ago

#13076 closed enhancement (invalid)

Bootman does not work with GPT drives

Reported by: pulkomandy Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Applications/BootManager Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


I switched one of my drives to GPT (let's stop using the messy legacy MBR...). Since I want to run multiple Haiku installs, I tried to put Bootman on the disk.

The installation went without errors, except the menu will not show up. Instead bootman will exit and my BIOS will boot the next hard drive. No error is printed.

Using the same disk with writembr works fine, but of course I can boot only one single partition then.

It would be nice to at least warn during Bootman install. It would be even better to make this work.

Attachments (4)

IMG_0246.JPG (1.4 MB ) - added by vidrep 4 years ago.
Haiku_Boot_Manager.JPG (1.2 MB ) - added by vidrep 4 years ago.
x86_gcc2H.png (105.7 KB ) - added by vidrep 4 years ago.
x86_64.png (95.7 KB ) - added by vidrep 4 years ago.

Change History (10)

comment:1 by tqh, 4 years ago

It was a long time since I looked at it, but you shouldn't be allowed to install a MBR on GPT disks. They reserved that space, but its still not ok. So I'm all for disallowing it.

comment:2 by pulkomandy, 4 years ago

That is the only way to boot a GPT disk from a BIOS system. The BIOS knows to do only one thing: read and execute the MBR code. The MBR code can then parse the partition table by any means it wants.

This is of course not needed if you add UEFI into the mix, but this is an additional step. For now I prefer to stick with the BIOS. NetBSD has a similar process:

comment:3 by vidrep, 4 years ago

hrev50700 x86_gcc2 Installing to a GPT partitioned disk from a CD works fine, but the Haiku partition cannot be booted later from the CD's boot menu - it will KDL. I'm not entirely sure if this is related to this ticket. I have attached a photo of the kernel panic.

by vidrep, 4 years ago

Attachment: IMG_0246.JPG added

comment:4 by pulkomandy, 4 years ago

This ticket is about a problem specific to bootman. If you get to KDL it means the kernel is loaded already, so your problem is elsewhere. It looks like your boot partition is missing some directories (/system/packages or something else in /system). Maybe the install did not work completely or some other operation you did ended up corrupting it.

comment:5 by vidrep, 4 years ago

Here's a photo and a couple of screenshots showing the Haiku boot menu working on a 3TB GUID partitioned hard drive.

by vidrep, 4 years ago

Attachment: Haiku_Boot_Manager.JPG added

by vidrep, 4 years ago

Attachment: x86_gcc2H.png added

by vidrep, 4 years ago

Attachment: x86_64.png added

comment:6 by pulkomandy, 3 years ago

Resolution: invalid
Status: newclosed

Confirmed working here as well after a second try on the same setup. Review of the bootman asm code shows that indeed there is no problem: the bootloader does not read the partition table. It is pre-loaded with partition offsets at install, and uses those to load the stage1 loader directly from the partition data.

So, it can be made to work even without any partition table on the disk (what a feature!), or with RDB or any other format.

My system now boots just fine from a GPT disk using bootman.

Note: See TracTickets for help on using tickets.