Making bootable ISO images

I know for most people using mkisofs is second nature, but I needed to get a machine running MS-DOS without floppies… and it had to be on the bare metal.. Oh joy.

Now I’ve kind of done this before but I’ve never gotten it to preserve the directory structure.  It seems that it’s important to specify some output…

The ‘fun’ thing is that I was able to use virtual pc to build the boot diskette with IDE cdrom drivers, and make sure it works in that it mounted the CD and set the path there…

So I have extracted my MS-DOS install from the floppies into a directory on my pc and I keep the file dos622_1.img in the same directory so mkisofs can place it in the image.  Then it’s just a matter of running:

..\mkisofs.exe -o ..\x.iso -J -r -v -V test_disk -b dos622_1.img .

And I get an x.iso that can boot MS-DOS, and has all the dos commands in place, I can partition & format the hard disk and copy DOS into place.

It’s not much to see, but if you need legacy stuff it’ll be a life saver.. and I know I’ll end up losing the flags and needing them again!

Qemu 0.90 patched for NeXTSTEP 3.3 i386

Patches for Qemu 0.90 are available here:
Files needed to Build and patch Qemu 0.90 for NeXTSTEP on Windows : Free Download, Borrow, and Streaming : Internet Archive

The busmouse patch still survives here.
The win32 exe is here.

A PowerPC macosx 10.4 binary is available here:
http://www.vaxenrule.com/NextSTEP%2033/qemu-0.9.0-osx-10.4-PowerPC

This moves the SoundBlaster to IRQ 7, and incorporates a bus fix & busmouse addition. Remember to remove the parallel port for this to work correctly. Tested with NeXTSTEP 3.3

Why all the patches, you may ask? Well for some reason NeXTSTEP is unable to correctly drive the mouse in Qemu. Nobody has tracked it down, but I suspect it’s some weird issue with the BUS… Anyways I found this busmouse patch ages ago, and I’ve just been finagling it for ages so that it will keep on working. I know that there are a hand full of enthusiasts left, but I figure that for all interested they would appreciate this.

Running Xenix on qemu

Neither Bochs nor Qemu can boot the Xenix floppy diskettes all the way. Virtual PC & VMWare seemed to have no luck when the kernel transitions to protected mode. While on the way to work I had an idea. What if you had an old hard disk and a machine capapble of installing? Simply imaging the hard disk may be enough, since after that point you don’t need any floppy disks!

So this is what I have to show for the work today:

Freaking awesome, if I do say so myself.

OK, now how to do it? First you need an existing system running Xenix. If you have any plans on migrating an existing installation take note! This will preserve your install, just don’t format! On the Xenix boot screen take note of the geometry of the disk. We will need the geometry for later. Although I did a test boot without it, its a good thing to preserve it.

For virgin users, you will need a small disk to install on. I had a 2.5 GB disk that was too big, and 132MB disk that worked fine. I used a dell pc with 2 ide controllers for this. The longest task honestly was installing Xenix. I think that ran about 20 minutes. Once I was done, shutdown xenix, and put the disk in a machine running Windows (Linux fans can put it in their box, and just dd the Xenix disk into an image). Us poor Windows users don’t have dd. Anyways take not of what disk # it is, as Windows of course will not assign it a drive letter since it does not understand Xenix’s filesystem.

As you can see it’s disk #2 in this computer. Ok now we need to read the disk and write it into a disk image. I couldn’t find a util offhand to do it, so I wrote one real quick. Here is the source code, you’ll need a C compiler on your PC to compile it. I guess I could ‘neaten it up’ some, but for now here you go:

Source code

Executable

Yes I know its horrible, and blogger does a wonderfull job of formatting my program. Anyways compile it & run it. Now you’ll have a disk image of your hard disk!

Now for the fun part, running Xenix! We simply specifiy the hard disk geometry that we got earlier, and pass it the disk image that we created! I’m using an Quantum Pro drive ELS with the following geometry:

919 Cylinders
16 heads
17 bytes/sector

That translates into the following command:

qemu -M isapc -m 16 -hda xenix386-2.3.4.disk -hdachs 919,16,17 -L .

 

Let the good times roll!

–Update from 2011!

It is *NOW* possible to install Xenix in Qemu 0.14.0. You can read more about it here.