Subject: Re: Is this a new disk problem?
To: Henry B. Hotz" , "Colin Wood <cwood@ichips.intel.com>
From: Bob Nestor <rnestor@metronet.com>
List: port-mac68k
Date: 07/09/1998 19:42:25
Henry B. Hotz <hotz@jpl.nasa.gov> wrote:

>At 3:25 PM -0700 7/9/98, Colin Wood wrote:
>>Henry B. Hotz wrote:
>>> At 12:52 PM -0700 7/9/98, Dr. Bill Studenmund wrote:
>>> >What does disklabel say for sd3?
>>>
>>> 6 partitions:
>>> #        size   offset    fstype   [fsize bsize   cpg]
>>>   a:  1226685      795     unknown                        # (Cyl.    1 -
>>>1543)
>>>   b:    81885  1227480     unknown                        # (Cyl. 1544 -
>>>1646)
>>>   c:  1309735        0      unused        0     0         # (Cyl.    0 -
>>>1647*)
>>>   d:      370  1309365     unknown                        # (Cyl. 1647 -
>>>1647*)
>>>   e:      328       96     unknown                        # (Cyl.    0*- 
0*)
>>>   f:      371      424     unknown                        # (Cyl.    0*- 
0*)
>>> disklabel: boot block size 0
>>> disklabel: super block size 0
>>
>>You did say that this contains NetBSD partitions, right?  I'd say
>>something was definitely wrong with the formatting here....did you zap
>>these with Mkfs?
>
>I don't remember, but I suspect I used newfs under NetBSD.  Would that
>account for it?  I thought the disklabel code only looks at the apple
>partition map, not at the actual partition contents.
>
>Anyway, yes, they are *BSD partitions, not hfs partitions.

This isn't normal for "newfs" partitions either, at least not the one 
that has been in use in  the 1.3 to 1.3.2 timeframe.  Here's a disklabel 
of my disk that was created with "newfs":

#        size   offset    fstype   [fsize bsize   cpg]
  a:   128000     1088      4.2BSD        0     0     0   # (Cyl.    0*- 
32*)
  b:   128000   129088        swap                        # (Cyl.   32*- 
65*)
  c: 17755792        0      unused        0     0         # (Cyl.    0 - 
4504*)
  d:  7323071  8580159      4.2BSD        0     0     0   # (Cyl. 2176*- 
4034*)
  e:  1300000 15903230         HFS                        # (Cyl. 4034*- 
4364*)
  f:   552562 17203230         HFS                        # (Cyl. 4364*- 
4504*)
  g:  8323071   257088      4.2BSD        0     0     0   # (Cyl.   65*- 
2176*)
disklabel: boot block size 0
disklabel: super block size 0


My other disk was created with "Mkfs" and it looks similar, so it appears 
that something else must have been used to create your partitions.  Is it 
possilbe you used a 3rd party disk formatter to create and format AU/X V2 
partitions?  I'm not sure if the NetBSD Kernel really cares about the 
partition flags, but I know that the Installer does.  I recall releasing 
a version of Mkfs that didn't set these flags and was quickly reminded of 
my oversight by many frustrated users of the Installer.

As for Colin's suggestion that you use Mkfs to zap the partition into 
NetBSD format, I'd make sure I have a good backup first.  Those flags are 
in the first block of the disk partition and I don't think there's 
anything else in there that NetBSD cares about, but if you don't have a 
good backup you can be darn sure there is.  If you'd like to write a 
little utility that just sets the appropiate bits you'll find them 
defined in the Think C header files and in the Mkfs sources.  The last 
time I checked they were not defined in the header files delivered with 
Metrowerks Codewarrior.

Hope this helps,
-bob