[Coco] partial OS9 boot from hard drive (back on topic)

Gene Heskett gene.heskett at verizon.net
Thu Sep 15 02:43:41 EDT 2005

On Sunday 28 August 2005 13:03, Vern Burke wrote:
>Well, heaven knows I don't want to put anyone out by asking for help
>getting this to work, nor was I expecting free paid type support. I'm
>simply asking for someone who has done this before or knows more detail
>about the OS-9 boot process to either give me a brief rundown on the
>steps in the boot process so I can understand where this is going wrong
>or suggestions as to what it could be trying to load that I'm not aware
>of that would cause the machine to crash.
>Anyone who doesn't want to answer, feel free to ignore me, everyone else
>  who has replied with suggestions, I'm grateful.

I'm a) a bit late here, been out of pocket for a month, and b) going
to snip the rest.

Getting all this in one sock can be a problem so lets hit the

1. The 'dos' command has to know where to load the first stage from,
usually track 34 of floppy 0.

2.  Once track 34 has been loaded and its first 2 bytes checked for
validity, then the loaded data is executed.  I think rel is the first
step in that it loads by copying from basic space, the whole track 34
into higher ram.

3.  Once this has been done, rel hands it off to the module in
track 34 called boot.  Boot is just smart enough to load the os9boot
file.  It gets this information about where its actually located on
the disk by reading Logical Sector 0 and obtaining the Logical Sector
Number it starts at, and its length, from known locations in LSN0.

4. Boot must be modified if the hardware is not a std floppy
controller by having the correct register addresses hardcoded into it
for a hard drive controller to be accessed.  So this part is required
for any non-floppy operations since there is not a driver for the
hardware loaded at this point.

5.  Once boot has loaded the os9boot file in its entirety, IIRC the
next is the os9p1 module is executed.  Its initialization job is to
read from the init module to find out how much memory is
available, set up the memory allocation map, then locate and register
the rest of the modules in the os9boot file.

6.  Once all this is done, then the init module is consulted again to
see where the work and cmds directories are, and to locate the next
file to run, which depending on the version of os9/nitros9 is either
cc3go or Sysgo.  This finalises the assignment of the root and cmds
directories and finishes up by calling a shell to execute the startup
file, which in most cases is in the /dd (root) directory.

In later versions, the shell can be made immortal, and the cc3go or
sysgo module, once its run, can be removed from memory as its never
needed again till the next reboot.

If booting nitros9, it spits out a series of characters on the screen
that tell you where in the boot process it is, and is quite a handy
troubleshooting tool.  Regular os9 has no such tool.

As you can see, there are in fact several places where this can all
go south.  As you say it accessses the hard drive extensively before
it crashes, I think I'd dEd the os9boot file, find the init module
and see where its expecting to find either Cc3go or Sysgo, then move
the file to that location.  You could fix the init file I suppose if
you have a copy of my vfy utility to restore the header checksum and
crc's with.  There are also patches for the init module in case your
memory isn't 512k or 128k.

Once thats looking like it should work, but isn't, the next step is
to dEd the cc3go (Sysgo in later stuffs) file, checking its hardcoded
paths, one of them may still be pointing to a floppy or whatever. 
Adjust as required of course & fix the crc's.

I hope this is helpfull, but please don't shoot the messenger, he's
getting old and decrepit like the coco's.  :)

Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.35% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.

More information about the Coco mailing list