[Coco] NitrOS9 partitions

Gene Heskett gheskett at wdtv.com
Mon Nov 24 00:35:14 EST 2014


On Sunday 23 November 2014 22:43:49 Bob Devries did opine
And Gene did reply:
> Adding to my previous question....
> 
> I noticed in a post by Gene Heskett, that the wpc and ofs descriptor
> settings are indeed set aside to be used for partitioning.
> 
> The question now becomes: Has anyone done this before?
> 
> Regards, Bob Devries
> Dalby, QLD, Australia
> 
> On 24/11/2014 11:46 AM, Bob Devries wrote:
> > Hi all,
> > 
> > Is there any way that NitrOS9 can use partions on the likes of
> > CocoSDC?
> > 
> > I know that OS9/68K does do this with a parameter in the device
> > descriptor. It used a (IIRC) three byte offset to the starting sector
> > of the partition, and uses uniquely named descriptors for the
> > partitions, such as /H0a, /H0b etc.
> > 
> > I see there are some settings that show up when I use dmode, which
> > are ofs=, wpc=,rwc. I don't appear to have information about these
> > settings. Can someone point me to docs? Help dmode doesn't explain
> > the settings.
> > 
> > Regards, Bob Devries
> > Dalby, QLD, Australia

I am doing it here.

A fur instance,the dmode for my 1st hard drive
dmode /dd     

 nam=DD mgr=RBF ddr=rbsuper
 hpn=07 hpa=FF74 drv=00 stp=00 typ=85 dns=00 cyl=1FB7 sid=06
 vfy=00 sct=0028 t0s=0028 ilv=00 sas=20 wpc=00 ofs=0000 rwc=

From this it can be deduced that 498,831,360 bytes worth of a 1Gn seagate 
Hawk is being used for nitros9, or in hex values as used by dmode 0x1DBB90
sectors.

Now, my /sh descriptor is setup to access my HDBDOS 256 virtual disks, so
dmode /sh

 nam=SH mgr=RBF ddr=rbsuper
 hpn=07 hpa=FF74 drv=07 stp=80 typ=81 dns=08 cyl=0023 sid=01
 vfy=01 sct=0012 t0s=0012 ilv=00 sas=08 wpc=1D ofs=BB90 rwc=

So you see that wpc + ofs=1D+BB90 also.  So my first HBDDOS disk starts at 
$1DBB90.  There is no overlap because that $1DBB90 on the nitros9 section 
actually at LSN0 because its base 0 numbering.  That means the last sector 
assigned to os9's share of the drive ends not at the end of sector 
$1DBB90, but at $1DBB8F.

Note the difference at stp, type, and dns. Typ and DNS set it up for a use 
the full sector for an HDBDOS disk, then stp, since it does not apply to 
hard drives ever, is hijacked for a different function, it has become the 
pointer to the actual HDBDOS disk image that corresponds to disk 128 in 
HDBDOS.  So just by changing the stp value, I can make it access any of 
the first bank of 256 virtual disks for HDBDOS.  These are fully 
functional from nitros9, I can format them, os9gen them from nitros9 boot 
just by setting stp to the disk I want to use this time.  But in my setup, 
vdisk $80 is the default disk it boots from when I hit a 1 at the boot 
timeout, or if I just let the 15 second timer run out.

But I took a sneaky because when booting anyplace on the hard drive, the 
contents of the boottrack never change.  And in fixing boot_tc3 to 
actually boot from the hard drive, I noted something else, and that is 
that the boot module does NOT read the LSN0 of that vdisk, but the LSN0 of 
the whole hard drive in order to find the OS9Boot file it is to load.

I took advantage of that and wrote bootlink, which can update that DD.Bt 
and DD.Bsz in the hard drives LSN0, making it possible to maintain several 
different bootfiles for different jobs with nothing more than, if I wanted 
to boot from vdisk $81, bootlink $81 (or 129 it will take either form of 
numbers) very thoroughly checks to make sure the disk you requested is 
truly bootable, and modify's the DD.Bt and DD.Bsz in the hard drives LSN0 
to point at the chosen disks OS9Boot file.

So the boot sequence then even for the default boot if you do nothing, the 
auto dos will load the boottrack from vdisk $80, but when that boot module 
looks to find the OS9Boot file, it queries the hard drives LSN0, and then 
proceed to load the OS9Boot file from disk image $81.  And it could get it 
from any supposedly bootable vdisk in that 0-255 sequence.  That 256 disks 
will not fill up the other 501 megs of that hard drive, so one could bet 
creative and ded a copy of sh.dd for your controller, changing its name to 
SI, and setting its wpc and ofs values to be where the next bank of 256 
disks would live. In that nominally 500 megs that little build a new 
descriptor with the new offset values for /SI, /SJ, /SK and /SL to go 
along with /SH, setting each of the others to that $1DBB90 plus $27600 
more for each new hdbdos bank one created.

So /SI.dd would then carry wpc=$20 and fs=3190.

/SJ.dd then would have wpc=22 and ofs=A790.  Wash, rinse and repeat till 
out of disk. I haven't carried it out to see if I'd have room for an /SM 
on these 1Gb drives but it could be used until the drive says I can't 
write to a nonexistent sector.

Thats what happens when I let my imagination out without a chaperon. ;-)

You can obviously get bootlink, if you don't already have it, from my web 
site in the sig. In Genes-os9-stf. That, FWIW, IS this machine. But its 
only a 10 megabit dsl, so the upload is 2 megabits.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS


More information about the Coco mailing list