MS-DOS revisited: building a handy utility disk

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A couple of years back I was writing about trying to squeeze Windows PE onto a 128MB/256MB USB thumb drive and how times change – these days I have piles of unused 128MB, 256MB and 512MB USB sticks that have become redundant because I have larger portable data storage devices available.

Then, as I was preparing to image a PC, I found myself using 1.44MB floppy disks and it all got very frustrating. Just enough to boot the system used half the disk and that was without any utilities – the version of Symantec Ghost that I used recently won’t even fit on a floppy disk. So, I decided to put one of my old USB sticks to use as an “ultimate boot disk” – much easier to update than the CD-based versions we were putting together a few years back.

Despite having a pile of smaller USB thumb drives doing nothing, I decided to use one of the 1GB sticks that EMC were giving away at the Windows Server 2008 launch (plenty of space for expansion).

The first step is to make the drive bootable – I used the HP USB disk storage format tool v2.1.8 (SP27608) to format the drive and put a basic Windows ME boot subsystem on it (using a disk created with the Windows XP disk format tool as a reference image) but there are other options.

Why Windows ME? Well, because it’s easy – Windows XP creates ME boot disks – and because it was a prerequisite for the the next stage – network booting using Brad Driver’s universal TCP/IP network boot disk. There are many sites on the ‘net that offer network boot disks (including bootdisk.com) but the one I chose manages to include a huge range of drivers and it fits on 1.44MB floppy.

Basically, the disk boots a very basic operating system before expanding itself to a RAM disk and reloading the command shell. USB device support is still experimental (at v6.2) but after much experimentation I worked out that I could use the makedisk script provided with the download but in order to avoid a loop of pressing CTRL+ALT+DEL to restart the computer I needed to edit the config.sys file so that the line shell=n:\command.com /e:4096 /p used c: instead of n: for the command interpreter (my drive was formatted as USB-HDD, this may not be necessary for other USB boot options) and I also removed the hidden attribute from command.com to avoid a file not found error (that didn’t seem to affect the operation of the disk in any other way). After this, the NIC is auto-detected and an appropriate network driver loaded, obtaining TCP/IP information from DHCP and logging on to the network.

With network booting working well (at least on the IBM ThinkPad T40 that I tested against – older machines may not have the necessary BIOS support), I added an autorun.inf file for when I use the drive within Windows. This file includes the following items and really just sets the drive icon and description:
Custom USB drive icon
[autorun]
label=USB Network Boot Disk (1GB)
icon=shell32.dll,12

Finally, the whole purpose of this disk is to run some utilities. At this point you can name your own poison but I created a C:\Tools folder (C:\Utilities is too long for 8.3 file naming, although C:\Utils could have worked) and started to pile in my favourite 16-bit .COM and .EXE files – I’m sure the list will grow substantially over time. There may be some issues with memory management but there is plenty of space to add a variety of tools and theoretically there could be multiple boot options too.

It’s been a long time since I played around in MS-DOS and there is very little call for it these days (I should really be doing this with Windows PE) but every so often it’s good to return to your roots.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.