NetBSD Problem Report #34547

From www@NetBSD.org  Sun Sep 17 19:47:46 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
	id 359EA63B400; Sun, 17 Sep 2006 19:47:46 +0000 (UTC)
Message-Id: <20060917194746.359EA63B400@narn.NetBSD.org>
Date: Sun, 17 Sep 2006 19:47:46 +0000 (UTC)
From: dhgutteridge@sympatico.ca
Reply-To: dhgutteridge@sympatico.ca
To: gnats-bugs@NetBSD.org
Subject: Hard drive not properly recognized by install kernel
X-Send-Pr-Version: www-1.0

>Number:         34547
>Category:       port-hp700
>Synopsis:       Hard drive not properly recognized by install kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    skrll
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 17 19:50:00 +0000 2006
>Closed-Date:    Wed Oct 04 07:34:17 +0000 2006
>Last-Modified:  Wed Oct 04 07:34:17 +0000 2006
>Originator:     David H. Gutteridge
>Release:        CURRENT
>Organization:
>Environment:
>Description:
During an attempted install of NetBSD/hp700 HEAD using the most recent
netinstall.lif images (Sept. 9th and 14th), the install kernel indicates
an error of some sort when examining the hard drive.  It does not recognize
the correct size/geometry of the hard drive at all, meaning I can't
install NetBSD on it.

The dmesg indicates the following:

sd0 at scsibus0 target 6 lun 0: <IBM, DDRS-39130WS, HP01> disk fixed
sd0: 8678MB, 8387 cyl, 10 head, 211 sec, 512 bytes/sect x 17773524 sectors
sd0: sync (50.00ns offset 15), 16-bit (40.000MB/s) transfers, tagged queueing
cd0 at scsibus1 target 2 lun 0: <TOSHIBA, CD-ROM XM-6201TA, 1037> cdrom removable
cd0: sync (100.00ns offset 8), 8-bit (10.000MB/s) transfers
sd0: fabricating a geometry
sd0: LIF directory I/O error
boot device: tlp0
root on md0a dumps on md0b
root file system type: ffs
WARNING: clock lost 770 days -- CHECK AND RESET THE DATE!
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
mount: cannot open `/dev/md0a': Operation not permitted
mount_mfs: Unable to determine file system size
Terminal type? [vt100]

In sysinst, choosing option (a) "Set sizes of NetBSD partitions", I see the
following:

     MB         Cylinders   Sectors   Filesystem
>   304     (0)       304    622592 + /
      0                 0         0   swap
      0                 0         0   tmp (mfs)
      0                 0         0   /usr
      0                 0         0   /var
      0                 0         0   /home

If I choose option (b) "Use existing partition sizes", I see the following:

 Start  MB   End  MB Size   MB FS type    Newfs Mount Mount point
 --------- --------- --------- ---------- ----- ----- -----------
a:       0         0         0 unused
b:       0         0         0 unused
c:       0         0         0 Whole disk
d:       0         0         0 unused

If I escape to a shell and run "disklabel sd0", I see this:

# /dev/rsd0c:
type: SCSI
disk: mydisk
label: fictitious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 0
total sectors: 1
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

3 partitions:
#        size     offset      fstype [fsize bsize cpg/sgs]
 c:         1          0      unused      0     0        # (Cyl.     0 -      0*)
disklabel: cylinders/unit 0
disklabel: boot block size 0
disklabel: super block size 0

I tried using "disklabel -e", but that fails with the error:

# disklabel -e sd0
/usr/bin/vi: not found

(Since vi isn't available on the installer, of course.)

The disk was originally partitioned/labelled for Linux (Debian); I wondered if
repartitioning it with the OpenBSD installer would help NetBSD's sysinst see the
disk correctly. I installed OpenBSD 3.9 on the disk, partitioning thus:

# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: DDRS-39130WS    
flags:
bytes/sector: 512
sectors/track: 211
tracks/cylinder: 10
sectors/cylinder: 2110
cylinders: 8387
total sectors: 17773524
rpm: 7200
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# microseconds
track-to-track seek: 0	# microseconds
drivedata: 0 

4 partitions:
#             size        offset  fstype [fsize bsize  cpg]
  a:       1637360          2110  4.2BSD   2048 16384  544 # Cyl     1 -   776 
  b:       2097340       1639470    swap                   # Cyl   777 -  1770 
  c:      17773524             0    boot                   # Cyl     0 -  8423*
  d:      14036714       3736810  4.2BSD   2048 16384  544 # Cyl  1771 -  8423*

This had no effect from the NetBSD installer's perspective, it saw the disk
exactly the same as before.
>How-To-Repeat:
(Try booting a netinstall.lif image.)
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-hp700-maintainer->skrll
Responsible-Changed-By: skrll@netbsd.org
Responsible-Changed-When: Mon, 02 Oct 2006 12:06:10 +0000
Responsible-Changed-Why:
I'll handle this one.


From: Nick Hudson <nick.hudson@dsl.pipex.com>
To: gnats-bugs@netbsd.org, dhgutteridge@sympatico.ca
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-hp700/34547: Hard drive not properly recognized by install kernel
Date: Mon, 2 Oct 2006 14:43:40 +0100

 On Sunday 17 September 2006 20:50, dhgutteridge@sympatico.ca wrote:
 > >Number:         34547
 > >Synopsis:       Hard drive not properly recognized by install kernel

 Please try the install image at

 	ftp://ftp.netbsd.org/pub/NetBSD/misc/skrll/netinstall.lif

 	MD5 (netinstall.lif) = a8b71bc7dfc500fdddbbd0f924863a6a

 Try to read the OpenBSD disklabel previously written to disk.

 Try to create new partitions using sysinst

 Can you send full dmesg as well.

 Thanks,
 Nick

From: "David H. GUTTERIDGE" <dhgutteridge@sympatico.ca>
To: nick.hudson@dsl.pipex.com, gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-hp700/34547: Hard drive not properly recognized by install kernel
Date: Tue, 03 Oct 2006 01:47:57 +0000

 >On Sunday 17 September 2006 20:50, dhgutteridge@sympatico.ca wrote:
 > > >Number:         34547
 > > >Synopsis:       Hard drive not properly recognized by install kernel
 >
 >Please try the install image at
 >
 >	ftp://ftp.netbsd.org/pub/NetBSD/misc/skrll/netinstall.lif
 >
 >	MD5 (netinstall.lif) = a8b71bc7dfc500fdddbbd0f924863a6a
 >
 >Try to read the OpenBSD disklabel previously written to disk.
 >
 >Try to create new partitions using sysinst
 >
 >Can you send full dmesg as well.
 >
 >Thanks,
 >Nick

 I get a kernel panic before I get to sysinst, relevant lines are:

 raidattach: Asked for 8 units
 Kernelized RAIDframe activated
 md0: internal 2insanity: where 0xdead01 type 0x4 tf 0xf18800 lwp 0xf12804 
 line 442 sp 0xf18800 pc 0x30ea73c
 Stopped in pid 0.1 (swapper) at 0x30ea740:      ldo     R'3C(%r31),%r12
 db> bt
 >>7ffff3, 30ea740, 18008     (null)(fd34340d, f82b781f,284b9300,62487c00) at 
 >>0x30ea740
 kernel: unaligned data ref trap, code=7fffdf
 Caught exception in DDB; continuing...
 db>

 I don't have a serial console setup, so I can't really grab the full dmesg.
 (I can get an OpenBSD dmesg, if that's of any use at all.)  If it's 
 critical,
 I can pick up a serial cable.

 Dave


From: "David H. GUTTERIDGE" <dhgutteridge@sympatico.ca>
To: skrll@netbsd.org, gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-hp700/34547: Hard drive not properly recognized by install kernel
Date: Wed, 04 Oct 2006 03:31:29 +0000

 >On Tuesday 03 October 2006 04:05, David H. GUTTERIDGE wrote:
 >[...]
 > >  I get a kernel panic before I get to sysinst, relevant lines are:
 > >
 > >  raidattach: Asked for 8 units
 > >  Kernelized RAIDframe activated
 > >  md0: internal 2insanity: where 0xdead01 type 0x4 tf 0xf18800 lwp 
 >0xf12804
 > >  line 442 sp 0xf18800 pc 0x30ea73c
 > >  Stopped in pid 0.1 (swapper) at 0x30ea740:      ldo     R'3C(%r31),%r12
 > >  db> bt
 > >
 > >  >>7ffff3, 30ea740, 18008     (null)(fd34340d, 
 >f82b781f,284b9300,62487c00)
 > >  >> at 0x30ea740
 > >
 > >  kernel: unaligned data ref trap, code=7fffdf
 > >  Caught exception in DDB; continuing...
 > >  db>
 >
 >What's the backtrace? It goes awol handling an interrupt.
 >
 > >  I don't have a serial console setup, so I can't really grab the full
 > > dmesg. (I can get an OpenBSD dmesg, if that's of any use at all.)  If 
 >it's
 > > critical, I can pick up a serial cable.
 >
 >A serial console would really help

 Okay, you're going to love this.  I bought a serial cable today, set
 it up, and voila, we've found a new quirk.  If I boot the image you've
 provided via a serial console, it works fine, there's no panic, it gets
 to sysinst (more on that below).  But if I boot using the framebuffer,
 the panic occurs.

 So, here's the full dmesg as I get from booting via a serial console:

 >>NetBSD/hp700 LIF/FFS/LFS Boot, Revision 1.3
 >>(nick@arthur, Sun Oct  1 12:22:29 BST 2006)
 >>Enter "reset" to reset system.
 Boot: [[[lf0a:]netbsd][-a][-c][-d][-s][-v][-q]] :-
 9672976+2764800+471040=0xd162b4
 Start @ 0x200000 [1=0xf16000-0xf162b4]...
 PDC_CACHE_SETCS: 0, 0, 0, 0 (-2)
 SPID bits: 0x0, error = -2
 btlb info: minsz=128, maxsz=16384
 btlb fixed: i=0, d=0, c=8
 btlb varbl: i=0, d=0, c=0
 pdc_hwtlb.min_size 0x1000
 pdc_hwtlb.max_size 0x80000000
 HP9000/778/B180L (Merlin L2+ 180), PA7300LC
   [ BTLB slot 0: r-x--- 0x00200000 @ 0x0:0x00200000 len 0x00200000 ]
   [ BTLB slot 1: r-x--- 0x00400000 @ 0x0:0x00400000 len 0x00400000 ]
   [ BTLB slot 2: r-x--- 0x00800000 @ 0x0:0x00800000 len 0x00400000 ]
   [ BTLB slot 3: rw---- 0x00c00000 @ 0x0:0x00c00000 len 0x00400000 ]
   [ BTLB slot 4: rw---- 0x01000000 @ 0x0:0x01000000 len 0x01000000 ]
   [ BTLB slot 5: rw---- 0x02000000 @ 0x0:0x02000000 len 0x01000000 ]
 pdc_coproc: 0xc0, 0xc0
 Loaded initial symtab at 0xf16000, strtab at 0x0, # entries 0
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 
 2006
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.

 NetBSD 4.99.2 (RAMDISK) #2: Mon Oct  2 14:05:05 BST 2006

 nick@arthur:/usr/obj/hp700/usr/src-hp700/sys/arch/hp700/compile/RAMDISK
 HP9000/778/B180L (Merlin L2+ 180)
 real mem = 512 MB (73728 reserved for PROM, 474 MB used by NetBSD)
 avail mem = 466 MB
 timecounter: Timecounters tick every 10.000 msec
 mainbus0 (root) [flex fff80000]
 pdc0 at mainbus0
 cpu0 at mainbus0 hpa 0xfffbe000 path 62 irq 31 ipl 0: PA7300LC 
 (Velociraptor) rev 12
 cpu0: PCX-L2, PA-RISC 1.1e, lev 1, cat A, 180 MHz clk
 cpu0: shadows, 64K/64K D/I caches, 96 shared TLB, 8 shared BTLB
 cpu0: VR floating point, rev 1
 mem0 at mainbus0 hpa 0xfffbf000 path 63: size 512MB, sltcv 
 a898d000<avwl,edcen,edtag,l2ena>, 1MB L2 cache
 phantomas0 at mainbus0 hpa 0xffc00000 path 8
 dino0 at phantomas0 hpa 0xfff80000 path 8/0 irq 28 ipl 1: Dino V3.1
 pci0 at dino0 bus 0
 pci0: i/o space, memory space enabled
 esiop0 at pci0 dev 19 function 0: Symbios Logic 53c875 (ultra-wide scsi)
 esiop0: using on-board RAM
 esiop0: interrupting at irq 3
 esiop0: alloc new tag DSA table at PHY addr 0x2eab000
 scsibus0 at esiop0: 16 targets, 8 luns per target
 tlp0 at pci0 dev 20 function 0: DECchip 21143 Ethernet, pass 3.0
 tlp0: interrupting at irq 0
 tlp0: Ethernet address xx:xx:xx:xx:xx:xx
 lxtphy0 at tlp0 phy 1: LXT970 10/100 media interface, rev. 0
 lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 lasi0 at phantomas0 hpa 0xffc00000 path 8/16 irq 27: rev 3.0
 gsc0 at lasi0
 lpt0 at gsc0 hpa 0xffd02000 path 8/16/0 irq 7 ipl 3
 harmony0 at gsc0 hpa 0xffd04000 path 8/16/1 irq 13 ipl 4: rev 18
 audio0 at harmony0: full duplex
 com0 at gsc0 hpa 0xffd05000 path 8/16/4 irq 5 ipl 5: ns16550a, working fifo
 com0: console
 osiop0 at gsc0 hpa 0xffd06000 path 8/16/5 irq 9 ipl 6: NCR53C710 rev 2, 
 40MHz, SCSI ID 7
 scsibus1 at osiop0: 8 targets, 8 luns per target
 gsckbc0 at gsc0 hpa 0xffd08000 path 8/16/7 irq 26 ipl 7: keyboard
 pckbd0 at gsckbc0 (kbd slot)
 wskbd0 at pckbd0 mux 1
 gsckbc1 at gsc0 hpa 0xffd08100 path 8/16/8: mouse
 pms0 at gsckbc1 (aux slot)
 wsmouse0 at pms0 mux 0
 sti0 at phantomas0 hpa 0xf8000000 path 8/24: INTERNAL_EG_640 rev 8.07;9, ID 
 0x2D08C0A709A02587
 sti0: 2048x2048 frame buffer, 640x480x8 display, offset 0x0
 sti0: 8x16 font type 1, 16 bpc, charset 0-255
 pwr_sw_init: pdc_power_info.addr=0xf0140000
 biomask 00000342 netmask 00000346 ttymask 000007ee
 pwr_sw_control=0 enable=1
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 timecounter: selected timecounter "clockinterrupt" frequency 100 Hz quality 
 0
 timecounter: Timecounter "itimer" frequency 180000000 Hz quality 100
 timecounter: selected timecounter "itimer" frequency 180000000 Hz quality 
 100
 wsdisplay0 at sti0 kbdmux 1
 wsmux1: connecting to wsdisplay0
 pckbport_cmd: send error
 pckbd: error setting scanset 1
 raidattach: Asked for 8 units
 Kernelized RAIDframe activated
 md0: internal 2048 KB image area
 scsibus0: waiting 2 seconds for devices to settle...
 scsibus1: waiting 2 seconds for devices to settle...
 esiop0: alloc newcdb at PHY addr 0x2eda000
 sd0 at scsibus0 target 6 lun 0: <IBM, DDRS-39130WS, HP01> disk fixed
 sd0: 8678 MB, 8387 cyl, 10 head, 211 sec, 512 bytes/sect x 17773524 sectors
 sd0: sync (50.00ns offset 15), 16-bit (40.000MB/s) transfers, tagged 
 queueing
 cd0 at scsibus1 target 2 lun 0: <TOSHIBA, CD-ROM XM-6201TA, 1037> cdrom 
 removable
 cd0: sync (100.00ns offset 8), 8-bit (10.000MB/s) transfers
 Searching for RAID components...
 sd0: fabricating a geometry
 PROM boot device: hpa 0xf0fff000 path 8/0/20/0 dp_layers 
 0x10000/0xffec0030/0x656be3f2/0x27c7fe03/0xc0a80105/0xc0a8010a dp_f2
 boot device: tlp0
 root on md0a dumps on md0b
 mountroot: trying lfs...
 mountroot: trying ffs...
 root file system type: ffs
 WARNING: preposterous TOD clock time
 WARNING: using filesystem time
 WARNING: CHECK AND RESET THE DATE!
 init: copying out flags `-s' 3
 init: copying out path `/sbin/init' 11
 erase ^H, werase ^W, kill ^U, intr ^C, status ^T
 mount_mfs: Unable to determine file system size
 Terminal type? [vt100]
 Erase is backspace.
 (I)nstall, (S)hell or (H)alt ?

 And here's the equivalent ending bit I get when I boot using the
 framebuffer:

 sti0 at phantomas0 hpa 0xf8000000 path 8/24: INTERNAL_EG_640 rev 8.07;9, ID 
 0x2D08C0A709A02587
 sti0: 2048x2048 frame buffer, 640x480x8 display, offset 0x0
 sti0: 8x16 font type 1, 16 bpc, charset 0-255
 pwr_sw_init: pdc_power_info.addr=0xf0140000
 biomask 00000342 netmask 00000346 ttymask 000007ee
 pwr_sw_control=0 enable=1
 timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
 timecounter: selected timecounter "clockinterrupt" frequency 100 Hz quality 
 0
 timecounter: Timecounter "itimer" frequency 180000000 Hz quality 100
 timecounter: selected timecounter "itimer" frequency 180000000 Hz quality 
 100
 wsdisplay0 at sti0 kbdmux 1
 wsmux1: connecting to wsdisplay0
 crypto: assign driver 0, flags 2
 crypto: driver 0 registers alg 1 flags 0 maxoplen 0
 crypto: driver 0 rinsanity: where 0xdead01 type 0x4 tf 0xf18840 lwp 0xf12804 
 line 442 sp 0xf18840 pc 0x30ea0b0
 Stopped in pid 0.1 (swapper) at 0x30ea0b4:      comiclr,=       0,%r8,%r22
 db> bt
 >>32a193c, 30ea0b4, 20 (null)(0,0,0,6238) at 0x30ea0b4
 >>1, 20, 0     (null)(0,0,0,0) at 0x20
 kernel: unaligned data ref trap, code=ffffffed
 Caught exception in DDB; continuing...
 db>

 So I tried:

 db> continue
 insanity: where 0xdead02 type 0x4 tf 0xf18840 lwp 0xf12804 line 442 sp 
 0xf18840 pc 0x30ea0b4
 Stopped in pid 0.1 (swapper) at 0x30ea0b8:      ldi     1,%r22
 db> bt
 >>32a193c, 30ea0b8, 20 (null)(0,0,0,6238) at 0x30ea0b8
 >>1, 20, 0     (null)(0,0,0,0) at 0x20
 kernel: unaligned data ref trap, code=ffffffed
 Caught exception in DDB; continuing...
 db> continue
 crypto: driver 0 registers alg 3 flags 0 maxoplen 0
 crypto: driver 0 registers alg 4 flags 0 maxoplen 0
 crypto: driver 0 registers alg 5 flags 0 maxoplen 0
 crypto: driver 0 registers alg 5 flags 0 maxoplen 0insanity: where 0xdead01 
 type 0x4 tf 0xf18940 lwp 0xf12804 line 442 sp 0xf18940 pc 0x30ea6f4
 Stopped in pid 0.1 (swapper) at 0x30ea6f8:    ldw     R'0(%r20),%r10
 db> bt
 >>7ff778, 30ea6f8, 1    (null)(4b9c0048,487c0020,4b930050,487c3fb9) at 
 >>0x30ea6f8
 >>6b930060, 1, 8140256
 db>

 At which point the machine froze and did not accept console input.
 I had to yank the power cord to reset it.

 Now, back to the serial console session...  It does indeed recognize the
 OpenBSD partitions, like so:

 We now have your BSD-disklabel partitions as:
 This is your last chance to change them.

     Start  MB   End  MB  Size  MB FS type    Newfs Mount Mount point
     --------- --------- --------- ---------- ----- ----- -----------
 a:         1       799       799 FFSv1            Yes
 b:       800      1823      1024 swap
 c:         0      8677      8678 Whole disk
 d:      1824      8677      6853 FFSv1            Yes
 e:         0         0         0 unused
 f: Show all unused partitions
 g: Change input units (sectors/cylinders/MB)
 >x: Partition sizes ok

 d_ntracks   =10
 d_nsectors  =211
 d_secsize   =512
 d_secpercyl =2110
 d_secperunit=17773524
 dlsize      =17773524

 I proceeded to alter the partition sizes in sysinst, and continued.  It
 was successful.  I followed sysinst to the point where it asks for the
 location of the install sets.  (Since there weren't any available via
 the releng builds right now, I aborted.)

 Dave


From: Nick Hudson <skrll@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/34547 CVS commit: src/sys/arch/hp700/hp700
Date: Wed,  4 Oct 2006 07:28:00 +0000 (UTC)

 Module Name:	src
 Committed By:	skrll
 Date:		Wed Oct  4 07:28:00 UTC 2006

 Modified Files:
 	src/sys/arch/hp700/hp700: disksubr.c

 Log Message:
 Sync with the OpenBSD diskubr.c and fix some of our own bugs:

 - copyright maintenance
 - remove all the endian stuff - it didn't work
 - correct a comment spello
 - use the correct blkno when writing a disklabel
 - don't pass garbage from the stack as the disklabel when trying to read
   the LIF label in the write label case.

 Fixes PR 34547 from David H. Gutteridge


 To generate a diff of this commit:
 cvs rdiff -r1.16 -r1.17 src/sys/arch/hp700/hp700/disksubr.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: skrll@netbsd.org
State-Changed-When: Wed, 04 Oct 2006 07:34:17 +0000
State-Changed-Why:
A fix has been committed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.