Virtualise, Wipe and Reinstall

by david 7. February 2013 19:02

My home PC had been getting slower over time ... over the years I have installed a lot of software that I don't really use anymore, and there were still a bunch of Lenovo tools on there from when it was new. So it was time for a clean reinstall - a reformatted disk with a fresh copy of Windows can work wonders. But I still wanted a full backup of the old machine, just in case. So I thought that it would be good to virtualise the whole machine before I wiped it. Then I could always go back to the old version if I needed anything. Which is normally the case...

Anyway, I used the excellent Disk2VHD tool which can virtualise a hard disk whilst it is still running. So you can create the VHD on the machine that you're virtualising. Very cool.

So I'm now using VirtualBox to boot up the Virtual Hard Disk which has been created. It was a very nice way to achieve a clean install without losing anything, and it was pretty painless. I might do the same thing on my laptop actually...

Two winchester drives

by david 13. April 2011 21:49

I thought that it's about time I posted another photo of my PDP-11.  Here are both my winchester disks hooked up:

Two winchester disks and my PDP-11

At the moment I'm in the process of copying the original install files onto the newest disk, so I will have the *full* set of RT-11 files on there.

XXDP booting via ODT

by david 18. March 2011 21:00

So I needed to format the Winchester Disk in my PDP, and since RT-11 cannot format these types of fixed disk I needed to use the disk formatting program in XXDP.  XXDP is a small operating system made by DEC for diagnostics.

There is a good tutorial on how to make an RX50 XXDP boot disk here.  That is what I've used anyway.  However, I found that the resulting disk image was bootable in the SIMH emulator, but a real disk would not boot in my uPDP-11/53.  I don't know why yet, the disk starts the boot process, but then the machine halts.

An alternative is to boot the machine from a tape image and use the vtsever program on another machine to pretend it is a tape over a serial line.  Unfortunately, I have not managed to get vtserver to work at all.  Maybe it doesn't like Windows 7.  I'll come back to vtserver another time...

Still, this page got me to thinking there may be another way.  Maybe I could boot my working disk image of XXDP in SIMH and then dump the memory to disk.  Perhaps, this memory dump could be restored to a real PDP and then I could use XXDP from there...

Indeed you can... if you want the file I created, it's here.  But here are some notes about how to do it yourself:

- Boot an XXDP disk image in SIMH
- When the OS is running, type "R ZRQCH0" at the command prompt
- You should now see something like this:

DRSSM-G2
ZRQC-H-0
RQDX3 Disk Formatter Utility
UNIT IS Formattable Winchester (RDnn) or Floppy (RX33) Drives
RSTRT ADR 145702
DR>

- We'll need the RSTRT ADR (restart address).  Make a note of it, for me it was 145702
- Press <CTRL>+E, to halt the simulator, you should then get a "sim>" prompt
- Enter this command: "ex @dump.txt 0-157777"
- That will save the first 56k of memory to the file called dump.txt (in the folder where SIMH was running from)
- Close SIMH, we've got what we needed
- The memory dump now needs to be converted, so that it can be loaded via ODT
- Here is a quick and dirty C# program that will convert the file to ODT format:

static void Main(string[] args)
{
    StreamReader sr = new StreamReader("dump.txt");
    StreamWriter sw = new StreamWriter("odt.txt");

    string line;
    char[] sep = { ':' };
    sw.Write("0/");
    for (; ; )
    {
        line = sr.ReadLine();
        string[] split = line.Split(sep);
        sw.Write(split[1].TrimStart() + (char)10);
        if (sr.EndOfStream) break;
    }

    sw.Write((char)13);
    sr.Close();
    sw.Close();
}

- Use the above program, after that you should now have a converted file called "odt.txt"
- Boot the real PDP and go into ODT.  Send "odt.txt" over the console serial line
  NOTE: to be safe, I used Tera Term Pro to send the file and set some delays:
     100ms delay after each line
     25ms delay after each character
- Be patient.  It took me about 1.5 hours to send this file via ODT!
- When the whole file has been sent, enter the Restart Address followed by 'G', eg:
  145702G
- You should now be in XXDP, with the disk formatter loaded.  You should see a DR> prompt.
- Now just use the ZRQCH0 program.  I followed the formatting procedure here.

There are many improvements that I could make to this, but it worked first time; so I'm leaving it alone.

Making an RT-11 v5.3 disk image

by david 26. February 2011 19:41

I realised that if I could get a floppy disk that booted into RT-11 v5.3, then I might be able to add the DECUS C compiler and have a boot disk and C compiler. This is the procedure I used to make my first RT-11 v5.3 boot disk.

Using SIMH, boot into RT-11 v5.3, making sure that you have blank RX33 disk image attached as DK1:. Then use these RT-11 commands to copy the files to the floppy disk image:

COPY/SYS SY:*.SYS DK1:*.SYS
COPY SY:VBGEXE.SAV DK1:
COPY SY:DIR.SAV DK1:
COPY SY:BUP.SAV DK1:
COPY SY:DUP.SAV DK1:
COPY SY:IND.SAV DK1:
COPY SY:LINK.SAV DK1:
COPY SY:KEX.SAV DK1:
COPY SY:PIP.SAV DK1:
COPY SY:V5USER.TXT DK1:
COPY SY:STARTX.COM DK1:
COPY SY:UCL.* DK1:
CLOSE

Then, shut down SIMH. We'll next use PUTR to make the RX33 disk image bootable (this assumes that you have called the image rx33.dsk and that it is in the same folder as PUTR):

MOUNT a: rx33.dsk /rx33 /rt11
BOOT a:
     RT11XM
     DUX
DISMOUNT a:

That's it. The RX33 image should now be bootable. Try it out in SIMH to make sure.

About the author

David

I'm a C# developer having worked with .Net since it was in beta.  Before that I mainly worked in C and C++.  I have been developing commercial software for more than 20 years.  I also mess around with microprocesors, but that's just for fun.  I live near Cambridge, England and at the moment I'm contracted to one of the departments at Cambridge University.

Tag cloud