Subject: Re: Setting up a disk...
To: None <marcb@bms.itg.telecom.com.au>
From: Phil Nelson <phil@steelhead.cs.wwu.edu>
List: port-pc532
Date: 08/06/1996 09:19:02
>Start out by disklabeling the disk for i386 use. Create file systems and 
>leave some room at the front of the disk (one cylinder) for '532 disklabel
>and boot program. Copy/untar binaries for pc532 and make sure netbsd
>kernel is in the root partition.
>
>dd the i386 disklabel to a file, dd the disklabel to offset 64 bytes from
>start of disk (now in '532 position). dd pc532 boot to 1K into disk.

Sounds close.  Actually, the pc532 uses a "boot images" partition.
It is entered into the partition table.  It may be anywhere
on your disk.  bim(8) installes the boot program.  bim(8) will also
initialize the boot image directory (next to the disklabel). 

On at least one machine I use, the "boot images" partition is at the
very end of the disk.  It is that way on the install "floppy".

>Find source to bim (anyone got a pointer), and configure an image table
>after boot area pointing to the 'boot' partition which is 1k into the disk
>(ie. where the boot program is). 

Source is in the source tree .... src/sbin/bim.

bim should compile under NetBSD/i386.  It is possible (and I haven't
tried it) that you could use it under NetBSD/i386 to add the boot image.

Here is what I'd do if I was trying this ...

 a) Everything up to dd the disklabel to the proper place.
 b) dd the boot program to the boot image partition (without bim)
 c) Install disk pc532
 d) Read boot program from boot partition via the read monitor command
 e) execute it with the run command
 f) After NetBSD is booted, then run bim(8) to add boot program to
    the boot images partition so that the boot monitor command will work.

One thing to be aware of ...

   On NetBSD/i386, the entire disk is partition d, the entire NetBSD
portion is partition c.  On the pc532, the endire disk is partition c.
bim(8) uses partition c to do its reads and writes to install and manipulate
images in the boot images partition.  bim(8) reads the disklabel to
know where to read and write.

-- 
Phil Nelson
phil@steelhead.cs.wwu.edu (NetBSD/pc532 machine)
phil@cs.wwu.edu (work)
http://www.cs.wwu.edu/~phil