Subject: Re: bad-block forwarding on mscp disks
To: James Lothian <simul8@simul8.demon.co.uk>
From: Anders Magnusson <ragge@ludd.luth.se>
List: port-vax
Date: 08/24/1998 13:44:08
> 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.
Here's the problem: The first 2 bytes is 'register save mask', so in the
a.out header it must be set to 0 to actually start at address 2 :-)

> 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!).
> 
Actually, I've never heard about this program before, but because it's
in 4.4-Lite it can be redistributed. It's probably one of DEC's service
programs that is distributed.

> I'm sure that with a bit of effort, a more hassle-free way of loading the program
> could be figured out.
> 
I think it's wonderful! It is probably rather easy to attach an a.out
header to it so that it can be used and distributed with the miniroot.

-- Ragge