bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Purpose of 'legacy_boot' attribute


From: Chris Murphy
Subject: Re: Purpose of 'legacy_boot' attribute
Date: Wed, 19 Oct 2011 15:13:20 -0600

On Oct 19, 2011, at 9:37 AM, Keshav P R wrote:

On Wed, Oct 19, 2011 at 20:46, Brian C. Lane <address@hidden> wrote:
I was also just wondering if we (Fedora) should be setting legacy_boot
on /boot partitions instead of the boot flag, since the latter writes an EFI
system GUID to the partition type.


Yes. And also change the linux partition type GUID to 8300 (gdisk type code) instead of 0700 (Microsoft Basic Data type).

This might be out of scope for anaconda. Soon it will set linux filesystem GUID partition type, instead of Windows BDP, once parted is updated with Rod's code, and once that version of parted is brought downstream to Fedora. So if that's not going to drag out too much longer, I think it's better if distro installers inherit this change from parted, rather than write separate code that will in short order need to be removed.

For few tasks Anaconda should make use of sgdisk instead of parted until parted gets such functionality (like changing partition type guid etc.). I use both parted and sgdisk for GPT disks in Archlinux (Archboot iso) installer script.

That may be a lot of work for anaconda for one small problem. My biggest complaint with parted isn't function, but rather all of these flags many of which really don't exist at all in GPT, they just change GUIDs. So it leads one to envision actual on-disk behavior rather incorrectly from reality. I would like to see gdisk included by default in distributions however.

On the flipside I recommend renaming boot flag in GPT to uefisys or something like that to make it meaningful. Also parted does not differenciate (to the user) GPT partition type (UEFISYS aka boot flag) and partition attribute (legacy bios bootable flag), ie, both are flags in parted. Sometimes this might be confusing to use in distro installer scripts.

I think what's happened is MBR has an actual boot flag (active flag) for partitions. And installers including anaconda, have continued to set a 'boot' flag when GPT came around. But the parted 'boot' flag has a considerably different meaning in GPT parlance than MBR, as well as on-disk result. For MBR it's one byte that changes. For GPT it totally changes the partition type GUID (16 bytes), i.e. it's not a "flag" at all on-disk.

Chris Murphy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]