Date: Mon, 14 Oct 2002 14:46:13 +0200 (CEST) From: BOUWSMA Beery <freebsd-misuser@ipv6.netscum.dyndns.dk> To: walt <wa1ter@hotmail.com> Cc: freebsd-current@freebsd.org Subject: Re: GEOM and NetBSD partitions/disklabels Message-ID: <200210141246.g9ECkDB16115@MAIL.NetScum.DynDNS.dK> References: <aoc2vv$1d1f$1@FreeBSD.csie.NCTU.edu.tw> <3DA9D43E.2080203@hotmail.com> <aocs4l$bta$1@FreeBSD.csie.NCTU.edu.tw> <3DAA03D0.5010900@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210141246.g9ECkDB16115>