bug-parted
[Top][All Lists]
Advanced

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

[RFC][PATCH] GPT Protective MBR changes


From: Matt_Domsch
Subject: [RFC][PATCH] GPT Protective MBR changes
Date: Fri, 28 Sep 2001 15:51:04 -0500

Intel is going to change the GUID Partition Table (GPT) spec slightly, but
it has a nasty effect on my GPT code.
The current on-disk structure looks like:
LBA 0:    Protective MBR (normal MSDOS MBR with a single partition covering
the whole disk, type 0xEE).
LBA 1:    Primary GPT header
LBA 2-33: Primary GPT partition entries
LBA N-32: Alternate GPT partition entries
LBA N:    Alternate GPT header
(where N is the last sector of the disk)

Up until now, the Protective MBR was written to all GPT disks, but it wasn't
required to be there for the disk to still be considered GPT.  Its stated
purpose was to protect against "legacy" (non-GPT-aware) apps from mucking
with the disk.  As long as one of the Primary or Alternate sets of GPT info
was there and valid, the disk was considered GPT.

Now, Intel wants to change this.  They want the Protective MBR (PMBR) to be
required also.  If something zeros or otherwise changes the PMBR, then
*those* changes should take effect, and the disk is no longer considered
GPT.

I don't like this at all.  Essentially, the Alternate GPT stuff becomes
useless.  How often will blocks 1-33 be changed when block 0 isn't?

In any case, I've made a patch to parted-1.4.19-pre4 at
http://domsch.com/linux/parted/parted-1.4.19-pre4-gpt-20010928.patch which
implements this change, but asks the user what they think the right thing to
do is.

If it comes across a case where there exists valid GPT info, but no PMBR, it
asks.
Yes means the disk is still GPT, just re-write the PMBR.
No means the disk is now considered MBR, and erase any valid GPT info.
Ignore means the disk is now considered MBR, but don't write to it.

I'm similarly patching the Linux kernel, with a 'gpt' command line override,
so that if there's valid GPT info but no PMBR, it assumes the disk is MBR
unless the gpt override is passed.  The kernel will also complain when doing
this, and tell the user to go use parted to fix it up. :-)  My current
kernel patch (against 2.4.10 + ia64 patch) is at
http://domsch.com/linux/patches/linux-2.4.10-gpt-20010928.patch.


I'd like to get people's thoughts on all this.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer
Dell Linux Solutions
www.dell.com/linux
#2 Linux Server provider with 17% in the US and 14% Worldwide (IDC)!
#3 Unix provider with 18% in the US (Dataquest)!




reply via email to

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