From owner-freebsd-hackers Mon Nov 4 13:13:16 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA28429 for hackers-outgoing; Mon, 4 Nov 1996 13:13:16 -0800 (PST) Received: from mail12.digital.com (mail12.digital.com [192.208.46.20]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA28418 for ; Mon, 4 Nov 1996 13:12:50 -0800 (PST) Received: from muggsy.lkg.dec.com by mail12.digital.com (8.7.5/UNX 1.5/1.0/WV) id QAA21465; Mon, 4 Nov 1996 16:00:38 -0500 (EST) Received: from whydos.lkg.dec.com by muggsy.lkg.dec.com (5.65/DEC-Ultrix/4.3) with SMTP id AA11237; Mon, 4 Nov 1996 16:00:39 -0500 Received: from localhost.lkg.dec.com (localhost.lkg.dec.com [127.0.0.1]) by whydos.lkg.dec.com (8.6.12/8.6.12) with SMTP id RAA03867; Mon, 4 Nov 1996 17:07:03 GMT Message-Id: <199611041707.RAA03867@whydos.lkg.dec.com> X-Authentication-Warning: whydos.lkg.dec.com: Host localhost.lkg.dec.com didn't use HELO protocol X-Mailer: exmh version 1.6.5 12/11/95 To: Karl Denninger Cc: hackers@freebsd.org Subject: Re: Blargh - BSDI disk labels In-Reply-To: Your message of "Fri, 01 Nov 1996 18:00:51 CST." <199611020000.SAA14917@Jupiter.Mcs.Net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 04 Nov 1996 17:07:02 +0000 From: Matt Thomas Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > Blargh folks. > > FreeBSD doesn't understand BSDI disk labels. Like at all. > > There's no fix for this, is there? Here's a patch I made for 2.1.0 so I could mount my BSD/OS labels. It's ugly but it works... --- /sys/kern/subr_diskslice.c Tue May 30 08:05:51 1995 +++ ./subr_diskslice.c Mon Nov 4 17:03:58 1996 @@ -748,17 +748,27 @@ } if (pp->p_offset != start) { if (sname != NULL) { - printf( -"%s: rejecting BSD label: raw partition offset != slice offset\n", - sname); + if (sp->ds_type == 159 /* BSD/OS */ && pp->p_offset == 0) { + printf( +"%s: BSD/OS BSD label: restricting to diskslice\n", sname); + pp->p_offset += start; + pp->p_size -= start; + if (pp->p_size > sp->ds_size) + pp->p_size = sp->ds_size; + } else { + printf( +"%s: rejecting BSD label: raw partition offset (%d) != slice offset (%d)\n", + sname, pp->p_offset, start); + } slice_info(sname, sp); partition_info(sname, RAW_PART, pp); } - return ("fixlabel: raw partition offset != slice offset"); + if (pp->p_offset != start) + return ("fixlabel: raw partition offset != slice offset"); } if (pp->p_size != sp->ds_size) { if (sname != NULL) { - printf("%s: raw partition size != slice size\n", sname); + printf("%s: raw partition size (%d) != slice size (%d)\n", sname, pp->p_size, sp->ds_size); slice_info(sname, sp); partition_info(sname, RAW_PART, pp); } @@ -783,8 +793,8 @@ || pp->p_offset + pp->p_size < pp->p_offset) { if (sname != NULL) { printf( -"%s: rejecting partition in BSD label: it isn't entirely within the slice\n", - sname); +"%s: rejecting partition %c in BSD label: it isn't entirely within the slice\n", + sname, 'a' + part); if (!warned) { slice_info(sname, sp); warned = TRUE; -- Matt Thomas Internet: matt@3am-software.com 3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt.html Westford, MA Disclaimer: I disavow all knowledge of this message