Subject: Re: your mail
To: None <kent@erlang.ericsson.se>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 09/16/1997 17:44:44
Kent Boortz wrote:

> [Already posted in another thread but that thread got a bit of topic]
> 
> The installation of the "base" set is terminated with
> 
>   drwxr-xr-x     0/0             0 Sun Aug 31 18:26 1997 ./usr/share/man/cat8
>   Error on SCSIRead(), # 5
>   Error on SCSIWrite(), # 5
>   Error on SCSIRead(), # 5
>   Error on SCSIRead(), # 5
>   Error on SCSIWrite(), # 5
>   Error on SCSIRead(), # 5
>   pos = 0, i = 22, fs = /
>   alloccgblk: can't find blk in cyl
> 
> I have tried to install on a IBM 2 GB disk and get this error
> message. Unfortunately I get the same error message trying to create
> the devices so I can't even boot in single user mode.

Hmmm...that's really quite annoying.  Do any Mac-side utilities report
errors with your drive?  I mean, can you run a low-level test in a
formatting program to check for drive problems?  I doubt this is the real
problem (since you're getting phase errors), but you never know...

> I read about the tip increasing the memory to the installer or to
> install the rest that didn't install by copying the file in
> minishell. I tried both with no success. I think we might talk about
> different problems with the same symptoms.

Well, actually, it appears that your problem has slightly different
symptoms.  I think that the usual symptom is for the Installer to simply
crash.  I don't think I've seen your particular error messages before :-(

> If I boot NetBSD on a Zip and do "disklabel sd0" (the IBM disk) the
> output make no sense. First my hardware setup:

This is because the disklabel command doesn't really work on the mac68k
port of NetBSD because we don't use disklabels.  Instead, we have the
kernel fake a disklabel when it boots.  However, you can still run 'newfs'
on your disk provided that the "fake" disklabel isn't too screwy once
you've already partitioned the drive on the MacOS side.

> Hardware:       MacIIsi, 17Meg Ram, IBM UltraStar 2GB
>                 
> Software:       NetBSD current-970829
>                 Mkfs 1.45
> 		Installer 1.1e
> 		APS PowerTools 4.1

I don't know about the drive, but all the rest look fine to me.

> Formatted and partitioned disk with APS PowerTools 4.1.
> 
> Installing to a combined Root & Usr of 1570 MB that was placed after
> one MacOS partition and the Swap partition.

Here's about the only recommendation I can make at the moment, and that is
to really split up you drive some.  You don't need all of it in one
partition, and for a number of reasons it would be nicer to have it split
out some.  I'd recommend something like:

50 MB for root (this is more than enough for /etc, /bin, and /sbin)
100 MB for /var (this is for big log files and crash dumps)
100 MB for /tmp (unless you use MFS to mount it in swap)
200 MB for /home (add more if you do development in your home directory)
200 MB for /usr (this'll more than suffice for just the NetBSD stuff)
and the remaining to some random partition where you put everything else
(or maybe you're /usr/ partition should be bigger).

Since you can mount your partitions virtually anywhere in the filesystem,
feel free to divide it up however you want.  Just keep in mind that you
only have (a,d?,e,f,g,h) 5-6 partitions to play with under the current
partition lettering scheme, so this may limit your choices somewhat :-(

> It was initialized with the values suggested by "Mkfs_1.45":
> 
>          Sector Size:     512
>           Block Size:    8192
>         Bytes/Sector:     512
>        Sectors/Track:     171
>      Tracks/Cylinder:       3
>        Num Cylinders:    8188
>          Bytes/Inode:    4096
>      Cylinders/Group:      16
>  Spare Sectors/Track:       0
>     File System Size: 3140417
>  Optimize Space/Time:   Space

I assume this is fine, it kinda depends on your disk, I suppose...

> The installer reports the disk like
> 
>   sd0a: Root 'NetBSD Root & Usr' at  268524 size 3140417
>   sd0b: Swap 'NetBSD Swap'       at    6380 size  262144
>   sd0d: HFS 'MacOS'              at 3408941 size  817784
>   sd0e: Other (APPLE_DRIVER...   at      59 size       5
>   sd0f: Other (APPLE_DRIVER...   at     192 size      12
>   sd0h: APPLE_FREE 'Extra'       at     204 size      32
>   sd0i: APPLE_FREE 'Extra'       at 1227580 size 2999145
> 
> The last entry looks strange, it will be a partition inside the
> "NetBSD Root & Usr" partition ending at the same block.

Yeah, that looks _really_ strange to me, too.  I didn't think that the
Installer could handle anything after letter 'h', besides, where is 'g' at
the moment?

> But I thought that I could boot up NetBSD from my Zip and do "newfs"
> from there instead. NOT. If I ran "disklabel sd0" I got
> 
>     Bytes/sector: 512
>    Sectors/track: 172
>   Tracks/cyliner: 3
> Sectors/cylinder: 516
>        Cylinders: 8188
>     Tot. sectors: 4226725
> 
> This is strange because when formatting we where suggested and
> formatted with 171 sectors/track, now "disklabel" reports 172.

Even tho this is different from the Mkfs output, did you try to go ahead
and run 'newfs' anyway?  I'm not too sure what kind of effect it would
have, though....

> The rest of the output from "disklabel sd0":
> 
>         size     offset  fstype
> 
>   a:  817784    3408941  HFS      6606-8191
>   b:  262144       6380  swap       12-520
>   c: 4226725          0  unused      0-8191
>   d:       5         59  unknown     0-0
>   e:     128         64  unknown     0-0
>   f:      12        192  unknown     0-0
>   g:      32        204  unknown     0-0
> 
> The letters are moved but in most part it does match the above
> one. But "e" is not in the installer listing and the "NetBSD Root &
> Usr" partition is gone!

Hmmmm...this seems quite reminiscent of the earlier Installer problems
where it was having trouble with partitions past a certain point on the
disk.  Of course, in this case, the NetBSD partition is below the HFS
partition, so I don't know where this is coming from...

> By the way, "disklabel -r" does not work, is this by design or a bug?

Like I said above, this is by design, although some people might feel it
is a bug.  Feel free to work on native disklabel support :-)  I'm sure a
lot of people would thank you, including me!

> Do you know what I can try next to get closer to a working
> NetBSD installation?

If 'newfs' doesn't work at all on the NetBSD side, I'm not too sure where
to go from here...there obviously seems to be a bug or two in the "fake"
disklabel code somewhere.  Perhaps someone familiar with that code could
take a look at it sometime soon?

At the moment, I'd try splitting the partitions further and see what
effect that has on the drive setup.  Perhaps you can get 1 or more NetBSD
partitions to show up and install onto them.

I hope this helps some.

Later.

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.