From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 27 19:08:55 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F9781065687; Wed, 27 Jun 2012 19:08:55 +0000 (UTC) (envelope-from xi@borderworlds.dk) Received: from kazon.borderworlds.dk (kazon.borderworlds.dk [IPv6:2a01:4f8:101:4201::1:1]) by mx1.freebsd.org (Postfix) with ESMTP id 0076D8FC26; Wed, 27 Jun 2012 19:08:54 +0000 (UTC) Received: from talaxian.borderworlds.dk (localhost [127.0.0.1]) by kazon.borderworlds.dk (Postfix) with ESMTP id 4D7FA5C3B; Wed, 27 Jun 2012 21:08:45 +0200 (CEST) Message-ID: <4FEB5A3C.5050900@borderworlds.dk> Date: Wed, 27 Jun 2012 21:08:44 +0200 From: Christian Laursen Organization: The Border Worlds User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120613 Thunderbird/13.0 MIME-Version: 1.0 To: John Baldwin References: <4FE9B01C.30306@yandex.ru> <201206270807.23347.jhb@freebsd.org> <4FEB0079.7050008@yandex.ru> <201206271028.54477.jhb@freebsd.org> In-Reply-To: <201206271028.54477.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Doug Rabson , Marcel Moolenaar , Pawel Jakub Dawidek , freebsd-current , freebsd-hackers , Andriy Gapon , "Andrey V. Elsukov" Subject: Re: [CFC/CFT] large changes in the loader(8) code X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 19:08:55 -0000 On 06/27/12 16:28, John Baldwin wrote: > On Wednesday, June 27, 2012 8:45:45 am Andrey V. Elsukov wrote: > >> When we are in the FreeBSD, our loader can detect that device size >> is lower than it see and it will work. When primary header is OK, then >> other OSes should work with this GPT. When it isn't OK, you just can't >> load other OS :) > > Ah, yes. The solution to violating standards is to make sure you never > use standards-compliant software. That's a great argument. :) > > (Although not entirely uncommon. Standards aren't always perfect, but if > we had a way to not gratuitously violate them it would be nice to avoid > doing so.) To be standards compliant and allow whole-disk based mirroring to work at the same time wouldn't nested GPT work like this? Whole disk (start) | GPT header | GPT partition of type freebsd-geom (start) | | gmirror device (start) | | | GPT header | | | | freebsd-boot | | | | freebsd-ufs | | | | freebsd-swap | | | GPT backup header | | gmirror metadata | | gmirror device (end) | GPT partition of type freebsd-geom (end) | GPT backup header Whole disk (end) Nothing but FreeBSD would understand the freebsd-geom partition type, so the inner GPT device should be valid and standards compliant. The boot loader would of course need to understand this setup but that shouldn't be impossible. Just a thought. It might be too complicated compared to the non-standards compliant way it works now which works quite well in practice though. -- Christian Laursen