Subject: Re: Trouble adding extra disk
To: Adam Nicol Delu <abam@delu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 01/10/1996 12:47:06
> 
> On Wed, 10 Jan 1996, Kelly Campbell wrote:
>> I've had the darndest time adding another external disk the last two days.
>> My basic problem was that I couldn't partition it like I wanted to. I tried
>> everything I knew to do with disklabel, the disktab file, etc. Nothing would 
>> work. I could write a label to the drive, but that label just would never
>> get loaded into the kernel's in-core copy like the man pages said it should.
> 
> I had similar problems.  Finally, I wrote my own disktab file, wrote a 
> disklabel and ran newfs on the drive.  I too tried to write to "c".  I 
> wound up with a "custom" geometry--i.e. one that didn't work perfectly.  
> I could only get 62MB out of the 80MB drive.  This was probably due to 
> "imperfections" in my disktab entry.
> 
> The best advice I got was to re-format the drive and repartition it using 
> APS, but calling it a USR partition.  I did that, ran makefs (MACOS util) 
> on it, and was able to mount it from with NetBSD with a simple:
> 
> mount /dev/sd1g /opt 
> 
> It behaves fine now.  I'm not sure that I like this solution because it 
> forces me to use the MacOS side of things, where appropriate UN*X utils 
> exist; however, it works and is painless.

Partitioning is the only thing that has to be done from MacOS. newfs
works fine, though AFAIK it makes more-modern fs's than the installer
can deal with.

The method we use keeps us compatable with A/UX, and also keeps MacOS
formatters from thinking the drive's empty & waiting to be formatted.

Allen mentioned adding "native" disklabels as a low-priority project.
If you want to do it, chat w/ him. Though I'd suggest something like
what the sun3 port does (or some other port) so that we could swap
drives batween various NetBSD computers. Another option would be to
just teach disklabel how to resize and modify MacOS partitions. :-)

> > One other thing I noticed while trying to figure this problem out is that
> > sdXc has to be the whole drive, and this is hard coded into NetBSD, so if
> > you try to set up custom partitions, make sure that you keep c as the whole
> > drive.

/dev/sdXc being the whole disk is an old BSDism. Our DecStation 3100
at work, vintage 1989, has partition c being the whole disk. But just
to confuse things, on the i386 port, partition d is the whole disk.
There, partition c is the UNIX partition, which is subdivided to yield
the other partitions. :-)

> This was another lesson to me. . . .it explains why I managed to wipe out 
> my entire 540MB drive while trying to add a 150MB "free slice 3" to an 
> existing ROOT & USR (100MB) and MacOS (250MB) drive.  Wrote the disktab, 
> ran newfs unsuccessfully on /dev/sd0c and got the blinking diskette when 
> I rebooted ;-)
> 
> Duh, time to start over--but I needed to go from NetBSD 1.0 to 1.1 anyhow.
> 
> This stuff should go in the FAQ, since it's a bit peculiar to some UN*X 
> users, I would think.  Particularly the bits about AUX filesystems. 

Probably true.

Take care,

Bill