Subject: Re: Can't boot any of my Macs
To: Henry B. Hotz <hotz@jpl.nasa.gov>
From: David Burgess <burgess@neonramp.com>
List: port-macppc
Date: 08/02/2001 10:21:51
"Henry B. Hotz" wrote:
> 
> At 12:46 PM -0500 8/1/01, David Burgess wrote:
> >"Henry B. Hotz" wrote:
> > >
> > > At 4:33 PM -0500 7/28/01, Dave Burgess 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'.
 
> >Success!  On to the Good News:
> >
> >Here are the steps I had to take:
> >
> >1)  Get permission from Apple to put up a 'dd' version of the Disk
> >Tools diskette.  Almost all of the problem I had early on were the lack
> >of a PC/Unix tool friendly boot disk.  Without this step, all the
> >rest of the stuff in the FAQ is (almost) useless.
> 
> You know a couple of weeks ago I posted that I had had success
> booting from an MS-DOS floppy (created on a Mac I admit) where you
> just copy ofwboot.xcf and netbsd.ram.gz onto the floppy (the latter
> renamed as netbsd.gz to fit the DOS 8.3 name limit).  Then you can
> boot with "boot fd:1,ofwboot.xcf netbsd.gz".  Note that this won't
> work with a 0 partition number because there is no useful Mac boot
> block.

I am definitely going to try that.

> 
> Since we're mostly Mac users to begin with the overhead of dealing
> with Mac file types on non-mac systems hasn't been such a big deal
> for us.  OTOH the above is not only a bit simpler than using SunTar
> or DiskCopy, but also very friendly to non-Mac users.  Could you give
> it a try so Mike W. gets another data point?
> 

Sure.  I have "Mac2" on the workbench.  I pulled the 'known 
working floppy' from "Mac1" so that I can try this again.  With
my new-found understanding of the problems, it should be OK.

> >3)  Update the firmware and set up Open Firmware to stop.  Without
> >access to MacOS, this would be step 1, but the method changes to
> >"hook up a PC to the serial port and type the following:"
> 
> So what MacOS tool did you use to get into OF, and how did you get
> that tool onto a MacOS floppy?  There is a bit of a catch-22 there.
> 

I managed to get the downloadable Disk Tools Version 8 floppy onto 
a floppy disk (a friend of a friend) and booted that.  I'm going to 
look at the disk image from the downloadable version and see if I
can't figure out the 'dd' instructions (using 'skip=', etc.) from
that.  This avoids the 'gray' copyright area of putting Apple's 
disk up on an unrelated server in a slightly different format.

I'm still trying to decide if this step is even needed for a pure
NetBSD install.  From what I've heard, there are some times when I
will need MacOS, but these should be relatively rare.  With the 
system setup as a pure NetBSD machine, I think I'm in pretty good 
shape.

On the next machine, I'm going to try that 'nvedit' thing from OF.
If that turns out to be a reasonable step and abroagates the need
for a MacOS disk completely, I am going to snip and steal a bunch
of stuff from other people and try and describe it in detail.

> >5)  Get one of the old install disks (I grabbed from from 2000).
> >
> >6)  Put that on a floppy and boot from that.
> >
> >7)  Don't bother trying to install.
> >
> >8)  Put in the 1.5.1 install floppy.
> >
> >9)  Power cycle the machine.  The machine will now boot from the
> >floppy that I couldn't get working during the previous week.  I
> >happened to have a 'bootable' CD (from which I couldn't boot)
> >with all of the 1.5.1 distribution stuff on it, so I used that
> >for the installation.
> 
> ???????  So all you did was boot from the old floppy and then the new
> floppy worked?
> 

Yup.  I meant to say that.  I'm going to check the order on the next
machine, just to make sure, but that is exactly what it looked like
happened.  I used a 1.4 install disk, tried to install, and then
restarted the machine with 'power-alt-meta' and the 1.5.1 install
disk just started to work.

Once that started, then the bootable 'CD' started to work as well.

Hey - I don't understand it either.  I'm also not *EVEN* going to
look a gift horse in the mouth.  I've gotten terrific support from
this group so far, and I'm hoping to return the favor.

> >10)  Install NetBSD.
> >
> >11)  Hook up the network and off we go.
> 
> Well, good in the end anyway.
> 

Yup.. In fact, very good.

Everything I'd expect to work is just working.

> >The bridge is a real filesystem image of an acceptable boot image
> >that can be processed using PC or Unix tools.
> >
> >I talked to Apple on the phone, and while they don't support putting
> >a boot image for 7.5 up on the Internet somewhere, they aren't
> >opposed to people passing these around amongst ourselves.  They used
> >to have an image available on their web site, but have since pulled
> >it down.  Even then, it assumed a MacOS system to build the floppy.
> 
> See my note on a MS-DOS boot floppy above.
> 
> >
> >I was having a real conceptual problem with this.  As it turns out,
> >it's not required.  NetBSD is loaded and I can almost boot from the
> >hard drive.
> 
> I'm not quite sure what your conceptual problem is.  Could you be
> more specific?  Is it the idea of having two different kinds of
> partition map on two different drives?
> 

No, I do that all the time.  The problem I was having was trying
to set up that 'second' drive 'first'.  I kept getting lost in the
context of things.  The 'nvedit' thing is a good example; I thought
'nvedit' was a MacOS thing, not an O/F thing.  Also, I've ended up 
with no MacOS partitions or disks in the machine at all (AFAIK).  It 
pops up into OpenFirmware, I type a simple 'boot', and away we go.  
I've got it up, running 'X', and wired into my existing network.  
It's even sharing the /usr/share partition from the master PC NFS 
server.  The ultimate test was that I sent out some E-Mail last 
night from the machine, through my NAT, to a friend at another ISP.

> 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! :-)

> >The problem I'm having now is that the 1.5.1 kernel is locking up
> >during load.  I can't say precisely why or where (I'm not at that
> >computer) but it does it on every kernel image I've tried for 1.5.1.
> >It would help if I knew what the boot-up memory map meant.
> >
> >If stops at something like
> >
> >0000000+[000000+0000000
> >
> >Where the last number is 10000, I think.  I've got more resources I
> >can apply to that problem, though, so I'll just keep at that one.
> 
> At the risk of sounding unhelpful, how sure are you that this is good
> hardware?  This problem sounds strange to me.
> 

I assumed it was a problem with something in the GENERIC kernel that
wasn't in the INSTALL kernel.  I've actually been working out of the
INSTALL kernel (which worked fine).  Over the years, I've actually 
seen this many times (on the PC and Alpha ports, specifically).  What 
I did was boot into the INSTALL disk, chroot onto the hard drive (from 
the mfs), and made my /mnt directory the new 'root'.  From there, I 
was able to build a new kernel (took about 20 minutes) from the 
'POWERMAC' config file.  I've been adding things in one at a time 
(for example, the rnd(4) device for ssh was first, IPv6 will be next) 
and rebooting with the new kernel.  Once I figure out where the 
disconnect is, I'll send-pr it.

> > > 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).

> 
> 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.

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.
 
> 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.

> >That's not exactly the problem.  I"m not unhappy about the Mac
> >hardware.  I'm unhappy about the way the process to get the OS
> >loaded required the OS to be loaded.  Hopefully, I can fix some
> >of that later.
> 

The Mac hardware is rock solid.  I'm really liking what I'm seeing
and how it's working.  The adoption of SCSI at the lowest levels is
a step of real genius.  The performance of this 120MHz machine is
excellent, it is at least as fast and usable as the 400MHz PII that
I'm running on another machine.  The only machine I've got that works
better is a 900MHz PIII.

Not to say there aren't some warts, but in general I'm very impressed
with the system so far.  Coupling this hardware with NetBSD (which I
have found to be en extremely solid system) is going to be a big win 
for me.

> Well I think you can do it with a terminal running 38.4KBaud, and an
> MS-DOS floppy (with network access) or the NetBSD CD-ROM on OF 1.0.5
> machines.  In the end isn't that how you actually did it?  I'm not
> sure I understood your comments above.
> 

Yup, that's exactly how I did it.

> On OF 3 machines it's simpler since you don't need the terminal and
> you can use a MacOS disk instead of the CD if you're careful about
> how you partition it before you put MacOS on it.  Not having access
> to one I know nothing about OF 2.x machines.  On non-OF powermac's
> you're SOL unless you want to switch to MkLinux.

This is an interesting point.  Time to go a 'spying', I think.

Dave