Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jan 2007 10:41:48 -0800
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        Jo Rhett <jrhett@svcolo.com>
Cc:        stable@FreeBSD.org
Subject:   Re: 2.4TB disk - MBR and GPT coexist?
Message-ID:  <FCCD8CA6-BF0F-4EA6-A736-A578E20A10E3@mac.com>
In-Reply-To: <45A8925D.7050303@svcolo.com>
References:  <45A5FD8A.6080409@svcolo.com> <2918081F-D376-410B-B6FD-42BDD3323575@svcolo.com> <20070111213444.GB17185@zone3000.net> <D0D0CE06-B991-4945-B12B-152BA930106B@svcolo.com> <F3B0BD49-133C-4BD4-A747-68BD75F72D63@mac.com> <45A74F01.7040200@svcolo.com> <59462C3F-B132-4597-8462-8BF3E031789F@mac.com> <45A8925D.7050303@svcolo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jan 13, 2007, at 12:03 AM, Jo Rhett wrote:

>> On Jan 12, 2007, at 1:04 AM, Jo Rhett wrote:
>>> To make this into a step-by-step, what do you mean by "restore  
>>> the MBR partition" ?  From backup, or...?
>
> Marcel Moolenaar wrote:
>> Manually recreate, I guess. When creating a GPT, the MBR is replaced
>> by a PMBR. A PMBR is a MBR with a single partition spanning the
>> whole disk (or as much as can be covered by the MBR) that has type
>> 0xEE. The GPT kernel code expects such a partition but does not care
>> if there are others. If you restore the MBR from a backup, the 0xEE
>> partition will be gone and the GPT will not be used.
>> It would probably be nice if gpt(8) could migrate without destroying
>> the existing MBR partition, because restoring the MBR partition is
>> the least intuitive step. Let me think about this for a bit...
>
> I am very interested in solving this problem, and have machines I  
> am more than willing to dedicate to this project.  I'm just somehow  
> lacking a clear understanding of what I need to do to test this:
>
> 1. Install FreeBSD with a normal MBR partition and leftover free space
> 2. Migrate the partition to GPT (can I do this from CD fixit mode?)

You should be able to do this on a running system provided you
have kern.geom.debugflags=16 to allow writing to the disk when
it has been mounted.

Note that after this step the MBR is turned into a PMBR, so
you need to restore the MBR before you do anything else
otherwise you might find yourself with an unbootable machine.
You should be able to use fdisk for this.

After that you have both the MBR and GPT describing the same
partition/slice and you should be able to reboot the machine.
If you boot verbose, you should see that GPT "claims" the
partitions. If not, stop.

Use GPT to partition the free space on the disk.

-- 
Marcel Moolenaar
xcllnt@mac.com





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FCCD8CA6-BF0F-4EA6-A736-A578E20A10E3>