NetBSD Problem Report #45197

From dan@mcmahill.net  Sun Jul 31 15:42:53 2011
Return-Path: <dan@mcmahill.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 55DA963BEEB
	for <gnats-bugs@gnats.netbsd.org>; Sun, 31 Jul 2011 15:42:53 +0000 (UTC)
Message-Id: <20110731154244.A1E6026CB1E2@bondage.mcmahill.net>
Date: Sun, 31 Jul 2011 11:42:44 -0400 (EDT)
From: dmcmahill@NetBSD.org
Reply-To: dmcmahill@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: failing to load secondary boot 
X-Send-Pr-Version: 3.95

>Number:         45197
>Category:       port-amd64
>Synopsis:       primary bootstrap can't load secondary from hard drive
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 31 15:45:00 +0000 2011
>Last-Modified:  Sun Feb 26 18:15:02 +0000 2012
>Originator:     Dan McMahill
>Release:        NetBSD 5.9.55
>Organization:
NetBSD
>Environment:


System: NetBSD computery 5.9.55 NetBSD 5.9.55 (GENERIC) #0 Tue Jul 26 23:38:21 UTC 2011 builds@b7.nnetbsd.org:/home/bilds/ab/HEAD/amd64/201107262140Z-obj/home/builds/abs/HEAD/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

Downloaded a recent ISO from the releng server.  Burned a CD.  Booted the
CD and did a fresh install onto a brand new hard drive.  The install went
find as near as I could tell (looked just like any other sysinst install I
have done over the years with some of the normal progression of sysinst).
Used the whole hard drive for netbsd.  

After completing the install, I removed the CD and tried to boot from the hard
drive.  The primary bootstrap loaded and ran.  But the primary bootstrap
fails to load the secondary.

The message left on the screen is:

Fn: disnk
NetBSD MBR boot

NetBSD/x86 ffsv1 Primary Bootstrap
Boot failed (errno 5): Can't open /boot

Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key

I rebooted from the CD and mounted wd0a to /mnt.  I then verified that
/boot, /usr/mdec/boot (those are on the CD) both are identical and match
/mnt/boot and /mnt/usr/mdec/boot.  So my secondary boot program are all
there and should be ok.  

fdisk wd0

shows NetBSD for partition 0 and the others (1-3) unused.  For partition
0, it says

  start 63, size 976773105 (476940 MB, Cyls 0-60801/80/63), Active

I tried re-running installboot manually with:

installboot -v -o timeout=20 /dev/rwd0a /usr/mdec/bootxx_ffsv1


If I boot from the CD into the boot program and just type
 "dev", I see:

 disk hd0 size 465 Gb
 disk hd1 size 74 Gb
   hd1a(NTFS) hd1b(NTFS)
 disk fd0
   fd0a
 disk fd1
   fd1a
 default cd0a

The 465 Gb one is the SATA drive I did the install on.  Shouldn't
I see hd0a listed since there is a FFS partition there?  Is there
some chance that the primary bootstrap is not able to figure out
how to actually access this drive?  That could explain why it fails
to load the secondary.

If I boot into sysinst, pull up the utility menu and then run
/bin/sh I can run disklabel wd0 and see that wd0a is 4.2BSD. 
Not sure why the "dev" above didn't show hd0a.  Also trying

     boot hd0a:netbsd

     fails with

     open hd0a:netbsd:  Input/output error
     boot: hd0a:netbsd; Input/output error


I did get an erratum 101 on CPU0 so I'll try to find a bios upgrade.  Is
there any chance that is related to this problem?

the bits of dmesg which correspond to the sata drive are:

satalink0 at pci1 dev 11 function 0: Silicon Image SATALink 3114 (rev. 0x02)
 [snip]
atabus0 at satalik0 channel 0
 [snip]
wd0 at atabus drive 0
wd0: <ST3500413AS>
wd0: drive supports 16-section PIO transfers, LBA48 addressing
wd0: 465 Gb, 969021 cyl, 16 head, 63 sec, 512 bytes/sect x 976773168 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(satalink0:0:0) using PIO mode 4, ultra-DMA mode 6 (Ultra/133) (using
     DMA)


>How-To-Repeat:

>Fix:


>Audit-Trail:
From: Dan McMahill <dmcmahill@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-amd64/45197: failing to load secondary boot
Date: Wed, 10 Aug 2011 17:37:01 -0400

 As a note, I tried using a 5.1 release CD to boot from and when I get to
 the boot prompt from the 5.1 CD, I'm able to then boot off of my hard
 drive.  So... something is clearly messed up on that -current build as
 I'm not able to use the -current CD to get a boot prompt and then boot
 from hard drive.

 Then once I found I could boot using the 5.1 CD, I booted to sysinst and
 reinstalled the boot blocks on the hard drive and now can boot from the
 hard drive.  I suppose this means either boot, installboot, or
 bootxx_ffsv1 is broken as opposed to something else. (hardware for example)

 -Dan

From: dieter roelants <dieter.NetBSD@pandora.be>
To: gnats-bugs@NetBSD.org
Cc: Joerg Sonnenberger <joerg@netbsd.org>
Subject: Re: port-amd64/45197: failing to load secondary boot
Date: Sun, 26 Feb 2012 19:14:29 +0100

 On Wed, 10 Aug 2011 22:55:04 +0000 (UTC)
 Dan McMahill <dmcmahill@NetBSD.org> wrote:

 >  Then once I found I could boot using the 5.1 CD, I booted to sysinst and
 >  reinstalled the boot blocks on the hard drive and now can boot from the
 >  hard drive.  I suppose this means either boot, installboot, or
 >  bootxx_ffsv1 is broken as opposed to something else. (hardware for example)

 I have what looks like the same problem on my oldish server. Both
 bootxx_ffsv1, and boot are affected, installboot is not. I narrowed the
 start of it down to last june 16th, probably one of the libsa commits:

 	Add an optional MD calling convention flag for use in libsa
 	when space optimisation is critical. Use this on i386 to switch
 	to register passing calling convention for the file system
 	entry points and most assembler call backs that have to
 	preserve at least 3 registers.

 Dan, did you ever find/have luck with the BIOS update? I also have:

 cpu0 at mainbus0 apid 0: AMD Opteron(tm) Processor 244, id 0xf5a
 cpu0: erratum 101 present
 cpu0: WARNING: errata present, BIOS upgrade may be
 cpu0: WARNING: necessary to ensure reliable operation

 kind regards
 dieter

>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.