For System Recovery, DOS Is Still Boss
Even with all its faults--and there are many, starting with a general industry lack of support--DOS is still the preferred operating environment for building a rescue CD to help bring
August 4, 2006
![Network Computing logo Network Computing logo](https://eu-images.contentstack.com/v3/assets/bltde8121fc52c5c8f3/blt3f3d0318f746b1c2/65a530e4187606040a1d8b8c/placeholder.png?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
In the past year alone, I've had four near-fatal drive failures, each on a different system. To alleviate some of the pain associated with recovering from these kinds of problems, I've been working on building a self-contained, multiboot rescue CD that I can use to bring up a crippled system and perform emergency surgery.
This includes tasks such as repairing a broken partition table, cloning a failing drive to a new disk before the old one dies completely, or simply changing a corrupted file that is preventing the operating system from booting.
There are actually a number of options for building these kinds of things, depending on what you are trying to do. If you just want to fix up a Windows installation, you can use the Windows XP Recovery Console and a boot CD to bring a crippled system far enough along to do rudimentary repair work. (Fred Langa shows how to turn the recovery console into a functional command-line interface in this article. )
If you want something more than that and are willing to invest some sweat equity, you can put together a relatively full-featured Windows-based graphical repair environment by using Bart PE or one of its derivatives. (Fred talks about Bart PE in this article.)
There are also several different Linux-based recovery CD images that are useful for repairing a variety of problems. SystemRescueCD and Recovery Is Possible are two distributions that are designed for general system recovery. Most of the general purpose Linux distributions also provide a recovery image that is specifically optimized for fixing their own installations too.Another option here is to use plain old DOS as the basis for a recovery CD. As with the other platforms, there are a couple of pre-made recovery toolkits that you can use for this, such as Ultimate Boot CD and 911 Rescue CD, but it's also pretty simple to build your own.
If you want a single recovery CD that can be used to address the widest array of problems, you'll probably need to incorporate Linux, Windows XP, and DOS into your build. For example, most of the hardware management tools use DOS as a boot loader, but recovering from system configuration errors often requires full access to the underlying file systems, which typically means booting up a thinned-down version of the installed operating system.
In my case, I chose to put the emphasis on DOS, while also using bootable images of Windows XP and Linux for those times when the DOS tools are insufficient. The reasons? DOS boots faster than any of the other operating systems, meaning that I can get into a busted system quicker. Also, since DOS relies on the system BIOS for most of its device support, I usually need to load only a couple of drivers, and those will easily fit on a floppy boot image, which can't be said for any of the other platforms. The complete lack of any kind of system security is another benefit, since I don't have to worry about passwords or file system privileges.
On the other side of the coin, however, working with DOS leads to the unavoidable and unmistakable realization that you are essentially working with abandonware; the operating system is dead for all practical purposes, and the number of available tools is continually diminishing. Access to modern hardware devices can also be tricky, network services are practically non-existent, and even if you get everything working memory management is absolutely miserable.
But despite the shortcomings, the benefits to using DOS for recovery purposes still outweigh the negatives, and for some things it's downright mandatory. Having said that, if there were a better alternative, I would be running toward it.The first reality you run into with this kind of project is the simple fact that it's somewhat hard to find a reasonably modern version of DOS that's still being sold and supported. There are still plenty of people who will take your money, but getting something useful in return is another matter entirely.For example, you can still buy IBM PC-DOS 2000 (the Y2K fixer release) from amazon.com. But it hasn't been updated since 1999 and doesn't have support for FAT32 partitions; this is almost mandatory for workstations that dual-boot between XP and Linux and share data between them. Meanwhile, a company called DeviceLogics is now selling DR-DOS 7.03. This is from the same branch of DR-DOS that was also marketed under the Novell DOS and Open DOS brand names at other points in its life, but it can't manipulate files on FAT32 file systems either.
Another option is to use real MS-DOS, but doing so practically requires that you use the DOS that is included with Windows 98 SE, which isn't sold or supported by Microsoft anymore, although it can still be found on eBay. Don't try to use WindowsMe for a recovery CD platform: Microsoft was so embarrassed by the command line that they stripped all of the useful code out of the DOS utilities for that release, making it completely unusable for this kind of project.
The only version of DOS I know of that's still being actively developed and supported is a package called ROM-DOS, which is sold by a firmware development outfit called Datalight. The primary markets are industrial equipment and PC hardware vendors that still need to use DOS for things like BIOS update diskettes. But Datalight also has releases that regular users can download. The vendor claims the OS is 100% DOS compatible, and it has some interesting features too, such as a full TCP/IP stack with an integrated Web server, although even this product is beginning to drift into maintenance mode.
One other contender worth mentioning here is FreeDOS, an open source effort at building a drop-in replacement for MS-DOS. The 1.0 release is almost ready, but FreeDOS is still a ways off from having a proven and reliable alternative. This will probably change within the next year or two.
Once you get past the lack of a readily usable version of the operating system, the second cold reality to strike is that there are very few utilities available for DOS anymore. There are some very nice modernized tools available, and you can still do a lot, but the number of useful applications is nowhere near what it once was.
The area where DOS stands out the most (and where it is still absolutely required) is in hardware maintenance. For example, any good recovery CD will have BIOS updates for corporate-standard motherboards and add-on cards like RAID controllers, and almost all of the vendors in this space still rely on DOS for upgrading firmware. Meanwhile, programs like Seagate's SeaTools Desktop, Western Digital's Data Lifeguard, and Gibson Research's SpinRite are commonly used for hard drive diagnostics, and they all use DOS as a boot loader because it's the best at getting out of the way.Moving up the stack a bit, partition repair and imaging tools are other strong points for DOS, but this is no longer an exclusive domain, and other platforms also have tools in this space that work almost as well. In particular, Symantec's Partition Magic 8.0 includes a DOS executable, and its enterprise-class Ghost Solution Suite 1.1 also includes an agent for DOS--note that the consumer-grade Ghost 10 only runs under Win32-- and there are loads of commercial and shareware alternatives to each of those tools. There are similar tools available for Windows and Linux too, but the DOS counterparts are still the best-in-class offerings, and provide the fastest experience with the least amount of OS interference.
Beyond the hardware- and partition-management layers, however, DOS quickly runs out of steam. Simply put, new file system management tools like backup utilities and even virus scanners aren't being developed very quickly, and older tools are rapidly being abandoned. As one blatant example of this, the leader in the NTFS access market has historically been NTFSDOS Professional Edition from Sysinternals, a read-write commercial counterpart to its freeware read-only edition. But the professional edition is no longer being sold because it costs too much to maintain the separate build for the few requests the vendor was getting each year.
Not all is lost here, and there are a handful of decent DOS tools for accessing data on NTFS partitions. For starters, Active Data Recovery Software has a pretty comprehensive collection of DOS-based NTFS utilities. These include tools that let you browse NTFS file systems, undelete NTFS files and partitions, change passwords and user details in SAM databases on local NTFS partitions, and back up and restore NTFS disk images, all from within a plain DOS session. Meanwhile, NTFS4DOS, from Datapol in Germany, provides a read-write NTFS shell that works well enough for basic file repairs, but not much else.
There are also a handful of impressive DOS utilities that can be used to automate large chunks of the recovery system, and even though they do not exist in large numbers these tools are pretty impressive. For example, a program called WBAT provides a scriptable dialog-box interface for DOS, while a utility called XSET provides an extensive toolset for manipulating the DOS environment space. You can use regular expressions to populate environment variables from input files, for example. Meanwhile, a tool called PCISCAN essentially brings plug-and-play PCI device support to DOS, allowing you to automate some driver management.
Using these tools, I was able to write a batch file that looked for a supported network card, created the appropriate network environment, and requested a DHCP lease, with the minimal user requirement being a "Start" button.
But even after that, the best I can do is run a handful of file system tools, copying files and partitions from a busted system to a network server for safe-keeping.
One of the huge problems for using DOS as a recovery platform is that support for modern device interfaces such as USB and Firewire is practically non-existent.
Another major problem area for DOS is networking. For starters, there are two different types of network drivers that are commonly used: if you need to access an XP or Samba server then you'll need to use one of the Microsoft clients (see here for a workgroup-class client, and here for a full-scale LAN Manager client, although either will work). But almost all of the other TCP/IP tools for DOS, including things like SSH clients, use a packet driver interface and not the Microsoft sockets API. If you need to use both stacks simultaneously, you have to rely on shim drivers to link them, and you may not have enough memory left for the network applications to run.
The only good news here is that most modern Ethernet cards still come with DOS drivers, presumably because of the large number of Windows 9x users still out there, but this doesn't apply to wireless cards.
The abandonment of DOS seems to be a pretty common phenomenon, actually. As yet another example of this, one of the shareware DOS utilities that I purchased had an immediate and fatal bug in the registration process, indicating that I was probably the first person to actually buy that version of the software. Meanwhile, the folks at Datalight say that they only sell a few dozen licenses for ROM-DOS to individual users per year, and those are known hobbyist customers. (Not to worry, their OEM customers are still buying BIOS-flash tools by the trainload.)Even though there are still millions of people using Windows 9x systems, and probably half of them are using DOS batch files and various kinds of utilities, they do not seem to be buying much in the way of DOS-based applications or systems--and the market is reacting to this trend accordingly. Remember this tale the next time somebody starts going on about the installed base of some product: DOS has millions of users, and they ain't buying nothin'.
Clearly the industry has moved as far away from DOS as it possibly can--but no further--and the only buyers left anymore are people who need to manipulate the hardware that DOS is best suited to support directly. All the industry really needs to finish the move is a platform that can provide a fast, lightweight character mode interface suitable for poking at disks and system firmware. Linux probably has the most potential here--it can be booted into a lightweight UI pretty quickly, and you can make a small and optimized installation if you know exactly what you need. But it's still a pig compared to DOS.
Until hardware vendors can put a mini-kernel on a floppy with the drivers and tools they need, and as long as the x86 is still being developed and used, we'll probably be stuck with DOS.
You May Also Like
Maximizing cloud potential: Building and operating an effective Cloud Center of Excellence (CCoE)
September 10, 2024Radical Automation of ITSM
September 19, 2024Unleash the power of the browser to secure any device in minutes
September 24, 2024