[parted-devel] [PATCH 1/2] libparted: check PMBR before GPT partition table (#805272)

Phillip Susi psusi at ubuntu.com
Wed Mar 21 01:19:40 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/20/2012 08:25 PM, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl at redhat.com>
> 
> The UEFI spec requires that a valid GPT disk label have a PMBR
> partition. This moves the PMBR check to before the GPT check,
> exiting gpt_probe with a 0 if the PMBR is not valid.
> 
> The previous behavior would cause problems in the following situation:
>  1. format a disk as GPT
>  2. re-format it as MSDOS using tools that don't understand GPT
> 
> Subsequent operations with parted would then complain about the invlid
> PMBR, but would not allow the disk to be used as a msdos disk. This
> change causes parted to tread the disk as a msdos disk.

I don't think this patch is quite right.  The exception should be fixed rather than removed.  If it is supposed to be a GPT disk, then we should fix the broken PMBR.  If it is not, then we should zap the GPT and then fail to recognize the disk as GPT ( thus allowing it to be recognized as DOS ).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPaSypAAoJEJrBOlT6nu75d0QIANkC11kBS1olc9BU89UubUXB
82sk+b1PX6ZKKujOL2sFVx1uKxxHIncPbAuLs17SmgV+3+Go3B5IGKJYCNPxx94z
DDatQuCQKtOQLMsKhpf+dVPC0zdXuyYtrGIrduKH6UW8VpFrVDTn2yGLdbI/qKkJ
R86BETIx4xbWr0wGDhbA0s93udC9fuuibtkL/DBYUgkbSbFQCHq8u7YtOzFKlevp
jtNJLhG8fgBAXVJjDu5RNSwtclH0W+wIdcPboe3lbnB23cNxK4uSyr2xZLrAQw2t
y2AnE7OpBABc0zxvCrc3izA/do6aoHte8x/Jpdpy4wXAN8xv3FfOM5iQaIYXa3s=
=noom
-----END PGP SIGNATURE-----



More information about the parted-devel mailing list