From owner-freebsd-stable@FreeBSD.ORG Fri Jan 12 15:40:27 2007 Return-Path: X-Original-To: stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4D0D16A537 for ; Fri, 12 Jan 2007 15:40:27 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.175]) by mx1.freebsd.org (Postfix) with ESMTP id BD01513C44B for ; Fri, 12 Jan 2007 15:40:27 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/8.12.11/smtpout05/MantshX 4.0) with ESMTP id l0CFeRvP028576; Fri, 12 Jan 2007 07:40:27 -0800 (PST) Received: from [192.168.1.2] (c-67-164-11-148.hsd1.ca.comcast.net [67.164.11.148]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id l0CFeOKB006254 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 12 Jan 2007 07:40:26 -0800 (PST) In-Reply-To: <45A74F01.7040200@svcolo.com> References: <45A5FD8A.6080409@svcolo.com> <2918081F-D376-410B-B6FD-42BDD3323575@svcolo.com> <20070111213444.GB17185@zone3000.net> <45A74F01.7040200@svcolo.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <59462C3F-B132-4597-8462-8BF3E031789F@mac.com> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Fri, 12 Jan 2007 07:39:20 -0800 To: Jo Rhett X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: stable@FreeBSD.org Subject: Re: 2.4TB disk - MBR and GPT coexist? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2007 15:40:27 -0000 On Jan 12, 2007, at 1:04 AM, Jo Rhett wrote: > Marcel Moolenaar wrote: >> On Jan 11, 2007, at 1:56 PM, Jo Rhett wrote: >>> Since we're going to be stuck with old BIOSes for a long time >>> after 2TB is a cheap disk drive at [store], is anyone considering >>> doing the work to make GPT co-exist with an MBR block? >> It is already possible for them to coexist. It's not uncommon in the >> industry to use MBR partitions even though the disk has GPT. The >> point is that you need to tools to avoid making a mess. Ideally you >> want the MBR partitions mirrored by the GPT so that the kernel only >> has to deal with GPT. The BIOS will use the MBR to boot. >> The gpt(8) tool can actually be used to set this up. You partition >> the disk with fdisk, but only for the boot partition. Then you run >> gpt(8) to migrate the MBR into a GPT, specifying the -s option so >> that you get a single GPT partition overlapping the MBR slice. After >> that you restore the MBR partition. Now you can use GPT to define >> a big partition. The kernel will use GPT and since you used -s when >> you migrate the MBR, the kernel will create device nodes with the >> same name as it would for the MBR partitions... > > That is exactly what I was hoping to find, but was unable to be > certain that it was possible from what I saw in the searches. > > To make this into a step-by-step, what do you mean by "restore the > MBR partition" ? From backup, or...? 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... -- Marcel Moolenaar xcllnt@mac.com