Subject: 7248 Install success!
To: port-prep <port-prep@netbsd.org>
From: Jesse Peterson <jpeterson275@attbi.com>
List: port-prep
Date: 07/26/2002 01:32:58
Well, after I figured complaining wouldn't do any good I decided to get 
into the trenches and really figure out what to do.  Maybe this could 
get (rewritten and) posted to netbsd.org/Ports/prep? I decided since 
others were having trouble getting it installed I'd post my story. 
NONAKA Kimihiro's May 5th, 2002 post to port-prep@ really helped:

Here are the steps:
1.) Boot the install floppy:
     When it asks, choose "(S)hell" to get to the shell from the floppy
2.) Install MBR (with prep boot partition)
   This is key to it all.  Apparently the PReP architecture firmware (or 
at least on my 7248) requires a seperate partition on the drive just 
for its boot code.  This is a type 65 partition.  I simply did "fdisk -u 
/dev/sd0" to start fdisk with an interactive partition-by-partition 
editor.  The first one i chose type 65, starting at sector 64, lasting 
8000 sectors (4096000 bytes).  For the next partition I gave it a type 
of 169 (NetBSD) partition to start at 8065 (after the prep partition) 
and end on the last sector of the disk (a big-digit calculator is handy 
here). Then chose 0,0,0 for the next values of the other two partition 
entries.
3.) Install a disklabel
   Exec a "disklabel -i -I sd0" to start an interactive disklabel. 
Delete partitions exept "c", which itself should start at the position 
the netbsd (169) partition you created starts at.  In my case sector 
8065 to the end of the disk.  Then make new disklabel entries, 
a=root,b=swap,c=whole disk(unmodifiable),d=/usr etc.
4.) "Upgrade" system
   I suppose technically if you dont modify the disk, you can just 
install, but because I was scard that it would modify my disk, I chose 
to simply "upgrade" the system, trial and error told me the sysinst 
wanted an /etc/fstab, so I created a fake one just so it could map 
partitions to slices.  And installed the system as much as I could.  And 
let sysinst get back to the main menu
5.) Install boot image into prep boot partition
     This is the integral part to make your NetBSD PReP boot at all! 
The type 65 partition must contain boot code.  After trying 
/usr/mdec/boot with failer, I then tried to install 
snapshots/20020502/installation/floppy/generic.fs. Aha!  To install 
boot-code:  what I had do to was overly complicated and I think should 
be implemented somehow in the sysinst on the boot floppy.  But here 
goes: I had to ftp to the server hosting my binary install sets and 
floppies (I suppose mounting the cdrom would do just as well the same) 
and copy over the generic.fs file to /tmp (which thank goodness is an 
8meg md (memery disk) the install floppy creates by default).  Then I 
had to put it onto my hard disk.  Since installboot doesn't exec (gets 
interpreted by sh for some reason) I had to do it directly:
"dd if=generic.fs of=/dev/sd0c obs=512 seek=64" this copies the 
generic.fs to sd0 starting at block (secotor) 64 of the disk, which also 
is the start of the type 65 (prep boot) partition on the disk!
6.) Reboot and hope for the best!
   This is what I did and it booted.  Because I chose the upgrade option 
in sysinst, it didn't install an /etc/fstab, nor set any other option, 
therefor the kernel didn't start up init or rc.conf correctly and i'll 
have to correct that by hand, but it booted without a floppy off the 
hard disk!  Hope it works for you too!

P.S. I may have gotten the technical terms for "parition" and "slice" 
reversed.  Sorry if so.

Best of Luck!!

-- 
Jesse Peterson
erage@softhome.net