From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OJOoI-0007qi-5N for mharc-grub-devel@gnu.org; Tue, 01 Jun 2010 06:35:02 -0400 Received: from [140.186.70.92] (port=47143 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJOoE-0007qF-Em for grub-devel@gnu.org; Tue, 01 Jun 2010 06:34:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJOoC-0001DY-So for grub-devel@gnu.org; Tue, 01 Jun 2010 06:34:58 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:47028) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJOoC-0001DM-Oa for grub-devel@gnu.org; Tue, 01 Jun 2010 06:34:56 -0400 Received: by wwb24 with SMTP id 24so1414921wwb.0 for ; Tue, 01 Jun 2010 03:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=iXrAjWTGDpTh4JsY+isGbiOVy+ylgyHnVuY3ZwmLwDE=; b=kN8z+ytx1u8vKHMxB4jRKzd03VAET2WCtQqKmiTatnSH5fGdkxClMCxO4JSH2m45z7 VVadgCkOKDf1++p81nKBGEVcHO3U17EYGB5rN0ZQnJOE6UNaf7Qtqx/rFnlkVUhCZPcG ngSkI2zogQk0zvU7rDmmXIj/8dL5IvmA+l+1o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=MLGS+nhmdWCW11d78W3L0Mweb2FXC8W1mxoVTSDH6jV55wSYlPg0YJHXfRWysfB7m/ tI5Aqymq5vAqsaEiRu4YEPHkhio2ANtcjBWc2Z6y//jscp2LIyEkl2pI4eTg1maASu/8 Ls135/oIFBJMimxow7IyQhdv51nTcxgt08/KE= Received: by 10.227.127.76 with SMTP id f12mr5752227wbs.206.1275388492125; Tue, 01 Jun 2010 03:34:52 -0700 (PDT) Received: from [192.168.1.50] (c2433-1-88-160-112-182.fbx.proxad.net [88.160.112.182]) by mx.google.com with ESMTPS id h22sm42971757wbh.15.2010.06.01.03.34.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Jun 2010 03:34:51 -0700 (PDT) Message-ID: <4C04E245.1040607@gmail.com> Date: Tue, 01 Jun 2010 12:34:45 +0200 From: =?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100411 Icedove/3.0.4 MIME-Version: 1.0 To: The development of GNU GRUB References: <4BF2DE4F.7070209@gmail.com> <4BF2F68E.8090906@gmail.com> <4BF42759.1010503@gmail.com> <4BF43302.6080106@gmail.com> <4BF43A0A.80801@gmail.com> <4BF8FA66.5060702@gmail.com> <4C042719.4050907@gmail.com> In-Reply-To: <4C042719.4050907@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Are BSD partitions not supported? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 10:35:00 -0000 On 05/31/2010 11:16 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Looks like we have to have different behaviour for different BSDs. > Since it looks like generic code would fail for ThisBSD or ThatBSD, > I propose to go by as-needed basis. So I think we should: -restrict > bsdlabel to being embed into msdos partitions of types a5, a6 or a9. > -conditionalise the behaviour and use my patch for a5 (FreeBSD) and > current behaviour for a6 (OpenBSD) and a9 (NetBSD). We could be a bit more general and assume that BSD label offsets are always relative except for NetBSD and OpenBSD msdos-embedded partitions. In particular, we should support BSD labels that are not embedded in an msdos partition. So bsdlabel_partition_map_iterate would do (in pseudo code): if disk->partition is not NULL /* embedded partition */ and disk->partition's partmap is msdos and disk->partition's msdos partition type is NetBSD or OpenBSD then interpret BSD label offsets as absolute /* (a) */ else interpret BSD label offsets as relative /* (b) */ fi In short, the normal interpretation of BSD label offsets would be the relative one (b), and we would make an exception to handle NetBSD and OpenBSD (a). Now, when BSD label offsets are detected absolute (a), should we consider them as absolute: - w.r.t. to the start of the disk (as is done in the code right now), or - w.r.t to the location of the msdos partmap? I prefer the second option since it is compatible with dd-ing an entire disk into an msdos partition. Maybe the loopback feature also requires the second option (I don't know the internals). Grégoire