Subject: hp300 miniroot bug in NetBSD-3.0
To: None <port-hp300@netbsd.org>
From: Juha Laiho <Juha.Laiho@iki.fi>
List: port-hp300
Date: 06/04/2006 16:36:34
Hello,

I just completed installation of NetBSD-3.0 on HP9000/425 (I'm a bit
uncertain about the exact model; anyway the one in the larger case,
with hyperion display adapter). Thanks for everyone who made NetBSD
working on hp300 systems again!

One 'gotcha' I had during the install was that miniroot didn't
list any disk on which to install. This appeared to be due to
a bug on the install.md script on the miniroot image - looks like
there has been a kernel change that should've been mirrored in
the install.md, but wasn't.

This is how the miniroot install.md was trying to locate available
disks:

md_get_diskdevs() {
        # return available disk devices
        dmesg | awk -F : '/^rd[0-9]*:./ { print $1; }' | sort -u
        dmesg | awk -F : '/^sd[0-9]*:.*cylinders/ { print $1; }' | sort -u
}

And this is what was in the dmesg output:
sd0 at scsibus0 target 1 lun 0: <SEAGATE, ST12400N, 8712> disk fixed
sd0: 2048 MB, 2621 cyl, 19 head, 84 sec, 512 bytes/sect x 4194685 sectors
sd0: async, 8-bit transfers
sd1 at scsibus0 target 2 lun 0: <FUJITSU, M2694ES-512, 811A> disk fixed
sd1: 1033 MB, 1819 cyl, 15 head, 77 sec, 512 bytes/sect x 2117025 sectors
sd1: async, 8-bit transfers


... so, looking for 'cylinders', where 'sectors' was printed by the kernel.

Patch:
--- install.md.orig     2006-06-04 16:28:43.000000000 +0300
+++ install.md  2006-06-04 16:34:31.000000000 +0300
@@ -77,7 +77,7 @@
 md_get_diskdevs() {
        # return available disk devices
        dmesg | awk -F : '/^rd[0-9]*:./ { print $1; }' | sort -u
-       dmesg | awk -F : '/^sd[0-9]*:.*cylinders/ { print $1; }' | sort -u
+       dmesg | awk -F : '/^sd[0-9]*:.*sectors/ { print $1; }' | sort -u
 }

 md_get_cddevs() {


Another issue was to find out the process to install without a NetBSD
machine available; more on that in a separate message.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)