From owner-freebsd-current Mon Oct 14 5:46:21 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A09137B401 for ; Mon, 14 Oct 2002 05:46:18 -0700 (PDT) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NetScum.dyndns.dk (dclient80-218-16-13.hispeed.ch [80.218.16.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id B038E43EAF for ; Mon, 14 Oct 2002 05:46:16 -0700 (PDT) (envelope-from bounce@dcf77-zeit.netscum.dyndns.dk) Received: from MAIL.NetScum.DynDNS.dK (ipv6.NetScum.dyndns.dk [2002:50da:100d:0:250:daff:fe21:edca]) by dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NetScum.dyndns.dk (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id g9ECkDp16116 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified NO); Mon, 14 Oct 2002 14:46:14 +0200 (CEST) (envelope-from bounce@dcf77-zeit.netscum.dyndns.dk) Received: (from root@localhost) by MAIL.NetScum.DynDNS.dK (8.11.6/SMI-4.1-R00T0WNED) id g9ECkDB16115; Mon, 14 Oct 2002 14:46:13 +0200 (CEST) (envelope-from bounce@dcf77-zeit.netscum.dyndns.dk) Date: Mon, 14 Oct 2002 14:46:13 +0200 (CEST) Message-Id: <200210141246.g9ECkDB16115@MAIL.NetScum.DynDNS.dK> From: BOUWSMA Beery Organization: Men not wearing any pants that dont shave X-Hacked: via telnet to your port 25, what else? References: <3DA9D43E.2080203@hotmail.com> <3DAA03D0.5010900@hotmail.com> X-Internet-Access-Provided-By: CABAL MODEM (all hail CABAL) To: walt Cc: freebsd-current@freebsd.org Subject: Re: GEOM and NetBSD partitions/disklabels X-NetScum: Yes X-One-And-Only-Real-True-Fluffy: No Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [IPv6-only address above; strip the obvious for IPv4-only mail] > > ...That is, your kernel can mount the NetBSD partitions with their 16 > > partitions within, even if `disklabel' doesn't work yet... > Heh, I just mounted the NBSD partition using an un-patched FBSD kernel > with GEOM, even though disklabel (recompiled) refuses to list it. I took a look at my local patches, and just looked at phk's original patch, which apparently doesn't touch `disklabel'... Under -current, my only patch to any related source file is to disable the assert as noted. In my make.conf file I have the lines CFLAGS= -O -pipe -DMAXPARTITIONS=16 COPTFLAGS= -O -pipe -DMAXPARTITIONS=16 which is arguably wrong, but it defines this for everything, world, kernel, or otherwise. Utilities that need to grok the disklabel are going to include src/sys/sys/disklabel.h which looks something like #ifndef MAXPARTITIONS #define MAXPARTITIONS 8 The patch from phk doesn't seem to do anything other than patch src/sys/geom/geom_bsd.c which won't touch disklabel, maybe. Don't quote me, I haven't looked at recent changes. The earlier solution I did was to change src/sys/sys/disklabel.h from 8 up to 16, but rather than continue to apply that hack each time I built the world, I instead used make.conf which worked until the assert sanity check was added. (I'd love to see it changed as per the patch from a hardcoded constant to something that will work for 8 or 16 MAXPARTITIONS...) The last time I built world -current was 02.Okt and I saw no problems with the mounted NetBSD filesystems there, though it was a non-devfs and non-geom world for me. I do the same thing with -stable, but I needed to hack around an explicit sanity check in diskslice.h there, but I don't see any other obvious changes I made to be able to mount NetBSD filesystems. I don't know that it will break anything to build the whole world with MAXPARTITIONS as 16, but I've done it for something like a year now with both -current and -stable and not noticed anything as a result, and nobody's told me that something will break, so... > What a mess. I hope I can un-bork any damage I may have done. I can't remember if I saw anything like that -- I vaguely recall it. If you want to risk it, you can try changing disklabel.h and making the whole world and kernel again to get MAXPARTITIONS universally distributed, but as I note, I've only done this no later than a few weeks ago, so any potential breakage is unknown to me. (You did a read-only mount, I hope?) Also, if you have enough machines around, you might want to try it without geom or anything to verify that you can reproduce my successes... > > to modify NetBSD's fsck as needed to be done in FreeBSD-stable or use an > > alternate superblock under NetBSD after a FreeBSD rw mount... > Thanks for the reminder. I'd completely forgotten about that problem. If you need it, I have a NetBSD pr that you can find by searching their -current mailing list, including patch, based on old NetBSD- current, that works for me... > Now I'll go and re-apply phk's patch (which was undone by cvsup) and try I have a few files I want to hack for various reasons, and I use a unionfs mount of the hacked versions atop the unhacked source, which also requires tracking whether the sources have changed below, and that's why I chose to use a make.conf MAXPARTITIONS rather than to fudge the source files proper. You can cd into the `disklabel' source directory and build a version of that binary with the -DMAXPARTITIONS=16 if you hesitate to build the whole world, and see if that will read your NetBSD disklabel with no problems, but I seem to recall that I may have needed to rebuild a MAXPARTITIONS kernel as well. Can't hurt to try, I don't think... barry bouwsma will improperly build world for food To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message