Subject: 2003/02/10 snapshot installation mis-adventures.
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 02/14/2003 22:31:39
I grabbed a copy of the latest releng build in:

	ftp://releng.netbsd.org/pub/NetBSD-daily/current/200302100000/i386/

(I sure don't want to start so far back as the 2002/10/02 snapshot
that's sitting in ftp://ftp.netbsd.org/pub/NetBSD/arch/i386/snapshot/!)

Note I'm trying to install on a machine with a serial console.

I created floppies from boot-com1.fs and boot2.fs and booted them.  So
far, so good -- they boot and recognize more or less all of the
hardware!

However soon I encountered the first set of inter-related problems:

	- sysinst doesn't ask about the terminal type -- it really
	  should unless it can be 101% certain you're using wscons.  If
	  you start out with your serial console connected to on an
	  older system with "pc3" then thing get pretty screwy -- no
	  newbie would stand a chance at this point.

	- <CTRL-C> to the prompt and resetting $TERM doesn't seem to
	  help because sysinst then just spews a very meaningless
	  message:

		sysinst:  Could not initialize curses

	  (newbie dies again) Perhaps it should say something more like
	  this ``I don't know what type of terminal an "xterm" is.
	  Please try one of the following ones that I do know instead: ...''

	- It turns out the reason for this confusing message is that
	  there's no "xterm" in the termcap file on the floppies!  Yes,
	  I know "vt100" does work well enough to drive an xterm, but at
	  least let's put an alias in there!  Of all the kinds of
	  terminal emulators one might be using with a serial console,
	  "xterm" is probably one of the most likely to be used!
	  (Newbie dies a third time -- three strikes and you're out!  No
	  more NetBSD for newbie!)

Then very soon aftwards came the next rather weird problem:

	- sysinst claims it can't figure out the type of geometry on a
	  standard SCSI disk (this is on an Intel STL-2 motherboard,
	  dmesg output is appended below).  (output re-filled to wrap
	  nicely)

		Sysinst could not automatically determine the BIOS
		geometry of the disk.  The physical geometry is 19036
		cylinders 2 sectors 470 heads You will be prompted for
		the geometry.  Please enter the values you want.  The
		number of cylinders should be <= 1024 and the number of
		sectors should be <= 63.  If you have the BIOS set up to
		use > 1024 cylinders just truncate that number to 1024
		here; NetBSD will know about the rest of the cylinders.

		cylinders [19036]: 1024
		heads [2]: 470
		sectors [470]: 63

	  I don't know if the numbers I entered is correct or not, but
	  it seems a hell of a lot better than the suggested values!

	  It's really rather silly.  It used to work somewhat better
	  than this, even on this very same motherboard (with sources
	  from the late 2000/06 timeframe), though the way it works has
	  always been an order of magnitude more confusing and more
	  frustrating than FreeBSD's way of dealing with this same
	  issue.

	  If I were a newbie I wouldn't care about BIOS geometry
	  vs. actual geometry, and I sure as heck wouldn't want to be
	  confused by some install program asking me about such things.
	  I would just want to know that my system would boot OK.

Then finally came a show stopper:

	     Status: Failed: command failed
	    Command: disklabel -w -r sd0 test
	     Press any key to continue
	----------------------------------------------------------------------
	disklabel: can't read master boot record: No such file or directory
	write: No such file or directory

Oops!  What's up with that?

The MBR file seems to be right where I would expect to find it, if I'm
not mistaken.  Is sysninst getting confused about the serial console
stuff?  Or is it getting confused about the geometry I had to enter?

# ls -l
total 1740
-r--r--r--   1 root  wheel     2846 Feb 11 01:20 .profile
drwxr-xr-x   2 root  wheel      512 Feb 11 01:20 bin
drwxrwxrwt   4 root  wheel    28672 Feb 15 02:28 dev
drwxr-xr-x   2 root  wheel      512 Feb 11 01:20 dist
drwxr-xr-x   2 root  wheel      512 Feb 15 02:37 etc
dr-xr-xr-x   2 root  wheel      512 Feb 15 03:00 kern
drwxr-xr-x   2 root  wheel      512 Feb 11 01:20 mnt
drwxr-xr-x   2 root  wheel      512 Feb 11 01:20 mnt2
drwxr-xr-x   2 root  wheel     1024 Feb 11 01:20 sbin
-r-xr-xr-x  68 root  wheel  1739104 Feb 11 01:20 sysinst
drwxrwxrwt   2 root  wheel      512 Feb 11 01:20 tmp
drwxr-xr-x   6 root  wheel      512 Feb 11 01:20 usr
drwxr-xr-x   6 root  wheel      512 Feb 11 01:20 var
# ls -l /usr
total 2
drwxr-xr-x  2 root  wheel  512 Feb 11 01:20 bin
drwxr-xr-x  2 root  wheel  512 Feb 11 01:20 mdec
drwxr-xr-x  2 root  wheel  512 Feb 11 01:20 sbin
drwxr-xr-x  3 root  wheel  512 Feb 11 01:20 share
# ls -l /usr/mdec
total 2025
-r--r--r--   1 root  wheel    59541 Feb 11 01:20 biosboot.sym
-r--r--r--   1 root  wheel    59541 Feb 11 01:20 biosboot_com0_115200.sym
-r--r--r--   1 root  wheel    59541 Feb 11 01:20 biosboot_com0_38400.sym
-r--r--r--   1 root  wheel    59541 Feb 11 01:20 biosboot_com0_57600.sym
-r--r--r--   1 root  wheel    59541 Feb 11 01:20 biosboot_com0_9600.sym
-r-xr-xr-x  68 root  wheel  1739104 Feb 11 01:20 installboot
-r--r--r--   1 root  wheel      512 Feb 11 01:20 mbr
-r--r--r--   1 root  wheel      512 Feb 11 01:20 mbr_bootsel
# dmesg
NetBSD 1.6N (INSTALL) #0: Tue Feb 11 01:03:43 UTC 2003
    autobuild@tgm.daemon.org:/autobuild/HEAD/i386/OBJ/autobuild/HEAD/src/sys/arch/i386/compile/INSTALL
total memory = 1023 MB
avail memory = 944 MB
using 6144 buffers containing 52508 KB of memory
BIOS32 rev. 0 found at 0xfd85e
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium III (686-class), 733.20 MHz, id 0x686
cpu0: features 383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features 383fbff<PGE,MCA,CMOV,PAT,PSE36,MMX>
cpu0: features 383fbff<FXSR,SSE>
cpu0: I-cache 16 KB 32b/line 4-way, D-cache 16 KB 32b/line 4-way
cpu0: L2 cache 256 KB 32b/line 8-way
cpu0: ITLB 32 4 KB entries 4-way, 2 4 MB entries fully associative
cpu0: DTLB 64 4 KB entries 4-way, 8 4 MB entries 4-way
cpu0: 8 page colors
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: vendor 0x1166 product 0x0009 (rev. 0x05)
pchb1 at pci0 dev 0 function 1
pchb1: vendor 0x1166 product 0x0009 (rev. 0x05)
pci1 at pchb1 bus 1
pci1: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
ahc1 at pci1 dev 4 function 0
ahc1: interrupting at irq 9
ahc1: aic7899 Wide Channel A, SCSI Id=7, 16/255 SCBs
scsibus0 at ahc1: 16 targets, 8 luns per target
ahc2 at pci1 dev 4 function 1
ahc2: interrupting at irq 11
ahc2: aic7899 Wide Channel B, SCSI Id=7, 16/255 SCBs
scsibus1 at ahc2: 16 targets, 8 luns per target
vga1 at pci0 dev 2 function 0: vendor 0x1002 product 0x4756 (rev. 0x7a)
wsdisplay0 at vga1 kbdmux 1
wsmux1: connecting to wsdisplay0
fxp0 at pci0 dev 3 function 0: i82559 Ethernet, rev 8
fxp0: interrupting at irq 10
fxp0: Ethernet address 00:d0:b7:b6:ad:4b
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1 at pci0 dev 7 function 0: i82550 Ethernet, rev 12
fxp1: interrupting at irq 9
fxp1: Ethernet address 00:02:b3:28:1e:ac
inphy1 at fxp1 phy 1: i82555 10/100 media interface, rev. 4
inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 15 function 0
pcib0: vendor 0x1166 product 0x0200 (rev. 0x4f)
pciide0 at pci0 dev 15 function 1: ServerWorks OSB4 IDE Controller (rev. 0x00)
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
atapibus0 at pciide0 channel 0: 2 targets
cd0 at atapibus0 drive 0: <MATSHITA CR-594, , YS0B> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
pciide0: primary channel interrupting at irq 14
cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
pciide0: secondary channel configured to compatibility mode
pciide0: secondary channel interrupting at irq 15
ohci0 at pci0 dev 15 function 2: vendor 0x1166 product 0x0220 (rev. 0x04)
ohci0: interrupting at irq 9
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: vendor 0x1166 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
md0: internal 2240 KB image area
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST39205LW, 5063> disk fixed
sd0: 8750 MB, 19036 cyl, 2 head, 470 sec, 512 bytes/sect x 17921835 sectors
sd0: sync (25.0ns offset 63), 16-bit (80.000MB/s) transfers, tagged queueing
sd1 at scsibus0 target 1 lun 0: <SEAGATE, ST39205LW, 5063> disk fixed
sd1: 8750 MB, 19036 cyl, 2 head, 470 sec, 512 bytes/sect x 17921835 sectors
sd1: sync (25.0ns offset 63), 16-bit (80.000MB/s) transfers, tagged queueing
scsibus1: waiting 2 seconds for devices to settle...
boot device: fd0
root on md0a dumps on md0b
root file system type: ffs
warning: no /dev/console
# cat /etc/disktab
test|NetBSD installation generated:\
        :dt=(null):ty=winchester:\
        :nc#19036:nt#2:ns#470:\
        :sc#940:su#17921835:\
        :se#512:\
        :pa#4195157:oa#63:ta=4.2BSD:ba#8192:fa#1024\
        :pb#2457160:ob#4195220:tb=swap:\
        :pc#17912412:oc#63:tc=unused:\
        :pd#0:od#0:td=unused:\
        :pe#2097140:oe#6652380:te=4.2BSD:be#8192:fe#1024\
        :pf#9172315:of#8749520:tf=4.2BSD:bf#16384:ff#2048\
        :pg#0:og#0:tg=unused:\
        :ph#0:oh#0:th=unused:\
        :pi#0:oi#0:ti=unused:\
        :pj#0:oj#0:tj=unused:\
        :pk#0:ok#0:tk=unused:\
        :pl#0:ol#0:tl=unused:\
        :pm#0:om#0:tm=unused:\
        :pn#0:on#0:tn=unused:\
        :po#0:oo#0:to=unused:\
        :pp#0:op#0:tp=unused:

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>