From owner-freebsd-geom@FreeBSD.ORG Sat Feb 12 02:15:34 2005 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1AB516A4CE for ; Sat, 12 Feb 2005 02:15:34 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B3AC43D31 for ; Sat, 12 Feb 2005 02:15:34 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j1C2FUGf007772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Feb 2005 18:15:30 -0800 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.10/Submit) id j1C2FUqW007770; Fri, 11 Feb 2005 18:15:30 -0800 X-Authentication-Warning: hosea.tallye.com: sttng359 set sender to lorenl@alzatex.com using -f Date: Fri, 11 Feb 2005 18:15:30 -0800 From: "Loren M. Lang" To: Poul-Henning Kamp Message-ID: <20050212021530.GB1904@alzatex.com> References: <20050211102323.GA4287@alzatex.com> <9876.1108118696@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9876.1108118696@critter.freebsd.dk> User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C cc: "Loren M. Lang" cc: freebsd-geom@freebsd.org Subject: Re: NetBSD and OpenBSD label geoms. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2005 02:15:35 -0000 On Fri, Feb 11, 2005 at 11:44:56AM +0100, Poul-Henning Kamp wrote: > In message <20050211102323.GA4287@alzatex.com>, "Loren M. Lang" writes: > >I have a quad-boot system with Gentoo Linux, FreeBSD, OpenBSD, and > >NetBSD. I was disappointed to see that none of the BSD's can see each > >other. (Linux could read at least 2 if not all of them.) So, I'd like > >to rectify that by making FreeBSD be able to read the NetBSD disklabel > >and then OpenBSD's disklabel. I'm thinking it will be easiest to copy > >the FreeBSD disklabel geom and modify it to work with NetBSD, and then > >merge it back into the FreeBSD disklabel code if it's still very > >similar. > > I belive all you need to do is to increase MAXPARTITIONS. I tried to create a new geom for the netbsd disklabels where all I did was change the partition id from 165 to 169 and renamed all the functions from *bsd* to *nbsd* to avoid conflicts. When I loaded the new kernel module into freebsd, it still failed to taste properly so I assume that there's some other fields that didn't add up correctly for a freebsd disklabel. I don't think that having MAXPARTITIONS would cause the taste to fail like that from my understanding of it. Also, why would netbsd change it's id from 165 to 169 if it was exactly the same? Also I'm wondering why NetBSD would change it's id from 165 to 169. Is it just because of adding more partitions or to identify it as a different OS? I was suspecting that something more critical would be different. Also, there's the issue that the d partition is a special partition in NetBSD that refers to the whole disk where the c partition is just the whole disklabel. In freebsd the c partition serves the same purpose, but for the whole disk you have to access it by other means and by-pass the disklabel. I think this is do to NetBSD deciding to make all the offsets relative to start of disk where FreeBSD has all offsets relative to start of slice containing disklabel, but I could be wrong on this. Though based off of my understanding of GEOM, the freebsd disklabel geom wouldn't even realize how big the real drive is, and it would have to be designed relative to the start of slice which is the provider that it's attached to. > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C