Subject: Re: ZIP drive problems
To: der Mouse <mouse@Holo.Rodents.Montreal.QC.CA>
From: Zadok <ml@rz.uni-potsdam.de>
List: port-hp300
Date: 01/10/1997 11:05:50
On Thu, 9 Jan 1997, der Mouse wrote:

first: thanks !! I'll try it as soon as I'm back to the university :-)
> [I've added port-sparc bceause this is a sparc/hp300 cross-port issue.]

> > I know, the sparc port uses sunos disklabels, but what uses the hp ?
> > I thought it were sunos ones too, since I never found anything hp/ux
> > like...
> 
> Heavens no.  The hp300 port uses a weird setup apparently invented by
> HP, one I assume it's compelled to use for compatability with HP's boot
> ROMs.  Under HP-UX there's this thing called LIF, I'm not sure what it
yeah, LIF stands for Logical Interchange Format, was used by HP Basic too,
at least one old HP/UX Filesystem was derived from this. I wasn't sure if
HP/UX uses something like disklabels at all and NetBSD doesn't do anything
to be compatible to HP/UX besides the boot block ( which you could call HP
Basic compatible with the same truth since it simply loads the first file 
named SYS* with file type system it could find on a disk )

> stands for, but it's basically a really rudimentary filesystem. The
> NetBSD/hp300 bootblocks are really LIF images, constructed "by hand" by
> mkboot when "make install" is run in /sys/arch/hp300/stand.  See
> mkboot.c in that directory for full details.
yup... is there a possibility to read/write LIF filesystems on NetBSD ? my
old 320 is really too slow to run NetBSD satisfactory ( 16 MHZ 68020, 5MB
DIO-I RAM, slooow HPIB-disc ) so I wanted to use it under HP Basic but
there I have no way to get my data onto another machine...
 
> > or how to make a filesystem on it that both, the hp and the sparc can
> > read ?
> 
> Disklabel the disk on the HP.  This will write a LIF header into the
> first 40 bytes of the first sector and dump a bunch more stuff into
> later sectors, per the comments in mkboot.c.
should be name and layout of the "disk"

I don't neet do boot from a ZIP disk, so I don't even need a LIF header...

> Be careful when laying out your partitions to avoid using the beginning
> of the disk.  The first 8K (16 sectors) are left untouched anyway, but
> this isn't always enough for the hp300 port.  If you want the disk to
> be bootable on the HP, you have to avoid stomping on the whole LIF
> "filesystem"; check out the size of the thing installed by installboot
> to see how much space you have to avoid using - or just skip the first
> meg or so.  With a SunOS-style label, your partitions have to begin on
> what the label thinks are cylinder boundaries anyway; if (as I would
> recommend) you label the zip disk with one-meg cylinders, skipping the
> first "cylinder" loses you only a little over 1% of the available
> space (not exactly 1% - iomega calls them 100-meg, but that's a lie;
> they're 96 megs).  It may be that if you don't want the disk bootable
> on the HP, you can get away with just doing the first-16-sectors thing,
> in which case you don't need to reserve any space unless you expect to
> copy stuff directly into raw disk partitions.
yup, the SPARC claimed the Disk were 96 tracks, 64 heads, 32 sectors or
s where the hp told me something really strange: 138000 tracks, 2 heads,
196*** blocks ( at least the blocks it got right... )
 
> Since the sparc and the hp300 are both big-endian, you should be able
> to mkfs on either and have the other use the filesystem, once you get
> disklabels that agree on where the partitions are.  (Be careful about
> this, because the hp300 disklabel and the sparc disklabel are stored in
> different places on the disk and in different formats even, so if you
> change one you must change the other to match, or you will get Very
> Confused (tm).)
yup, that's why I came to this idea :-)
I would be perfectly happy ( no, not perfectly, but it would be enough )
if I could read/write tar archiver onto the disk with both machines, at
present the hp refuses writing...
 
> It occurs to me that given how hp300 mkboot lays out the beginning of
> the disk, you could probably create a disk that would be bootable on
> either the hp300 or the sparc, but it would require some very careful
> juggling to fit the sparc boot program into the unused spaces in the
> hp300 layout - definitely not something for the faint of heart.
> (Besides, the sparc and the hp300 can't share binaries, and a zip disk
> is barely big enough for a bootable system for _one_ architecture.)
(grin) that would be something for a fanatic hacker... but a minimal
filesystem for both should be possible ( kernel, devs, minimal bin and
sbin, a shell... that was it... at least my hp boots happily from a 16MB
partition with a nearly full unix... say the sparc binaries are twice the
size of the 68020... should be enough, the /etc could be shared, 2
kernels... may be possible :->>>> )

bye
Michael