Have Handy DOS Partition
Quick Start:- Create a brand new primary partition at the start of your first hard drive and ensure it is marked as the active partition. Then format the partition as an MS-DOS System Partition. This is usually done from an MS-DOS floppy diskette by entering format C: /s at the floppy's A:\> prompt.
A minimalist MS-DOS partition such as this only contains three files; io.sys, msdos.sys and command.com. Some may be hidden and different variants of DOS may well use a different trio of file names. Customising such a drive with autoexec.bat and config.sys files and related memory managment and drivers can produce a more productive partition, but keeping it at its most simple will allow most PCs to boot to such a partition - even when the hard drive moved from one PC to another. Indeed it is one method of creating an accessible hard drive on a PC that lacks either a floppy or a CD drive.
Introduction
- On modern systems we recommend you start out with a 500 MB FAT partition at the beginning of the drive. More experienced users may vary any of the recommended settings to suit their own or other specific purposes. Note that DOS will always want to designate the letter C: for the currently set active primary FAT partition on the first hard disk drive (as set in the BIOS setup) and the letter A: to the first floppy disk drive. If the active primary is not FAT then DOS (from a floppy or CD) will want to call another FAT partition the C: drive. Only the active partition can be booted by the BIOS setup even if another partition has been made into a system partition; (system here meaning a partition that has been "sys'd" or otherwise made bootable with the mandatory system files and boot sector).
- We will discuss more partitioning and imaging specifics in other pages. Fdisk from DOS is the traditional tool for creating partitions but really best restricted for use on an empty hard drive. Creating your DOS partition is best done at this time. BiNG can be used to non-destructively resize existing partitions and to create your new primary partition in the vacated space. Make sure you have any important data backed-up or imaged prior to changing partition structures and bear in mind that any multiboot system can have untoward knock-on effects to any existing functional operating systems.
Value of using DOS
- There are a lot of different versions of DOS and one particular advantage of DOS over Windows is that when a hard drive running DOS is set up on one PC it will usually work when transferred to another PC. There are exceptions of course (for example when the autoexec.bat and config.sys files are inappropriate for the new hardware). If you find that a DOS installation works on one PC but not when the hard drive or the partition image is transferred to another PC then try by-passing these two files (and hence any auto-running shell programs) by using F5 during startup or by temporarily renaming them to autoexec.old and config.old.
- Booting to DOS can thus be the simplest way to "get into" your hard drive. Having once "got in" you can start to have some fun or do some serious work. If you eventually have a nice working DOS partition with all the utilities that you want installed onto it then you could do worse than make an image file of it onto a CD since if you later restore that image file to just about any working PC you can, most of the time and as already indicated, re-use it straight away.
Which DOS Version?
- We recommend the MS-DOS version that ships with Win98 (if only because it has long file name support and is easy to get hold of) and to install it onto a 500 MB primary FAT partition at the very beginning of the hard drive. A suitable floppy diskette can be made from bootdisk.com's Windows 98SE Custom, No Ramdrive file. You can directly download the self-extracting boot98sc.exe (free, 892kB) and run it with a blank floppy in its floppy drive. Floppies are very fickle and easily corrupted so if there are any problems creating the diskette then do try another one or, better still, try a brand new blank diskette.
'Sys' the FAT Partition
- A computer's BIOS will attempt to boot the active partition of a chosen hard drive. The DOS program fdisk.exe can be used to mark just one partition per drive as active. In order to succeed in booting to a FAT partition's C:\> prompt an existing active partition also needs to be made bootable. To achieve this under DOS it must contain the three main boot files io.sys, msdos.sys and command.com (there can be slightly different file names under the various versions of DOS) plus a DOS boot sector that can communicate with its matching io.sys file. These four items are created when the format command has the "s" or "sys" switch applied. The files io.sys and msdos.sys are usually hidden system files so not immediately visible. Simply issue the following command from the floppy diskette:-
A:\>format C: /s
- or sometimes
A:\>format C: /sys
- If successful, the following lines of text should then be displayed:-
(a) All data on non-removable disk C: will be lost! Proceed with format (Y/N)?
(b) Format Complete. System Transferred.
(c) Volume Label (up to 11 characters) is optional but say call it MyPartition to help with any later identification.
- A pre-existing and active but non-bootable FAT partition does not have to be re-formatted to make it into a bootable system partition and can just be sys'd by running the DOS program sys.com with the appropriate drive letter. Assuming sys.com is in the root of your floppy then you would normally enter the following - noting that you should also watch out for the message "System Transferred" to indicate success. (Sys-ing a drive in this way with the appropriate DOS version can sometimes fix non-booting Win9XME systems).
A:\>sys C:
Uses of a DOS Boot-Partition
- One main use of having a bootable partition on a hard drive is to allow one to have a number of troubleshooting and repair options that can be run from that partition. This is particularly the case when, for whatever reason, Windows fails to start-up and one cannot boot to a floppy or CD drive.
- If the Windows setup files (the Win9X and the i386 folders from DOS and NT-based versions of Windows respectively) had previously been copied to this partition it is then possible to run C:\Win9X\setup.exe or C:\i386\winnt.exe to institute both new (clean) and also repair (in place upgrade) installations. Running such installs from the hard drive can also speed up and make such set-ups run more smoothly than when initiated from a CD. If installing from an i386 folder in your DOS partition then you will need a minimum partition size of some 700MB rather than the 500MB suggested here earlier.
- The simplest of all "DOS installations" (created by format C: /s) should allow one to get to a command prompt. This minimalist DOS installation is however sufficient to let one view the contents of FAT partitions and to do the most basic file management tasks such as copying, deleting and renaming files and folders as well as executing DOS executables/applications in any volume accessible from the partition in question. It is also a place where one can store away, for later use, a whole range of DOS programs/utilities (both Microsoft and third-party appplications). There is every reason to add a mouse driver, partitioning & imaging programs as well as other programs that can simply grab information from the system, troubleshoot in numerous ways and even run a DOS-based antivirus scan. Fully customising a DOS installation and editing autoexec.bat and config.sys to suit ones needs is not however the substance of this article.
- Having sys'd the partition from the Win98 floppy recommended above, one could also copy all or any of the files on that floppy to the new hard drive partition. That would allow one to run other basic but very useful programs such as smartdrv.exe.
A:\>smartdrv
- The disk-caching smartdrv utility makes any large file-copying operations proceed at much faster rates and is practically mandatory with large operations unless one is prepared to be very patient. There is not normally any response or message when its command is issued either from the A: drive as above or from the C: drive if that is where it is to be found. If the floppy used to sys the drive also had CDROM support (as most of the images from bootdisk.com do) then copying all the files on the floppy to the new C: drive would mean that one would have the same CDROM support from the new DOS partition. In addition one could run any of the other utilities found on the floppy such as edit.com (to edit any text-based files) and xcopy (to copy whole folders and their contents) and so on. Prior to copying the files from the floppy (or elsewhere) it can often be a good move to first unhide any existing files in the root of the floppy using the attrib command as follows:-
A:\>attrib -h -s -r *.*
- followed by the following to copy all files and folders to the C: drive:-
A:\>xcopy A: C:
- This last command should prompt you to overwrite the existing three files created earlier by sys-ing, so just answer no when that happens. If doing the copying from Windows then just ensure that you are not hiding either Files or System Files from the Folder Options in My Computer.
- If the partition is to be used for installing an NT-based OS such as Windows XP then it will also become the Windows XP system partition and the XP setup should leave you with a dual boot menu at start up. Keeping the partition as FAT (and not converting to NTFS) in this situation has the advantage that it is thereafter very easy to boot to DOS and access all the boot files in it. Boot.ini, in particular, is then very easy to edit if necessary. If it is used for installing a DOS-based OS such as Windows 98 then, if the Win9X folder containing the installation files is left intact, Windows will not have to prompt you for its installation CDROM when it needs to update any of its system settings.
- There are additional uses of having an accessible FAT partition like this (though in these instances it doesn't have to be a bootable partition). If you should later decide to install a third party boot manager such as BiNG or XOSL then both will need a Primary FAT partition on which to place some files. The partition can also be made large enough to hold the virtual memory page-file for a variety of performance-related issues and, if really wanted, can be used as one big partition occupying all of the hard drive. NB: don't go over 128GiB/137GB unless running Win2KSP3 or WinXPSP1 or later AND have a BIOS that supports 48bit LBA
Creating New or Using an Existing Partition
- The fdisk program (from the same boot98sc floppy diskette) can be used both to delete existing partitions and to create a brand new unformatted partition and mark it as active. We actually recommend using BootIt-NG to do this (or the free 47 MB GParted LiveCD or any other partitioning tools of your choice; e.g. Partition Magic or another freebie, the now rather outdated but free, 60 kB Ranish 2.40). If you run fdisk and want to have partitions larger than 2 GB then ensure you enable "Large Disk Support" when prompted. If not you will be restricted to installing FAT16 with its own inherent pros and cons. Remember, whatever utility is chosen, to check that the correct partition has been marked as active.
- Note that older MS-DOS versions of fdisk may have problems with large hard drives and large partitions and remember that fdisk can be used to just view information rather than actually do anything. If you want a more versatile and robust version of fdisk you could try FreeFdisk (eg fdisk121) as an alternative.
- BootIt-NG comes with a pdf manual which you can read through at your leisure but, put simply, you can boot to it on a floppy or CD, cancel its setup program and go straight into Maintenance Mode and on into its Partition Work Section. Setting the specific partition as active is done using the MBR button there.
- It is probably easiest to create just one brand new partition on a blank (un-initialised) hard drive but you may have occasion to want to leave any current partitions in place. BootIt-NG can move and resize existing partitions in addition to all its other functions but do backup any existing important data before using ANY such partitioning utilities. Also note that deleting or creating new partitions can adversely affect the boot processes of existing operating systems thus rendering them unbootable. This is particularly so with the NT-based OSes such as WinXP as well as the Linux distros. You should thus not attempt this, in the presence of a functioning system, without an understanding of what happens and how to correct things.
- We previously suggested creating FAT (meaning FAT16) partitions, not greater than 2 GB and at the very start of the drive. The reasons for this are simply that the widest range of Operating Systems can see and use FAT16 and even older motherboard BIOSes and older DOS versions can normally boot to such a location. Using FAT32 and MS-DOS 7.10 (the version that bundles with Win98) makes it possible to have long file name support, larger partitions and not necessarily at the start of the drive - (but do keep them within the first 120gig of a large hard drive to avoid unseen complications).
- Creating a new and/or larger primary partition further up the drive (but within 128GiB/137GB) is thus perfectly feasible and should usually make it easier/less complicated to shrink down any existing partition(s) at the start of the drive. As long as this new FAT partition is still designated as the active (or system) partiton it can be formatted or sys'd as the C: drive - specifically using the "C" drive letter.
A Note on the C: Drive
- How drive letters are assigned is probably one of the commonest cause of confusion when trying to understand which partition is which. Both DOS and Windows will want to boot from the hard drive's active partition and that active partition - once windows or DOS (from a floppy or other drive) is running - always gets designated the drive letter C. This active partition is also known in Microsoft parlance as the system partition. The Windows folder can be installed from that system partition into another partition known as the boot partition. Under DOS-based Windows the boot partition is chosen by drive letter during the initial setup and under the NT-based versions it is chosen numerically by the boot.ini file. By default, the system and boot partitions will be one and the same partition.
- Under DOS and the DOS-based Windows (such as Win9X/ME) drive letters are assigned dynamically once the OS is running. That means that if hard drives or partitions are added or subtracted or that a designated active partition is changed then the drive letters assigned at the last boot up no longer necessarily apply.
- Under NT-based Windows (such as Win2K/XP) drive letters are initially assigned along similar lines but are remembered in the registry in its mounted devices section. Drives and partitions (well any not used to boot the system) can thus be added or removed but the original drive letter assignments are remembered and don't change. They are stored using an algorithm based on the hard drive signature and the literal position of the partitions on the hard drive. Re-sizing or moving partitions or changing the disk singnature (for example with fdisk /mbr) can thus force the NT logical disk manager to reassign the drive letters.
- The main point to understand is that drive letters are intrinsically fickle and that you are much better off to try to define partitions (particularly if you are new to multi-booting) by knowing their formats and sizes or by giving them meaningful label names. The linux system is pretty unambiguous such that /dev/hda2 refers to the second primary partition (as defined by the second partition table) on the first hard drive and /dev/hdc6 refers to the second logical partition on the third hard drive. A Windows C: Drive can be just about anywhere!
Temporary Transfer of Hard Drives
- It is usually straighforward enough to transfer a normal Desktop (3.5" IDE/PATA or 3.5" SATA) hard drive from one PC to another one that uses the same internal cables and connectors. Attention needs to be given to setting jumpers appropriately - particularly for those that use 40/80 wire IDE/PATA ribbon data cables. Each manufacturer uses different Master/Slave/CableConnect settings so looking at the manufacturers' product information may be required to be sure of the correct configuration. Sometimes the simplest place to attach the transferred drive to is temporarily in place of an existing optical (CD or DVD) drive.
- Large capacity drives may have problems if transferred to an oldish computer; one without support for the size of the drive in question.
- Laptops usually have 2.5" drives in a cradle, which is itself in a bay that usually slides out quite easily after loosening a screw or plastic slider. Some, particularly ultra-slim models, use even smaller drives. The 1.8", 2.5", 3.5" dimension relates to the diameter of the platters. Such laptop drives can be attached internally to Desktop systems using a 2.5"-to-IDE adapter cable. It should be straightforward to Google for suppliers of these inexpensive items.
- 3.5" IDE connectors have 40 pins and there should be a separate 4-pin molex power connector. 2.5" IDE connectors have 44 pins in a block, with four of the pins being for power. Ultra small drives (1.8" and less) may use a different supply voltage so choosing an adapter for them needs additional care.
- Both laptop and desktop drives can also be connected to other computers using a USB cable to connect to the host computer's USB port. It is best, for reasons of speed, to have USB2 throughout. All types (2.5" Laptop/3.5" IDE/3.5" SATA) to USB adapter cables can be found but another way is to get an External USB or Firewire Hard-Drive-Enclosure and put the hard drive physically inside the enclosure. Most 2.5" enclosures usually get enough power from the USB cable without the need for an external DC power source.
- An advantage of using USB is that large capacity drives are nearly always completely accessible because the USB firmware does the geometry translation and not the system BIOS.
- An advantage of attaching a transferred drive internally is that it helps one to check whether the drive is functional by seeing if it is detected in the BIOS setup. Note that in many BIOSes that adding a new fixed drive to the system may require that the IDE setting be set to autodetect before the system will recognise and enumerate it. Once reconginsed by the BIOS, one can then run hard drive diagnostics (from the maker of the drive in question) from a boot floppy or CD - something that is problematic to do with USB devices since they are difficult or impossible to detect from DOS.
Installing DOS and using it
- We have concentrated on just getting a very simple version of DOS running in the most straightforward and useful way for troubleshooting and for helping to install Windows when other methods fail. There is nothing to stop you from formally installing a full version of DOS. You may be able to get your hands on an earlier MS-DOS version (MS-DOS 6.22 has always been popular) or you could download and install FreeDOS. You would need to have DOS installed prior to installing Windows3.x which is, in reality, just a shell running in DOS.
- Basic Commands
- A complete overview of MS-DOS and its commands
- Another comprehensive List for MS-DOS Ver 6.22 & up
- Note that entering /? after a valid command will list the various options for the command in question.