Subject: Re: Zip disk partitioning
To: Johnny C Lam <jlbg+@andrew.cmu.edu>
From: Kelly Campbell <camk@homer.spub.ksu.edu>
List: port-mac68k
Date: 03/10/1996 21:20:18
> 
> Bernard,
> 
>     The experimentation I've been doing has suggested a potentially
> correct Zip geometry to use, however, there doesn't seem to be a way of
> forcing NetBSD to use the geometry I want it to use.  NetBSD always
> persists in using the fictitious geometry.
> 

This is due to the kernel not allowing native disklabels so you don't overwrite the mac's partition blocks. If you do that, then the mac won't be able to
boot. Eventually, I imagine NetBSD will be able to boot without having to go
through the mac bootup first, but that is much much harder (especially with
those Apple ROMs in the machines)

You can patch the kernel sources (I've included the patch file below), but
make sure you never do disklabel -w on your boot disk, or you're going to 
be hosed.

Here's the patch, it is for /sys/arch/mac68k/mac68k/disksubr.c
----------------------cut here-------------------
*** disksubr.c	Thu Feb 15 06:35:57 1996
--- disksubr_new.c	Sun Mar 10 15:30:25 1996
***************
*** 511,517 ****
  	u_long openmask;
  	struct cpu_disklabel *osdep;
  {
! #if 0
  	register i;
  	register struct partition *opp, *npp;
  
--- 511,517 ----
  	u_long openmask;
  	struct cpu_disklabel *osdep;
  {
! /* #if 0 */
  	register i;
  	register struct partition *opp, *npp;
  
***************
*** 541,547 ****
  	nlp->d_checksum = 0;
  	nlp->d_checksum = dkcksum(nlp);
  	*olp = *nlp;
! #endif
  	return (0);
  }
  
--- 541,547 ----
  	nlp->d_checksum = 0;
  	nlp->d_checksum = dkcksum(nlp);
  	*olp = *nlp;
! /* #endif */
  	return (0);
  }
  
***************
*** 557,563 ****
  	register struct disklabel *lp;
  	struct cpu_disklabel *osdep;
  {
! #if 0
  	struct buf *bp;
  	struct disklabel *dlp;
  	int labelpart;
--- 557,563 ----
  	register struct disklabel *lp;
  	struct cpu_disklabel *osdep;
  {
! /* #if 0 */
  	struct buf *bp;
  	struct disklabel *dlp;
  	int labelpart;
***************
*** 594,602 ****
  done:
  	brelse(bp);
  	return (error);
! #else
  	return 0;
! #endif
  }
  
  /*
--- 594,602 ----
  done:
  	brelse(bp);
  	return (error);
! /* #else
  	return 0;
! #endif */
  }
  
  /*


Kelly
--
,---------------------------------------------------------.
| Kelly A. Campbell         |    Kansas State University  |
| camk@ksu.ksu.edu          |    Student Publications     |
| camel@cis.ksu.edu         |    Network Administrator    |
| http://www.ksu.edu/~camk/ |    http://www.spub.ksu.edu/ |
`---------------------------------------------------------'