Subject: Re: problems booting from disk after bootblock installation...
To: None <port-sparc@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 01/12/2003 03:22:15
> [replaced 18G IBM drive with 36G Seagate]

> Anyway, I set up a partition table on the new drive using
> 'disklabel', initialised the partitions using 'newfs', and copied
> over the /, /usr and /var filesystems from the current to the new HD
> using the 'dump' and 'restore' commands without any problems.

Well, without any obvious problems, at least.  Most versions of dump
and restore have problems under some circumstances; see Elizabeth
Zwicky's paper.  (I don't know whether NetBSD dump/restore have
problems.)

> Whenever I attempt to boot off the replacement drive, the message
> 'Instruction Access Exception' appears and the boot aborts.

> This tells me that the bootblock installation process has gone wrong
> somehow...

I agree with you on that.

> Does anyone have any ideas on what could be wrong?

My first guess is that your new root partition includes blocks not in
the first 1G of the disk, your machine's ROM SCSI code is limited to
6-byte CDBs, and - if the partition also includes blocks that *are* in
the first 1G of the drive - you got unlucky when the kernel picked
blocks for /boot to live in.  (Why wasn't this a problem before?
Perhaps the old root partition was entirely in the first 1G.  Perhaps
/boot and the kernel happened to live entirely in blocks below the 1G
mark.)

> Is it an artefact of running NetBSD 1.5.2?  The machine was running
> 1.4.1 until about 6 months ago, when it was upgraded to 1.5.2.

Maybe.  I do think the FFS block allocation code changed recently,
which is relevant because if /boot and /netbsd are copied into / (as
opposed to moved there with mv or equivalent), they are now, I think,
less likely to reside entirely in cg 0 than with the old block
allocation code.  (I must admit, though, that I am not familiar with
the details of the new algorithms, nor am I sure when the new code went
in - if I'm not hallucinating the whole thing, of course.)

Make sure the whole of the boot partition falls before the 1G point on
the drive and reinstall the bootblocks after you've done that.  If this
is already true, or if you still get the error after that, I'm out of
ideas, except for vague unhelpful ones like "maybe you had corrupted
bootblock files when you installed the new bootblocks".

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B