Bug 694808

Summary: use gpt for new partition tables created by anaconda on > 2 TB disks
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: anacondaAssignee: David Lehman <dlehman>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jonathan, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-16.8-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-07 18:11:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 694803    
Bug Blocks:    

Description Hans de Goede 2011-04-08 13:41:24 UTC
Currently anaconda always uses plain old dos partition tables when writing a
new table to a disk, even the disk is > 2TB. This is no good because a dos
tabel cannot address the last parts of the disk then.

The reason anaconda does this, is that some BIOS' actually read the dos table
and check for an active flag, and if it is not there, skip the disk in their
boot sequence.

gpt partitioned disks do also have a dos table in the mbr, consisting of 1
entry spanning the entire disk, and marked with a special gpt partition type.
This is to tell other non gpt aware tools that the entire disk is used and they
should not touch it.

If this fake partition entry would have its active flag set (boot flag in
parted terms), then even such BIOS' would be able to boot from the disk, which
would allow anaconda to use a gpt table by default on larger disks. I've filed a bug against parted to add the flag when it writes the table, see bug 694803.

Since these larger disks are becoming common place it would be good if anaconda could move to using a gpt table by default for disks > 2T once this parted bug is resolved.

Comment 1 David Lehman 2011-04-15 18:22:09 UTC
In fedora we are working hard to make grub2 the default bootloader. This allows us to use the BIOS boot partition instead of overloading fields inside the GPT disklabel or using hybrid MBRs or whatever other hacks exist. Will this meet your needs?

Comment 2 Hans de Goede 2011-04-15 20:09:04 UTC
Hi,

(In reply to comment #1)
> In fedora we are working hard to make grub2 the default bootloader. This allows
> us to use the BIOS boot partition instead of overloading fields inside the GPT
> disklabel or using hybrid MBRs or whatever other hacks exist.

AFAIK that will only help for EFI systems not for good old PC BIOS systems.

> Will this meet your needs?

I didn't file this bug because I've a need for it, but because I know back from
my anaconda days that there is this problem on certain setups (PC BIOS, disk > 2.5 T) where anaconda cannot partition the entire disk. Switching to gpt when the disk > 2TB would fix this, the reason we decided against doing this in the past was that some BIOS' won't boot from a disk when there is not an active partition in the old dos partition table in the mbr. Making the protection partition in the mbtr active (bug 694803), fixes this problem and allows anaconda to use gpt when the disk > 2TB even on PC BIOS systems.

I heard from the mark the protected partition dos partition table entry active trick from a fellow Dutch hacker, and thought it would be good to use this in anaconda for F-16 too. I discussed this with pjones on irc before filing this bug and bug 694803.

Comment 3 David Lehman 2011-04-15 20:41:19 UTC
(In reply to comment #2)
> Hi,
> 
> (In reply to comment #1)
> > In fedora we are working hard to make grub2 the default bootloader. This allows
> > us to use the BIOS boot partition instead of overloading fields inside the GPT
> > disklabel or using hybrid MBRs or whatever other hacks exist.
> 
> AFAIK that will only help for EFI systems not for good old PC BIOS systems.

It is only for booting from GPT disks on BIOS systems. It is not used for EFI systems at all.

Comment 4 David Lehman 2011-06-07 18:11:31 UTC
As of anaconda-16.8-1, GPT disklabels should be used for large disks when creating a new disklabel.