Opened 5 years ago

Last modified 5 years ago

#33 new enhancement

Allow boot of grub2 from extended logical partition

Reported by: shmuel Owned by:
Priority: minor Milestone:
Component: Boot Manager Version: 1.0
Keywords: Cc:

Description

I'm playing around with openSUSE and found that the way it installs grub (see https://bugzilla.opensuse.org/show_bug.cgi?id=1165282 and https://bugzilla.suse.com/show_bug.cgi?id=1165042) interferes with Air-Boot; unless you configure custom boot, it writes the boot loader into the PBR of the extended logical partition instead of the PBR for the logical drive. How hard would it be to add an Air-boot option to include the extended logical partition on the boot menu?

Change History (1)

comment:1 by Ben Rietbroek, 5 years ago

Hi shmuel,

I am not in the AiR-BOOT context right now, so I'll be replying off the top of my head.

AiR-BOOT scans the disk using partitions and their partition-type.
As you may know, the partition-type for a Linux partition is 0x83, regardless of the
file-system used to format that partition. When AiR-BOOT encounters a 0x83 partition,
it *assumes* a bootloader like GRUB is installed there and transfers control to the PBR
of that partition. It does *not* check for GRUB or any other bootloader.

Now to your question of how hard it would be to include the PBR of extended container.

At the lowest level it is of course no problem to load the PBR of the 0x05/0x0f partition
and transfer control to it. The harder stuff is most likely in the internal housekeeping of
AiR-BOOT, especially the internal partition-tables and their accompanying handling logic
and also the stuff that presents the user-interface and internal SETUP.

The partitions found by AiR-BOOT are placed in an array together with all kinds of flags
that control corresponding logic for such partitions. To include the 0x05/0x0f partition
as a bootable option would require to mimic it as a normal partition. Because it is not
a normal partition but a container, logic that handles partitions must be checked very
thoroughly, because a stray write would make all logical partitions inaccessible.

So, I would say there is a substantial effort involved, not necessarily in booting from
a 0x05/0x0f PBR, but more in integrating it in how AiR-BOOT works internally. Also,
there is currently not much code-space left, so this enhancement would also depend
on doing more cleanup first.

I will investigate the feasibility of this enhancement to a greater extent when I
put on my AiR-BOOT cap again, but you should not hold your breath ;)

In the mean time, It is not too hard to relocate GRUB from the 0x05/0x0f PBR to
the PBR where your Linux is installed.

It involves booting your Linux, opening a root-terminal, and using install-grub
to install it into the PBR of your Linux partition. Note that you most probably have
to use the --force flag.

After that, run update-grub to let it scan your drives and generate the GRUB
configuration. Now GRUB is in the PBR of a normal partition and when you reboot
AiR-BOOT should show it.

If you need any help relocating GRUB, just let me know here on this ticket.

Best regards,

Ben.

Version 1, edited 5 years ago by Ben Rietbroek (previous) (next) (diff)
Note: See TracTickets for help on using tickets.