Disaster Recovery Hello, to all beginners and to anyone else who is patient enough to read this stuff. Last month you had made a basic "start-up" disk, which would boot your computer in case your normal start-up procedure doesn't work. Now we need to prepare for the day when you lose all the files on your hard disk. This can happen due to virus attack, unwise use of the FORMAT or DEL (Erase) commands or hard disk failure. Getting back in business involves four steps.
Formatting Before we can make a Recovery Disk, we may have to do some Formatting. This means taking the piece of virgin plastic with magnetic coating, (e.g. a new floppy) and making it ready to be used by a DOS system. You can only write to, and store information on, disks that have been formatted. To Format a disk you type FORMAT A: (or B: but never C:) next to the DOS prompt and press Enter. The formatting process must be appropriate to the drive and the disk you are using. Thus you cannot format 360 kB floppies in a 1.2 MB drive unless you tell the drive you want the disk formatted to 360 kB. You do this by attaching "switches" to your command. These switches are letters or numbers added to the command, like the FORMAT A:/S command we used last month to make your basic startup disk, called a "system disk." This is a disk that contains, in particular special positions, the "System Files." These files are the Command Interpreter, called COMMAND.COM, the "heart" of DOS and two "hidden" files associated with the startup procedure. The actual formatting is done by a program supplied with DOS called FORMATCOM, which many people delete from their hard disk or rename as something like FORMATII.COM. Why? Before DOS 5, FORMAT.COM deleted everything already on the disk and recovery of your programs and data was a job for experts who were not always successful. Note that DOS 5 and 6 provide a "safe" format and an "unformat" command, although there is still a destructive format available. PC Tools and some other utilities also provide "safe" formats. Users of earlier DOS versions beware of the deadly FORMAT. Many times my phone has rung with anguished calls for help after its unwise use. The default drive is the one that shows at the DOS prompt, so if your prompt is A:\>, the default drive is A:. DOS will use the default drive to carry out commands and look for programs unless you tell it otherwise. You can change the default drive by typing B: at the prompt and Enter. The prompt will change to B:\> and DOS will look on the B: drive for programs and commands. The most common default drive is C:, your hard disk, and here lies the danger of the FORMAT command. If you don't specify a drive after the command FORMAT, you will format the default drive, usually C:, so you lose the contents of your hard disk. Yes, everything! All you have to do is type the word FORMAT, the phone rings and you forget to type a drive name, press Enter and bingo, it's all gone. There are several switches with FORMAT, and they vary somewhat with different DOS versions, so check your Manual. Some switches allow you to give the disk a label, or put system files on the disk that is then called a "System Disk." That's what the /S switch did last month. You can boot your computer by putting a System Disk in drive A: before you switch on the power, and that is exactly how our Disaster Recovery Disk will be used. The Copy Commands We are now going to work from the DOS Command Line, which means the line where the DOS prompt appears. It looks something like C:\> followed by a short blinking line. The name of the directory you are in may also be in the prompt, as in C:\MAGFILES>. What's a directory? I'll have to leave that for now. The DOS prompt is DOS saying to you "Type your commands here, Master." There are three copy commands in DOS. Let's look at them. They are DISKCOPY, COPY and XCOPY. DISKCOPY You should have used this command to make working copies of the disks that came with your original program(s). Write-protect copies and originals by sticking the silver or black tabs (5.25-inch size) over the notch in the side of the floppy disk; for 3.5-inch disks move the write-pro-tect tab over. Beware of DISKCOPY. It will copy everything on a floppy disk in A: drive to another disk; everything, including bad sectors of the disk, corrupted files, you name it. DISKCOPY makes an exact copy and it formats the target disk as it copies, so any data you had on that target disk will be lost. The command you issue (type at the prompt) is DISKCOPY A: B: which means copy exactly the disk in drive A: to the disk in drive B:. Don't worry if you only have one floppy drive. DOS then regards your drive as A: when copying from the Source disk but as drive B: when copying to the Target disk. Thus you have ones physical drive but its name to your computer (called its logical name) depends on which disk is in it. As DISKCOPY works, DOS will instruct you to change disks when necessary. Clever, isn't it? Here is where you must learn to talk with your computer. You talk to it by typing commands, the computer talks back to you by on-screen messages. You must read these messages else disaster will strike. When you issue the computer (DOS) will say "Insert SOURCE diskette in drive A:" "Insert TARGET diskette in drive B:" Press any key to continue . . . DISKCOPY will start working. Please note that any key should perhaps read "any character key" The space bar works here, but the three shift keys, Shift, Ctrl (control) and Alt (alternate) do not qualify as "any key." You can type DISKCOMP A: B: which compares the source and target disks, to verify that you have an exact copy. If it isn't, you will get messages like "compare error track 47" and you need to try again. COPY COPY is just that. The Syntax (up-market jargon for how to make DOS understand what you want) is COPY {Source filespec) {Destination filespec} So what's a Filespec? It's the address where a file can be found, and every file on all your disks has a unique Filespec, just as every house in your city has a unique address. An example is the file from which this article was created. The file's full address is CAMAGFILES\BEGBYTE2, which says that the file is located on drive C: in the directory called MAGFILES ~a,nd its name is BEGBYTE2. An example of using ROPY would be the command COPY MYFILE A:
which copies MYFILE from the default drive to the disk in your A: drive. Another example could be
Reprinted from the October 1993 issue of PC Update, the magazine of Melbourne PC User Group, Australia |