Subject: Re: booting 3400 help (Re: booting CD ?)
To: Henry B. Hotz <hotz@jpl.nasa.gov>
From: Bob Nestor <rnestor@augustmail.com>
List: port-macppc
Date: 07/20/2000 17:44:25
Henry B. Hotz wrote:

>At 12:19 AM +1000 7/21/00, charlie allom wrote:
>>last try is to have a go with an HFS and an MSDOS partitioned CDROM. 
>>how this will help i dont know but i have to explore all 
>>possibilites.
>
>Certainly worth a try.  FWIW Bob Nestor reports that a number of CD 
>images have slightly messed up Apple Partition Maps which probably 
>accounts for a lot of people's failure to boot from CD.

As Henry said, I've been looking at a lot of Partition Maps on various 
disks and CDs, mainly on the mac68k port as part of my effort to get 
sysinst running there.  In the process I've generated a modified version 
of the MkLinux pdisk utility that formats and dumps the Partition Map. I 
built a version for both mac68k and macppc systems, and I've run it on 
both types of systems.  I also did a similar utility that runs under 
NetBSD and generates the same format dump of the Partition Map.  I've run 
them on both NetBSD/mac68k and NetBSD/macppc.  It could be made to run on 
other ports, but will require some minor code changes to do so (location 
of disklabel.h and byte order details).  If anyone is interested in 
getting copies (source and/or binary) of these they can find them at:

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

Here is the simple README file:

The MacOS utility is called "pdisk" and is based on the MkLinux 0.7a3 
code which has some sort of bug in accessing the Master IDE disk.  
Sometimes it finds it and sometimes it doesn't.  The 0.7a4 code fixes 
this but I can't find the sources for it.  If you know where they are I'd 
be happy to make the changes to it. There is a 68k executable and a PPC 
one that I pre-built in the archive (pdisk.sea.hqx) in case you don't 
have CodeWarrior. The
option I added is the "V" (upper case).

The NetBSD utility is called "pdump".  You can build it and run it on 
either a NetBSD/mac68k or NetBSD/macppc system.  It won't build on other 
NetBSD systems because of the location of disklabel.h and probably won't 
run correctly on little-endian systems. Just invoke it with the name of 
the raw disk you want to dump or the name of an ISO Image file, i.e. 
"./pdump /dev/sd0c" or "./pdump macppc.iso". You must run it with root 
privs if you want to use it on a raw disk.  Sorry it's not very well 
documented but I hadn't intended on releasing it this soon. ;-)

The Partition Map dump in both cases is not 100% complete yet.  It 
doesn't incorporate some of the new items that Apple introduced with the 
newer Macs such as more flags and the meaning of the Driver types.  I'll 
be adding that in the next few days, but the raw data is still dumped 
it's just not identified as to what it means yet.  If you have questions 
about it I think I can answer them now that I've read all the new 
documentation.

One last word of warning:  Most disk formatters, CDs, utilities and such 
that muck with the Partition Map are pretty free about how they interpret 
the Apple Specs. This includes Apple.  If you don't believe me try 
dumping the Disk Partition on an Apple manufactured CD!  Just because 
these programs report errors in the format doesn't mean the disk or CD 
isn't usable under MacOS.  In writing these programs I wanted to be as 
accurate as possible to insure that NetBSD wouldn't have any problems 
with the disks/CDs. In particular the order disk partitions are seen is 
important to NetBSD/mac68k because of the way it searches for root and 
usr partitions.  Because of that I always try to present the Map in 
disk-order, or the way the partitions are stored on the disk physically.  
The sysinst/mac68k code goes _way_ out of it's way to insure this order 
is maintained to make damn sure NetBSD/mac68k finds the partitions in the 
right order.

-bob
7/18/2000