2

I'm in the process of adding a small MS-DOS partition to my computer used mainly for testing old custom hardware with QuickBasic. Yes I still use the parallel port.

I did manage to create a bootable MS-DOS CD but I don't want to always have to insert the CD into the drive every time I want to boot into MS-DOS.

Here is what I have tried and so far with no success:

  1. I mounted the image in Linux as a drive.
  2. I disk-copied the image (using DD) so the raw contents of the image are dumped onto the new partition.
  3. I checked the listing of the destination folder and it appears all files are copied fine (about 1.5MB).
  4. I modified LILO configuration to add the new DOS partition pointing to the correct device path so that on reboot, I have it as an option.

Now when I tried accessing the new partition (after selecting it from the LILO menu), my system first scans the floppy drive (for what I believe is a boot disk?) then I get this message:

 Non-System disk or disk error
 Replace and press any key when ready

Without inserting media, I pressed a key, and I am returned to the LILO menu.

The only solution I could think of which is tedious (since floppy disks are no longer available) is to somehow get a floppy that's bootable and run the sys command.

Is there any way I could somehow execute this sys.com command in a Unix-only shell or is there a better way to make this filesystem boot without doing the song and dance of making a floppy?

Giacomo1968
  • 58,727

2 Answers2

1

Well, if your Ok to boot from floppy then I think booting from USB flash drive would satisfy your needs. You can download open sourced program rufus and create your own bootable flash drive that can start from any computers that was built even 10 years ago.

rufus can build you bootable flash drive with DOS image even if you don't have original image of DOS, but there is some details you need to know, - author offering two images - native DOS and FreeDOS. FreeDOS doesn't always work with some picky DOS program and DOS version actually extracted from machine you running rufus. (To avoid leagal conflict, program extracting DOS image from diskcopy.dll that was present on all windows up to, but not including Windows 10) While it is still legal way to burn it, it not always work if you need true real CPU mode because copy of DOS image from diskcopy.dll is in fact DOS 7+ that removed real-mode support, so DOS boots into protected mode, with HIMEM integrated. More details about it you can find from original author of rufus here. My advise is to find original image of MSDOS 6.22 and burn it with program described above.

Another solution, - is to setup TFTP server and use PXE feature available on many computers. This way you can host MSDOS image on TFTP server and boot directly over network. If you familiar with Linux, you can build PXE server with ISOLINUX and host as many different images as you need and boot to them on demand (very convenient if you need different tools).

Is there any way I could somehow execute this sys.com command in a Unix-only shell or is there a better way to make this filesystem boot without doing the song and dance of making a floppy?

Unix's kernels working in protected mode, running anything from shell won't give you freedom of real mode. If you don't really needed direct access to hardware, then there are packages that emulate DOS: DOSemu, DOSbox that you can try with your programs.

Alex
  • 6,375
0

Putting a CD-ROM image on a harddisk DOS partition won't work. The CD image has a different format.

The harddisk partition (make sure it's the first one) needs to be formatted as FAT, and it needs the DOS bootloader. In principle it should be possible to copy the bootloader with dd, but I couldn't quickly google a suitable image.

So another way would be to start dosemu or dosbox or even qemu with a DOS image, edit the configuration to make that harddrive available to the VM, and then run sys inside the VM.

And of course you can also do all your testing from the VM in the first place, as long as you can make the hardware available to the VM (parallel port shouldn't be a problem). Then you don't need to reboot, and you don't need a special partition for it.

dirkt
  • 17,461