From owner-freebsd-current Sun Oct 13 8:20:20 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 597FF37B401 for ; Sun, 13 Oct 2002 08:20:19 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 886CC43E6E for ; Sun, 13 Oct 2002 08:20:18 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g9DFKBIw006072; Sun, 13 Oct 2002 17:20:16 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Jens Schweikhardt Cc: current@FreeBSD.ORG Subject: Re: GEOM and NetBSD partitions/disklabels In-Reply-To: Your message of "Sun, 13 Oct 2002 17:15:35 +0200." <20021013151535.GA66616@schweikhardt.net> Date: Sun, 13 Oct 2002 17:20:11 +0200 Message-ID: <6071.1034522411@critter.freebsd.dk> From: Poul-Henning Kamp 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 In message <20021013151535.GA66616@schweikhardt.net>, Jens Schweikhardt writes: >Poul-Henning et al, > >recently I've tried installing NetBSD on a new disk. I'm not sure if the >following is a coincidence (because it never worked before, even without >GEOM) or is due to GEOM issues. My -current is from Oct 12 and the kernel >derived from GENERIC, plus/minus devices/options to match my hardware. > >NetBSD uses sysid 169 for their slice and a new style disklabel with 16 >partitions. FreeBSD is unable to deal with that disklabel, it seems. We never had to ability to do this before. GEOM can probably do it for you, with something like this patch: Index: geom_bsd.c =================================================================== RCS file: /home/ncvs/src/sys/geom/geom_bsd.c,v retrieving revision 1.25 diff -u -r1.25 geom_bsd.c --- geom_bsd.c 5 Oct 2002 18:52:06 -0000 1.25 +++ geom_bsd.c 13 Oct 2002 15:19:36 -0000 @@ -39,6 +39,8 @@ * it will server as the source in future copy&paste operations. */ +#define MAXPARTITIONS 16 + #include #ifndef _KERNEL #include @@ -698,7 +700,7 @@ * attach to any other type (BSD was handles above) */ error = g_getattr("MBR::type", cp, &i); - if (!error && i != 165 && flags == G_TF_NORMAL) + if (!error && i != 165 && i != 169 && flags == G_TF_NORMAL) break; /* Get sector size, we need it to read data. */ -- 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message