Subject: Re: Whoa doggies! was: sysinst changes to handle Apple Disk Partition Map
To: Makoto Fujiwara <makoto@ki.nu>
From: Bob Nestor <rnestor@murphy.dyndns.org>
List: port-macppc
Date: 11/05/2002 18:16:33
On Tuesday, November 5, 2002, at 07:03 AM, Makoto Fujiwara wrote:

> Thanks Bob, for the reply.
>
> Bob> It almost looks like you were using the
> Bob> non-patched version of sysinst.
> Yes, sorry, you are right.
>
> After I applied your patch, I have just done
> ./build.sh with -u flag. It won't update the md.c/md.h related changes.
> I needed make clear on distrib/macppc/floppies/ before make.
>
> Now I have netbsd.GENERIC_MD.gz with sysinst patch.
>
> status:
> (1) Won't handle non APM disk
>    It seems to need disk should be formatted with APM labels.
> It doesn't care the internals, but label should be there.
> If I use pure NetBSD label stuff, say no APM staff there,
> I have no way to get the partition done at following (ii) screen.
> Am I wrong ?

If it detects a disk that doesn't have an APM it should tell you and 
give you the option of installing one.  This works on the mac68k port.

The last time I looked I though the original version of sysinst put a 
minimal APM on the disk to satisfy the Apple ROM.  If this is still the 
case then I may not be parsing it correctly or the minimal APM may not 
have the information the new sysinst is using to verify it is an APM.  
Could you either dump the APM with the version of pdisk that I modified 
- you'll find it on the NetBSD FTP site in the mac68k and macppc arch 
directories.  If you have to do this under NetBSD you can use my pdump 
program.  You'll find it at:

	ftp://murphy.dyndns.org/pub/map/pdump.c

If you can e-mail the output of either one I'll try to figure out 
what's wrong with the new sysinst code.

> (i)
>  We are now going to install NetBSD on the disk wd0.  You may choose to
>  install NetBSD on the entire disk or part of the disk.  Which would 
> you like
>  to do?
>   +-------------------------------+
>   |  Select your choice           |
>   |                               |
>   | >a: Use only part of the disk |
>   |  b: Use the entire disk       |
>   +-------------------------------+

As I recall it shouldn't have given this menu unless it found a valid 
APM.  Without a valid APM it would tell you the disk was unformatted 
and ask if you'd like to install a minimal APM.

> (ii)
>  Edit Disk Partition Map: The Map on the disk has been scanned for all
>  user-level partitions, but only those usable by NetBSD are displayed. 
>  The
>  partition table currently looks like:
>
>  Part      start       size fstype use       mount point (name)
>  ---- ---------- ---------- ------ --------- ------------------
>

This could happen (no partitions displayed) if none of the partitions 
were HFS/HFS+, UNIX_SVR2, SCRATCH or FREE.  A dump of your APM would 
help me out.


> (2) Segfault md.c (?)  -> strlen
>     When I have some empty mount point partition, it get
>     Segmentation fault at some call to 'strlen' function.
>     This may be OK, just be carefull.

No, that's not OK.  I need to find that and fix it.  It may be related 
to the data you have in your APM, but regardless it shouldn't do this.

> (3) Segfaults at pax comp.tgz
>     I also have Segmentation fault at pax  comp.tgz stage.
>     This is fatal to me in some sense.

Yes, I've seen this happen on multiple ports.  This is in the MI 
portion of the code and I think it has been discussed on some of the 
mailing lists.  I think there are some issues with "pax" that we didn't 
have with "tar" but I'm sure these will get straightened out.  The good 
news is I don't think this is related to the new sysinst code, the bad 
news is it is still a problem that needs to get fixed.

-bob