Subject: bad-block forwarding on mscp disks
To: 'port-vax@netbsd.org' <port-vax@netbsd.org>
From: James Lothian <simul8@simul8.demon.co.uk>
List: port-vax
Date: 08/24/1998 12:20:42
It seems at first sight as though there is no public-domain way of forwarding 
bad blocks that appear on an mscp disk. Sometime last year, my RA81 had reached
the stage where it was more or less unusable due to bad blocks, and I started 
looking for a solution.

On the 4.4bsd-lite cd, in /usr/src/sys/vax/cassette (or thereabouts) there is a 
file called rabads. Running strings over it reveals that it is a stand-alone utility
for mscp disk maintenance. It doesn't have an a.out header, so it can't be 
loaded directly by /boot. The first two bytes of the file are zeroes (halt
instructions). I forged an a.out header to fool /boot into loading the file. I set
the start address to 2, to skip the halts. Then I tried loading it from the boot
prompt. It halted. However, doing S 2 from the console set it running properly.
There are various commands, including 'help'. Some are password protected;
the password is 'qwerty'. The most useful command is 'init', which does a read-
only bad-block scan of the disk, and forwards any bad blocks it finds, attempting
to recover the data in the process. The program seems to support RA80, RA81,
RA60 disks on uda50, kda50 and kdb50 controllers, and RD51-53 on RQDX1-3
controllers. There may also be support for RC25s. I don't know what models
of CPU it supports. It forwarded the bad blocks on my RA81 without any bother, and the 
disk is now happy again (and so am I!).

I'm sure that with a bit of effort, a more hassle-free way of loading the program
could be figured out.

Hope this is useful,

James