From owner-freebsd-stable@FreeBSD.ORG Fri Jul 11 03:35:34 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 087F5106566B for ; Fri, 11 Jul 2008 03:35:34 +0000 (UTC) (envelope-from peter@wemm.org) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id C74128FC28 for ; Fri, 11 Jul 2008 03:35:33 +0000 (UTC) (envelope-from peter@wemm.org) Received: by yw-out-2324.google.com with SMTP id 9so1534472ywe.13 for ; Thu, 10 Jul 2008 20:35:31 -0700 (PDT) Received: by 10.143.32.7 with SMTP id k7mr2879012wfj.305.1215747330022; Thu, 10 Jul 2008 20:35:30 -0700 (PDT) Received: by 10.142.76.14 with HTTP; Thu, 10 Jul 2008 20:35:30 -0700 (PDT) Message-ID: Date: Thu, 10 Jul 2008 20:35:30 -0700 From: "Peter Wemm" To: "Carlos A. M. dos Santos" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: FreeBSD Stable Subject: Re: Looking for a GPT-aware boot manager 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, 11 Jul 2008 03:35:34 -0000 On Thu, Jul 10, 2008 at 8:09 PM, Carlos A. M. dos Santos wrote: > Hello, > > I'm attempting quad-boot my notebook with STABLE and CURRENT, both > i386 and AMD64. I installed them manually by booting from a thumb > drive, partitioning the hard disk and extracting the distributions > from ISO images that I had stored on an external hard drive. My disk > layout is as follows: > > ad0p1 boot > ad0p2 freebsd, partitioned with disklabel for 7.0/AMD64 > ad0p2a 7.0 AMD64 root > ad0p2d 7.0 AMD64 /var > ad0p2f 7.0 AMD64 /usr > ad0p3 freebsd, partitioned with disklabel for 7.0/i386 > ad0p3a 7.0 i386 root > ad0p3d 7.0 i386 /var > ad0p3f 7.0 i386 /usr > ad0p4 freebsd, partitioned with disklabel for 7.0/AMD64 > ad0p4a 8.0 AMD64 root > ad0p4d 8.0 AMD64 /var > ad0p4f 8.0 AMD64 /usr > ad0p5 freebsd, partitioned with disklabel for 7.0/AMD64 > ad0p5a 8.0 i386 root > ad0p5d 8.0 i386 /var > ad0p5f 8.0 i386 /usr > ad0p6 freebsd, partitioned with disklabel for all > ad0p6b swap > ad0p6d /temp > ad0p6e /local > > The problem now is that I don't have a boot manager capable of > selecting a partition to boot from. The FreeBSD boot manager (boot0) > does not recognize GPT. I atempted to pass "0:ad(0p3)/boot/loader" to > gptboot but had no success. > > I did a lot of googling and even attempted to read the source code of > gptboot but could not figure out how to solve the problem, so any help > will be appreciated. I think your biggest mistake was putting a disklabel inside a gpt partition. You've kind of missed the point of gpt. There are 16,000 partitions so that we don't have to deal with nested partition tables. Even loader doesn't handle this scenario. It understands the mbr/disklabel style disk0s1a, disk0s1, as well as gpt style disk0p1, but not gpt+disklabel disk0p1a. If it wasn't for that, you could do a simple menu in the loader scripts that did something like: set currdev=disk0p3: boot kernel .. to select the root partition that you wanted. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell