Making a bootable CD-ROM from scratch

  Bootable ISO
Download


I've been experimenting with the mkisofs tool to make bootable ISO images for burning onto CD. This tool can be downloaded from the CDRTOOLS site (make sure you use the latest *stable* release).

The command line I'm using is:
mkisofs.exe -J -N -l -v -relaxed-filenames -b Floppy.img -volid "BootCD" -o "BootCD.iso" CDfiles

...where "CDfiles" is the name of a folder containing the floppy disk image (named "Floppy.img") as well as anything else you want to put onto the CD-ROM.  I'm doing this from a command prompt in Windows 7 and it seems to work very well.

To make the CD bootable I've been using my bootable floppy image.  This causes the CD-ROM to boot as if it were a floppy disk. You'll see the files inside the disk image appear as if it were a real floppy drive when the CD boots up. I've included the the generic CD-ROM drivers, and you should see the actual CD-ROM appear as drive X:.

You'll also get a 10Mb RAM drive, giving you some *writable* disk space to play with.  This version simply boots to a basic DR-DOS system, but I'm blogging it since it may come in handy for other purposes...

You can burn the resulting ISO image to a CD, or simply try it out by attaching the ISO in Virtual PC or VirtualBox and booting from it.  Here is a screenshot of the ISO booted in Virtual PC:

The ISO booted in Virtual PC

DR-DOS boot floppy image

 Boot floppy image
Download


One of the results of all this DR-DOS memory stick work was that I also created a bootable floppy disk image.  I created it using Microsoft Virtual PC ... but the resulting disk image would be bootable in VirtualBox too.  I manually edited the xml files to attach the virtual floppy disk in Virtual PC, as described here. This disk image just boots DR-DOS with a CD ROM driver, some memory management and a RAM Disk driver.

My next step will be to use this floppy disk image to build a bootable CD.  I will then use that as the basis for my revised PDP-11 Live CD.  I'll probably use SIMH for DOS since I don't expect that I'll be allowed to redistrubute the demo version of Ersatz-11 (although I think that Ersatz is a better emulator).

Enhancements to the DR-DOS boot stick

I've made a few enhancements to the DR-DOS boot stick that I made, so here are the details. Just copy the files mentioned to the root of the boot disk.  I believe that everything used is free for non-commercial use.  Here goes:

The OAKCDROM.SYS generic CD-ROM driver (will work with most IDE CD-ROM drives) I got my version from here. Open the zip file and look inside the "Floppy" subfolder.  Just copy OAKCDROM.SYS to the boot disk.

In addition to the CD-ROM driver, I've used a MSCDEX replacement called SHSUCDX, which is linked to from here.  I've downloaded the "shcdx33e.zip" version. Just copy the SHCDX33E.COM file to the boot disk.

For memory management I've added two things:
  HIMEMX - copy both EXE files
  CWSDPMI - just copy CWSDPMI.EXE (in the bin folder)

And finally, I've added a RAMdisk driver... we need to copy the SRDISK.EXE and SRDXMS.SYS files.

To get all those files to work we also need to edit AUTOEXEC.BAT and CONFIG.SYS:

AUTOEXEC.BAT
-----------------
CWSDPMI
SHCDX33E /d:CD001 /l:X
SRDISK 10240 /E
%SRDISK1%:

CONFIG.SYS
--------------
LASTDRIVE=Z
DEVICE=himemx.exe
DEVICE=OAKCDROM.SYS /D:CD001
DEVICE=SRDXMS.SYS

So now if we boot from the memory stick we'll have X: mounted as the CD-ROM (if you have one) and the current drive will be an empty 10Mb RAM drive.  We also have better memory management.  It should be a reasonable DOS system, and to the best of my knowledge everything I have used is free for non-commercial use - good for the hobbyist that wants to run a DOS machine.

Emulating from DR-DOS on a memory stick

I decided that it would be cool to have an emulated PDP that was bootable from a memory stick.  Then I could simply boot from a USB pen drive straight into a PDP-11.  To do this, I decided  to use a different emulator than SIMH - Ersatz-11.  It's free for hobbyist use.  Not only does Ersatz-11 have a good DOS based emulator (meaning that you don't have to boot into Windows first) but I believe that it will give access to the physical COM ports, althought I have not tried that feature yet.  I tried to get it to run under FreeDOS, but whilst Ersatz-11 would start; I could not get it to read any disk images.  So in the end I switched to DR-DOS, which was harder to install... but ran the emulator without any errors.

Here are some brief notes on how I got it working (from a Windows 7 machine):

- Make an empty FAT formatted USB pen drive bootable into FreeDOS with unetbootin
  Just select FreeDOS 1.0 under 'Distribution', and then select your pen drive at the bottom and click OK.
  This was the easiest way I found to make a DOS type boot disk, but we don't actually want FreeDOS.
- Now, make a DRDOS folder on your pen drive and save the DR-DOS binaries in there
  [I'm using version 7.01.06]
- Make a DRSYS folder on the pen drive and save the DR-DOS varant of FreeDOS SYS binaries in there
- Download and copy the Ersatz-11 DOS files onto an E11 folder on the pen drive
- Copy your own PDP-11 boot disk image to your pen drive

Now we can reboot and start FreeDOS from the pen drive.  When asked, boot into FreeDOS as a simple LiveCD, we don't need more than that.  It should boot to drive A: and your pen drive will appear as another drive (for me, it was drive C).  Now try the following (WARNING! this assumes your pen drive is now C, change the drive letter if your one is different, don't blame me if you mess up your hard disk):

 C:
 cd DRSYS
 sys C:\DRDOS C:\
 cd \

 copy C:\DRDOS\*.* C:\
 del C:\*.img
 del C:\ub*.*
 del C:\*.cfg
 del C:\*.c32

The pen drive should now be bootable in DR-DOS rather than FreeDOS, so reboot and start from the pen drive again.  [There will be a LDLINUX.SYS file left over from FreeDOS that we can't delete right now.  If you want to, come back and delete this file by plugging your pen drive into another machine with a better OS.]

You should now be able to start Ersatz-11, with something like this:

cd E11
E11
MOUNT DU0: C:\boot.dsk
BOOT DU0:

That's it!  You should be able to emulate a PDP-11 under DR-DOS.  In Ersatz-11, hit <SHIFT>+<ENTER> twice to stop emulating, then type 'exit' and press enter to quit to DOS.  If you put the 'mount' and 'boot' commands into a file called E11.ini inside the E11 folder and create an autoexec.bat file in the root of the pen drive to start the emulator, the pen drive should automatically boot into the emulation from now on.

Yet another emulated PDP-11

I have discovered that the Ersatz-11 emulator will even work on Windows Mobile, if you use DOSBox.  Here is an HTC tytn II mobile phone pretending to be a PDP-11 and running RT-11.  Is this the smallest piece of hardware to ever run the RT-11 operating system?

RT-11 running on an HTC tytn II

But it is VERY slow.  It took about 30 minutes to draw my ASCII mandelbrot.  So it's not exactly practical.  As you can see there are also some screen rendering issues, although I could probably fiddle with more settings.  But I think that it's one of those things where you go "oh yeah" ... and then never try it again.

PDP-11 on DR-DOS/OpenDOS

I have been busy trying to get the Ersatz-11 emulator to run on DR-DOS, which seems to work OK (more about that another time).  Then I decided to try getting the whole thing to boot from CD.  This would give me a PDP-11 Live CD.  Anyway, whilst having a rummage round in my pile of old junk hardware I found a motherboard given to me by my friend James.  It has 32Mb RAM on board and a 200MHz AMD K6 processor.  I don't have any IDE hard disks, but I do have an old CD drive.  So I started wondering if I could turn this lot into a PDP-11.  This is the machine on the bench:

AMD K6 motherboard

So the next thing to do was to see if it boots, so I tried a linux CD I had lying around:

Booting linux on the AMD K6

...which works a charm.  So the next thing was to try my PDP-11 live CD.  Guess what?  It only works:

PDP-11 live CD in action

This is sooo cool.  You can see I'm running my ASCII mandelbrot program in celebration.  In fact, this is so cool that I've gone and bought a brand new Intel D410PT motherboard and I intend to rig it to run as a PDP-11.  I expect that will fly.  I will use a solid state disk and have old software running on new hardware.  In the meantime this AMD K6 based prototype easily outperforms my real PDP-11/53.

Blank floppy image for VirtualBox

Here is a way to make a blank floppy disk image that you can use in Oracle VirtualBox.  It's a hacked around version of this.  You just make a batch file with these DOS commands in:

if exist blank.img del blank.img
for /l %%i in (0,1,31) do echo 01234567890123456789012345678 >>blank1.img
for /l %%i in (0,1,35) do type blank1.img >>blank2.img
for /l %%i in (0,1,39) do type blank2.img >>blank.img
del blank1.img
del blank2.img

After running it, you end up with a working disk image, and here is a version that I then reformatted inside a virtual machine.  I've since found that you can use these images in Windows VirtualPC too, although there is no UI to attach them, you have to edit the xml files of your virtual machine manually.

Two winchester drives

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.

Adding Basic-11 to RT-11 in SIMH

This post continues with my SIMH RT-11 tutorial... To add Basic-11 into the mix I've been using this image of the "Languages Master" RX50 floppy disk.

Download that disk image to the folder where you've saved pdp11.exe.  Next, we're going to add that floppy to SIMH.  We can do that by editing the ini file.  Just before the line that reads "boot rl0", we need to add this line:

attach rl1 languages.dsk

This will mean that in RT-11 the Languages Master disk will appear as "DK1:", whereas the boot disk is "DK0:", the RT-11 install disk.  Test it out by running pdp11.exe and typing DIR DK1: (and pressing enter) at the command prompt.  You should see the directory listing of the languages master disk.

Before we try and install Basic, we need to make sure that we're using the RT-11 extended monitor, so type in these commands into RT-11:

copy/boot dk0:rt11xm.sys dk0:
boot dk0:

This should restart RT-11 in the extended monitor (RT-11XM).  When this disk is booted in future it will remember this setting.  Now we can actually install Basic, enter these commands:

copy dk1:b*.* dk0:
copy dk1:*.bas dk0:


...you should see the files being copied to your boot disk.  Now we're ready to try Basic-11.  Try this command:

basic

You should see this:

BASIC-11/RT-11 V02-03
OPTIONAL FUNCTIONS (ALL, NONE, OR INDIVIDUAL)?

I normally respond by typing ALL (in capitals), in which case Basic responds with "READY".  We have Basic!

We can now type in Basic programs, try this one:

10 FOR I=0 TO 12.6 STEP .2
20 PRINT TAB(30+COS(I)*30);"HELLO WORLD"
30 FOR S=0 TO 1000 \ NEXT S
40 NEXT I
50 GOTO 10
RUN

Press <CTRL>+C quickly twice to stop the program when you've got bored.

To leave Basic-11 the easy way, just type BYE at the READY prompt.

[EDIT: if you're looking for some information on Basic-11, I've posted some documents here.]

[ANOTHER EDIT: the PDP11.co.uk website, where I originally got the image of the languages disk from seems to have been shut down. I have changed the link above to a cached version from the wayback machine. And if you want to see the complete software page from PDP11.co.uk then you can still see it here.]

Starting RT-11 in SIMH for the first time

This post continues my SIMH RT-11 tutorial... When you start RT-11 from the install disk the first time, you'll see some text like this:

Welcome to RT-11 V5.3

You have bootstrapped the RT-11 Distribution Disk.  Use this disk to
install your RT-11 system, then store it in a safe place.

RT-11  V5.3  provides an automatic installation procedure which will
back up your distribution disk and build a working system disk which
should  be  used for your work with RT-11.
This  working  system disk will only  contain  the  RT-11  operating
system.  After  the  RT-11  installation  is  complete,  follow  the
installation instructions  packaged  with  any optional languages or
utility software which you will be using.

Press the "RETURN" key when ready to continue.


I usually try to skip the automatic install procedure, since I'm more likely to learn stuff if I do all the setting up by hand.  So after pressing RETURN, and getting asked "Do you want to use the automatic installation procedure?" I type "NO".  After pressing RETURN a couple of times, we should be booted into RT-11.

Remember, if you ever mess up your boot disk and things go wrong, you can just re-copy a fresh version of rtv53_rl.dsk and we will get back to the start point above.