Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Oct 2002 17:20:11 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Jens Schweikhardt <schweikh@schweikhardt.net>
Cc:        current@FreeBSD.ORG
Subject:   Re: GEOM and NetBSD partitions/disklabels 
Message-ID:  <6071.1034522411@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 13 Oct 2002 17:15:35 %2B0200." <20021013151535.GA66616@schweikhardt.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/param.h>
 #ifndef _KERNEL
 #include <stdio.h>
@@ -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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6071.1034522411>