Subject: Odd kernel reboots
To: None <current-users@NetBSD.ORG>
From: Dave Burgess <>
List: current-users
Date: 10/13/1997 21:36:23
I Have been able to successfully reproduce this particular problem for
several weeks now.  I have a suspicion on the solution and would like
some thoughts/validation.

I have built a kernel using the config file below.  It is for our news
server.  The machine has an IDE hard drive that I cannot diable the
drive on; it disables the controller if I try and I need the IDE drive.
In spite of that, I want to boot off the SCSI drive.  Using some
relatively new bootblocks, I am able to allow the system to boot
normally by including an "hd1a:/netbsd" in the boot selector.

This works well with a 1.2G kernel compiled from last July.  I have
recently tried to upgrade the system (to avoid the 'page fault in
supervisor mode' problem).  Every kernel I've built since the middle of
September exhibits the same odd behavior.

-  I copy the working kernel to /onetbsd
-  I copy the new kernel to /netbsd
-  I reboot.
-  The system comes up normally, until it probes the IDE controller.
The system then spontaneously reboots.  This cycle will repeat until I
tell it to boot from the onetbsd kernel.

I thought for a while that it might be a bad copy of some source code,
or an old source file, but all of the rest of the computers I've built
kernels for work fine.  I'm working from one now.

I'm guessing that I need to install the new boot code.  I'm retiscent to
do it without some planning, since I can't really afford for this
machine to be down for extended (several hour) periods.

Attachment 2 is the dmesg output from the existing (working) kernel.

Does anyone have any suggestions to offer?

ATCH 1 - config file.

#	$NetBSD: GENERIC,v 1.83 1997/07/02 02:44:10 cjs Exp $
#	NEON -- Specifically, the news server

include "arch/i386/conf/std.i386"

options 	I386_CPU	# CPU classes; at least one is REQUIRED
options 	I486_CPU
options 	I586_CPU
options 	I686_CPU
options 	MATH_EMULATE	# floating point emulation
#options 	VM86		# Virtual 8086 emulation

# Some BIOSes don't get the size of extended memory right.  If you
# have a broken BIOS, uncomment the following and set the value
# properly for your system.
#options 	BIOSEXTMEM=...	# size of extended memory

options 	DUMMY_NOPS	# speed hack; recommended
options 	INSECURE	# insecure; allow /dev/mem writing for X

maxusers	32		# estimated number of users
options 	RTC_OFFSET=0	# hardware clock is this many mins. west of GMT
#options 	NTP		# NTP phase/frequency locked loop
#  If this machine crashes, I REALLY need to just reboot.  Debugging
#  would just slow down the reboot, so I disable it.
#options 	DDB		# in-kernel debugger
#makeoptions	DEBUG="-g"	# compile full symbol table
#options 	DIAGNOSTIC	# internal consistency checks
#options 	KTRACE		# system call tracing, a la ktrace(1)

options 	SYSVMSG		# System V-like message queues
options 	SYSVSEM		# System V-like semaphores
options 	SYSVSHM		# System V-like memory sharing
#options 	SHMMAXPGS=1024	# 1024 pages is the default

options 	COMPAT_NOMID	# compatibility with 386BSD, BSDI, NetBSD 0.8,
options 	COMPAT_09	# NetBSD 0.9,
options 	COMPAT_10	# NetBSD 1.0,
options 	COMPAT_11	# NetBSD 1.1,
options 	COMPAT_12	# NetBSD 1.2,
options 	COMPAT_43	# and 4.3BSD
options 	TCP_COMPAT_42	# TCP bug compatibility with 4.2BSD
options 	NMBCLUSTERS=2048

#  Nothing but NetBSD executables here.
#options 	COMPAT_SVR4	# binary compatibility with SVR4
#options 	COMPAT_IBCS2	# binary compatibility with SCO and ISC
#options 	COMPAT_LINUX	# binary compatibility with Linux
#options 	COMPAT_FREEBSD	# binary compatibility with FreeBSD

#options 	EXEC_ELF32	# 32-bit ELF executables (SVR4, Linux)

#options 	USER_LDT	# user-settable LDT; used by WINE
options 	LKM		# loadable kernel modules

#  I wouldn't have the DOS file system if I didn't have customers with
#  Windows floppies.
file-system 	FFS		# UFS
#file-system 	EXT2FS		# second extended file system (linux)
#file-system 	LFS		# log-structured file system
#file-system 	MFS		# memory file system
file-system 	NFS		# Network File System client
file-system 	CD9660		# ISO 9660 + Rock Ridge file system
file-system 	MSDOSFS		# MS-DOS file system
file-system 	FDESC		# /dev/fd
file-system 	KERNFS		# /kern
#file-system 	NULLFS		# loopback file system
#file-system 	PORTAL		# portal filesystem (still experimental)
file-system 	PROCFS		# /proc
#file-system 	UMAPFS		# NULLFS + uid and gid remapping
file-system 	UNION		# union file system

options 	QUOTA		# UFS quotas
options 	NFSSERVER	# Network File System server
#options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
				# immutable) behave as system flags.
# Inet only - no other network protocols needed.
#options 	GATEWAY		# packet forwarding
options 	INET		# IP + ICMP + TCP + UDP
options 	MROUTING	# IP multicast routing
#options 	NS		# XNS
#options 	NSIP		# XNS tunneling over IP
#options 	ISO,TPIP	# OSI
#options 	EON		# OSI tunneling over IP
#options 	CCITT,LLC,HDLC	# X.25
options 	PFIL_HOOKS	# pfil(9) packet filter hooks

config		netbsd	root on sd0a type ? dumps on sd0b

#  This machine has a PCI bus - the IDE controller lives on it.
#options 	EISAVERBOSE	# verbose EISA device messages
options 	PCIVERBOSE	# verbose PCI device messages

mainbus0 at root

pci0	at mainbus0 bus ?
#eisa0	at mainbus0

ppb*	at pci? dev ? function ?	# PCI-PCI bridges
pci*	at ppb? bus ?
pchb*	at pci? dev ? function ?	# PCI-Host bridges
pci*	at pchb?
pcib*	at pci? dev ? function ?	# PCI-ISA bridges

isa*	at pcib?			# ISA on PCI-ISA bridge
isa*	at mainbus0			# all other ISA

#apm0	at mainbus0			# Advanced power management

npx0	at isa? port 0xf0 		# math coprocessor

#pc0	at isa? port 0x60 irq 1		# generic PC console device
vt0	at isa? port 0x60 irq 1

com0	at isa? port 0x3f8 irq 4	# standard PC serial ports
com1	at isa? port 0x2f8 irq 3
com2	at isa? port 0x3e8 irq 5
com3	at isa? port 0x2e8 irq 9
lpt0	at isa? port 0x378 		# standard PC parallel ports

bha0	at isa? port 0x330 irq ? drq ?	# BusLogic [57]4X SCSI controllers
bha1	at isa? port 0x334 irq ? drq ?	# BusLogic [57]4X SCSI controllers
bha*	at pci? dev ? function ?
scsibus* at bha?

sd*	at scsibus? target ? lun ?	# SCSI disk drives
st*	at scsibus? target ? lun ?	# SCSI tape drives
cd*	at scsibus? target ? lun ?	# SCSI CD-ROM drives
ch*	at scsibus? target ? lun ?	# SCSI autochangers
ss*	at scsibus? target ? lun ?	# SCSI scanners
uk*	at scsibus? target ? lun ?	# SCSI unknown

fdc0	at isa? port 0x3f0 irq 6 drq 2	# standard PC floppy controllers
fd*	at fdc? drive ?

wdc0	at isa? port 0x1f0 irq 14	# ST506, ESDI, and IDE controllers
wdc1	at isa? port 0x170 irq 15
wd*	at wdc? drive ?
#atapibus* at wdc?
#acd* at atapibus? drive ?

ed0	at isa? port 0x280 iomem 0xd0000 irq 9	# WD/SMC, 3C503, and NE[12]000
ed1	at isa? port 0x250 iomem 0xd8000 irq 9	#   ethernet cards
ed2	at isa? port 0x300 iomem 0xcc000 irq 10

sb0	at isa? port 0x220 irq 7 drq 1	# SoundBlaster
spkr0	at pckbd? port 0x61

include	"arch/i386/conf/GENERIC.local"

pseudo-device	loop	1		# network loopback
pseudo-device	bpfilter 4		# packet filter
#pseudo-device	sl	2		# CSLIP
#pseudo-device	ppp	2		# PPP
#pseudo-device	tun	2		# network tunneling over tty
#pseudo-device	ipfilter		# ip filter

pseudo-device	pty	64		# pseudo-terminals
pseudo-device	tb	1		# tablet line discipline
pseudo-device	vnd	4		# paging to files
pseudo-device	ccd	4		# concatenated disk devices

ATCH 2 - dmesg output from a working kernel

NetBSD 1.2G (NEON) #0: Tue Jul 15 22:50:25 CDT 1997
cpu0: family 5 model 1 step 3
cpu0: Intel Pentium (586-class)
real mem  = 41545728
avail mem = 37408768
using 532 buffers containing 2179072 bytes of memory
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 2
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82434LX/NX (Mercury/Neptune) PCI, Cache, and DRAM Controller (rev. 0x01)
PC Technology RZ1000 (IDE mass storage, revision 0x01) at pci0 dev 1 function 0 not configured
pcib0 at pci0 dev 2 function 0
pcib0: Intel 82378IB PCI-ISA Bridge (System I/O) (rev. 0x00)
ILLEGITIMATE VENDOR ID product 0x0140 (SCSI mass storage) at pci0 dev 6 function 0 not configured
ATI Technologies Mach32 (VGA display, revision 0x01) at pci0 dev 14 function 0 not configured
isa0 at pcib0
bha0 at isa0 port 0x330-0x333 irq 11
bha0: model BT-946C, firmware 4.22
bha0: sync, parity
bha0 targ 0: sync, offset 15, period 100nsec
scsibus0 at bha0: 8 targets
sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST32430N, 0090> SCSI2 0/direct fixed
sd0: 2049MB, 3992 cyl, 9 head, 116 sec, 512 bytes/sec x 4197405 sectors
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
lpt0 at isa0 port 0x378-0x37b: polled
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
wd0 at wdc0 drive 0: <WDC AC11000H>
wd0: 1007MB, 2046 cyl, 16 head, 63 sec, 512 bytes/sec
wd0: using 16-sector 16-bit pio transfers, lba addressing
ed0 at isa0 port 0x280-0x29f irq 9
ed0: address 00:40:33:29:e4:36, type NE2000 (16-bit)
npx0 at isa0 port 0xf0-0xff: using exception 16
WARNING: Pentium FDIV bug detected!
vt0 at isa0 port 0x60-0x6f irq 1
vt0: generic, 80 col, color, 8 scr, mf2-kbd, [R3.32]
spkr0 at vt0 port 0x61
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
fd1 at fdc0 drive 1: 1.2MB 80 cyl, 2 head, 15 sec
biomask 4840 netmask 4a40 ttymask 4a42
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
mb_map full
Dave Burgess                   Network Engineer - Nebraska On-Ramp, Inc.
*bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom
"Just because something is stupid doesn't mean there isn't someone that 
doesn't want to do it...."