Subject: Getting Off Topic, was: Can't boot any of my Macs
To: David Burgess <burgess@neonramp.com>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-macppc
Date: 08/03/2001 16:29:04
At 10:21 AM -0500 8/2/01, David Burgess wrote:
>"Henry B. Hotz" wrote:
> > I take if from the lack of mention that you solved your monitor
> > problem as well.
>
>The monitor was only a problem in MacOS.  Everywhere else, it works
>great.  It even works great in 'X'.

OK, sounds like a problem with the Mac/VGA plug you used then. 
Didn't have the right sense lines set to tell MacOS what resolutions 
were supportable.

> > NetBSD can boot from and disklabel disks with native (SunOS like)
> > partitioning.  MacOS can boot from and partition disks with an Apple
> > Partition Map.  NetBSD can use Apple Partition Maps, but can't edit
> > them nor can it boot from such disks, yet.
> >
>
>I'll come back to that after there's more room in my brain.  Right now,
>it's full! :-)

What I said above applies to OF 1.0.5, and therefore to the 7600. 
Just to add to the overflow:  on OF 3 machines OF can understand 
native Mac filesystems and boot/read files from them.  Since netbsd 
understands the Apple Partition Map (it reads it and creates an 
in-core disklabel on the fly) you can fairly easily have a machine 
with one disk that can boot both MacOS and NetBSD.

In fact the last I knew what was happening, the stuff we write on 
disks to make them bootable with NetBSD disklabels under OF 1.0.5 
would not support booting on OF 3 machines.  I don't know if the 
research Todd Vierling (sp?) did to make the iso images bootable on 
all OF versions resulted in a fix to this problem though.  Bill 
Studenmund would probably know.

> > > > Here you have to have this tiny boot partition that also has to be
> > > > root?  All because of some 20-year-old software interface that you
> > > > can't change because there isn't anyone that owns the standard?
> > > >
> > >
> > >Yeah, that is a problem.  It, unfortunately, is a model that's both
> > >historical and well understood.  This model goes back to the roots
> > >of MS-DOS and it's natural similarity to CP/M.  The current OSes
> > >(Windows 2000, for example) still uses the 'load the first sector
> > >off the boot drive' model that was established by CP/M and other
> > >systems before that.
> >
> > It's not the "load first sector and jump to it" that I have a problem
> > with.  68k Mac's and OF Macs using "partition zero" booting both do
> > the same thing.  It's the restrictions on what boot prom support are
> > available to that program that I have a problem with.  Looking at the
> > i386 install instructions leads me to believe that there may be an
> > alternate disk addressing mode (called LBA) that might work and avoid
> > the restrictions I was talking about.
>
>All LBA does for you is remove a limitation of some older BIOSes that
>wouldn't talk to more than 1024 cylinders.  Basically, Logical Block
>Addressing simply translates a "reasonable" drive configuration into
>something else.
>
>An extremely simplistic (and therefore technically inaccurate)
>explanation of LBA is that it allows one to talk to the drive the same
>way you would a SCSI drive.  You don't specify Cylinder Head Sector;
>you just tell the machine that you want logical block 'x' and the
>drive subsystem figures out where that is in CHS form.
>
>In the old *BSD FAQ (http://www.cynjut.net/) has a really good
>explanation on the oddities of the PC IDE drive subsystem called
>"The compleat idiot's guide to disk partitioning" (IIRC).

OK, I just looked at that and it's got some really good info in it. 
The trouble is that I think it's old and I think I believe the 
1.5.1/i386 install notes may be more relevant.  Of course maybe I 
just want to believe that the LBA mode the BIOS claims to support 
matches the LBA mode the netbsd boot code claims to support and I 
want to believe that LBA mode solves all problems.

> > Of course what I really want is root&usr on sd0a and I'm using an
> > Adaptec 2940UW from a Mac on the PC so there is no boot prom support
> > for the controller at all.  I probably have to put a custom kernel on
> > wd0a that is pre-configured with root where I want it, but that is
> > such an ugly solution.
>
>It's not really as ugly as all that.
>
>There are a couple of ways to do this on the PC.
>
>1)  You can rewrite the boot blocks to pick up the kernel off the
>SCSI drive.  That way, you don't need PROM support.  To test the
>theory, when the Boot Loader is counting down from 5, hit a key
>and boot from hd1:/netbsd.  If you can do that, you can simply point
>the boot loader at the SCSI hard drive and your lit.

hd1 boots from wd0a.  Tried that.  Of course this is 1.4.1 boot 
loader, not 1.5.1 boot loader.

>2)  You can set your root and swap partitions in the kernel on an IDE
>drive and boot into that.
>
>3)  You can install a boot-loader on a bootable disk and use that.
>Just set the default so that it boot NetBSD from the SCSI drive.
>
>The first is a little more technically challenging, the second requires
>you to install a boot loader program like "OSBS", the third is a
>setting in the kernel config file.

I don't know OSBS.  Have to look into it.  I know how to configure kernels.

I guess what I'd really like is a boot ROM that understands the 
Adaptec.  Theoretically this could be built and installed in the 
socket on my network card, but that takes a lot more knowledge than I 
posess.  More realistically I believe there are versions of the 
2940UW that had PC EEPROMs on them instead of Mac and maybe I can 
somehow re-flash the EEPROM.  The motherboard BIOS claims to allow 
booting from a SCSI disk (and has no on-board SCSI controller) so 
perhaps that would work.

Failing that I'd like a bootable CD-ROM with a kernel configured to 
mount the SCSI disk as root.  I'm likely to do this for my daughter's 
Mac as well, though the implementation has nothing in common except 
the pre-configured kernel.

> > It happens to be the same ugly solution that I think you are
> > currently stuck with on OF 1.0.5 machines if you want to have both
> > MacOS and NetBSD on the same (perhaps only) hard disk.  You make a
> > boot CD with a pre-configured kernel.
> >
> > Anyone got better solutions?
> >
>
>(ON THE PC)
>
>See above.  What you're describing isn't that unusual.  The SCSI
>controller on the Soundblaster card did exactly the same thing.
>Since there's no boot prom, the system can't find sector 0, so the
>system has to be coerced into booting and using the second drive.
>
>Another alternative is to put your root partition on a bootable disk
>and put your /var/ and /usr/ partitions onto the SCSI.  This way,
>your root partition basically becomes 'write once in a great while'
>(vice read-only) while the partitions that actually see some use are
>on your faster drives.

I personally hate this solution.  I know it can be made workable, but 
seems like I'm always needing one more top-level directory that won't 
fit on the root partition and I'm always mucking with symlinks that 
shouldn't exist.


Cross my heart, strike me dead, stick a lobster on my head.
John Crichton -- Farscape, 6/15/01
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu