Subject: Re: unbootable new disk?
To: Christos Zoulas <christos@zoulas.com>
From: Steven M. Bellovin <smb@research.att.com>
List: current-users
Date: 11/25/2004 00:12:46
In message <20041124175216.0451C2AC7A@beowulf.gw.com>, Christos Zoulas writes:
>On Nov 24,  9:28am, smb@research.att.com ("Steven M. Bellovin") wrote:
>-- Subject: Re: unbootable new disk?
>
>| In message <I7o3H2.L1o@tac.nyc.ny.us>, Christos Zoulas writes:
>| >In article <20041124042917.6C3481AE9A@berkshire.research.att.com>,
>| >Steve Bellovin <smb@research.att.com> wrote:
>| >>I just tried installing -current (i386, as of today) to a new disk.  The
>| >>resulting system wasn't bootable.
>| >>
>| >>On my first attempt, I said "use the whole disk for NetBSD"; the BIOS 
>| >>told me "no operating system".  I had accepted the defaults on most 
>| >>things, except that I said to use a serial console.  I redid the 
>| >>installation, this time saying that it should create an FDISK label, 
>| >>but with NetBSD the only partition.  I got the first-level boot prompt; 
>| >>I hit '1' for NetBSD.  It said "Err 3".  Rerunning installboot didn't 
>| >>fix it; when I tried running 'disklabel -B wd0' (from the installation 
>| >>CD's shell), I got a usage error for disklabel.
>| >>
>| >>My error?  Or do I need to send-pr?
>| >
>| >Send-pr... Even if it was your fault, the default settings should just
>| >work or provide a more helpful error message.
>| 
>| I'll poke at it again and send-pr tonight, when I next have access to 
>| the machine in question.  Any suggestions on what I should do to get it 
>| working?
>
>According to the mbr.S in sys/arch/i386/stand:
>
>#define ERR_NOOS        '3'             /* Magic no. check failed for part. */
>
>Which means that the fdisk partition has the wrong magic? I am just guessing.
>
>I would escape to shell and:
>
>1. Run fdisk -u and make sure you write in the partition in question
>   so that the magic gets fixed [in case that was broken].
>2. Run fdisk -i to update the mbr; this will use the standard console. You
>   can change it later.
>3. Run disklabel -r wd0 to see if the label is there. If not, you can use
>   disklabel -I -ir wd0 to create it interactively. If it is there, you
>   can use disklabel -ir wd0 to edit it.

One more datum:  if I start booting the old (working) drive, interrupt 
it at the boot prompt, and say 'boot hd1a:netbsd', it tells me "no such 
file or directory".  But 'boot hd0a:netbsd' does the right thing.

I've fsck'd the new drive; it's clean.  If I run md5 on its /netbsd, it 
produces the same output as 'gzcat netbsd-GENERIC.MPACPI.gz' on the 
build machine.  dumpfs tells me it's a UFS1/FFSv2 file system, so I 
tried bootxx_ffsv2 -- no joy. 

		--Steve Bellovin, http://www.research.att.com/~smb