Since changing over to Windows as my main working platform I have had
to reinstall it so many times because installing and removing large
number of programs for editorial reviews, left trash on the drive,
bloated the registry and generally affected performance.At some point I
got tired of the repeated reinstall process. Reinstallation to get a
clean start involved many chores and over a period of time I found that
I have been increasingly using certain software to help me and I had
also developed certain ways of doing my work with lesser effort and
greater certainty. Through this page I share my experiences with the
people on the web
I also
wish to make it clear that there are commercial software available like
Partition Magic, Ghost, Drive Image etc which may give you the results
without your having to learn the actual mechanics of the hard disk
management. The software I have used is more for the adventurous with a
penchant for knowledge. This page is aimed at such people.
STOP PRESS I
have been doing some experiments in extending the life of hard disks
that have developed bad sectors and I have described my experiences in
this page Nine lives to your hard disk. Hope you will find this page interesting
Disclaimer !!! |
I have my own ways of working with
my hard disk and so far had encountered no serious problem. However the
procedures I have followed may not work with another hard disk or
machine or whatever, have the potential of trashing your hard disk and
I cannot be held responsible in case of any loss or damage that may be
caused by using these procedures. Do experiment at your own risk. |
Having that out of the way, let us move on now:
I have found the following tools immensely helpful in managing hard disks: (Links further down)
With the
above I prepare my hard disks exactly the way I require them, partition
them, copy them, resize them, the whole works with absolutely no loss
of data. These tools are extremely handy but, be careful, they are capable of trashing data in the hands of the un-initiated.
Important Read
all the documents and FAQs provided with these software carefully and
more than once till you understand the techniques well enough before
attempting using them on your hard disk that has valuable data in them.
All
these software work under DOS and if you do not have a DOS boot disc
then create a Windows boot disc and boot with that. Anyway if you have
a FAT32 partition you will not see the hard disk unless you boot with
the Windows boot disc. I am afraid most of these programs may not work
with XP unless it is an upgrade from Windows.
I
have not addressed any of the BIOS questions on the size of the hard
disk recognized by it at this time. I assume that you have a BIOS that
recognizes your hard disk's entire capacity.
Please note:
I have put in a few observations on formatting of hard disks at the
very end for those that want to know about the mechanics involved.
Starting with a clean slate
Many times I have had to completely re-partition my hard disk after removing the existing partitions.
The
usual method is to use FDISK and remove one by one the logical drives,
the extended partition and then the boot partition. And FDISK allows to
re-partition the disk only if all traces of earlier partitions are
removed. This is a frustrating chore if you have a number of logical
drives and here comes a tiny program to the rescue, Slate.com. This
program clears entire partition information on the hard disk in a jiffy
and makes the hard disk behave as if you have just bought it.
Slate.com
completely removes all partition information so that when you run FDISK
it shows no partition and you can partition it the way you like.
Slate.com
also allows you to save the partition information so that if you change
your mind you can recover the partition information later. (but not
after you have re-partitioned and formatted the disk, anyway).
FDISK
Now
comes the question of partitioning the hard disk. What is your
objective? You just want a single boot partition for a single Operating
System with a number of logical drives?
FDISK
is just the tool for this operation available from the earliest MS-DOS
days. Using the FDISK you can create a primary partition and make the
remaining area into an extended partition which you can sub-divide into
logical drives - as many as you want till you have used up the entire
disp space. With the version of FDISK shipped with Win95b onwards you
have also can choose the FAT32 system, allowing you sizes per partition
greater than 2 gb.
FDISK
has never been user friendly and it has limitations in that you can
create only a single primary partition. And if ever you have to clean
up your disk of all partition information then you have to work back,
delete step by step all that you created earlier. And after FDISK you
are always forced to do a full format of each partition though you may
not want it. (Actually the format operation first checks presence
of a system area, comprising directory and FAT sectors. If they are not
there, the case immediately after partitioning, it forces a complete
format to scan every sector of the partition so that it can mark the
bad sector information in the FAT area)
The Real Real Estate
With
dual booting to DOS and still using a number of 16-bit programs I find
that it is more convenient to use FAT16 system so my primary partition
is just 512 mb. In this partition I boot either Win95 OSR2.5 or DOS
(Using F4 at the Starting Windows 95 ... statement). I use a
reasonable number of programs, browsers, mail clients, newsreader and
more, but have no data on this partition, and I am yet to find the need
for the size of a primary partition larger than 512 mb, even with
Win98SE. Of course there are logical partitions which are much bigger
and I use them for storage. One partition of 500 mb has only DOS
programs which I still use. Another 600 mb partition holds all the
stuff I download. As soon as a I collect about 500 mb I burn a CD to
archive my collection and this size helps me defrag the drive in
reasonable time. Another partition holds Linux and this partition is
invisible to DOS and Windows but Linux sees all the partitions.
HINT: Digressing,
there are many programs that do not write anything to the registry - a
standalone exe program or one that works in its own folder and does not
depend on other Windows components. I never put these in my Windows/DOS
partition, but in another. When the registry gets bloated and
performance degrades I format my boot partition and reinstall Windows
and I never have to reinstall these programs. I just save the link
(files with the .lnk extension) files and copy them back after
re-installation of Windows.
HINT #2: Did
I say reinstall windows? Never. I have a small spare hard disk in which
I have a copy of minimum, fully tweaked windows install (Win95OSR2.5 -
No IE - installed size is less than 50 mb) and I just copy this
installation back to my working hard disk - a few minutes work compared
to the normal time involved in installing afresh every time!!!
Stan Brown
had a page on hard disk partitioning that was very informative and
gives good value for your time - it talks of partitions, the why and
how of it. Stan removed this sometime back from his site for personal
reasons but he was good enough to permit me host that page at my site
itself.
Hard Disk Partitioning: Why and How
More than one OS
If
you require more than one Operating System to be installed then you
have to arrange multiple primary partitions which can be chosen using a
boot loader program. The FDISK Program does not allow more than one
primary partition and there are several priced software that can be
used to get this done.
Mikhail
Ranish has provided a very compact Partition Manager that is simple in
its execution but is very powerful. This program, according to the
author, can be evaluated for a period of "Ten years" after which you
can send US$ 10 if you continue to use the program. Well, if you cannot
afford $$$ then you can send a picture post card !!! Anyway it boils
down to the fact that the program can be used by individuals for own
use for a reasonably long period.
PART.EXE can handle several types of OS like Win9x/FAT16, Win9x/FAT32, NTFS, Linux etc.
Go
to the site and download the earlier version 2.37.12 which is still
available there as PART.ZIP. The latest version is now in 2.40 (this 32
bit version is only for more experienced users but can handle large
disk sizes but can handle only 4 primary partitions unlike 2.37.12
which can do 32 and reads only the first 8 gb of the hard disk)
The
earlier version 2.37.12 has a more simple interface and is easy to
understand for the beginner. Read all the documents and FAQs provided
at the site.
With the simple boot manager provided by the Ranish Partition Manager
you can have four primary partitions of which only one can be active at
a time, to be chosen via the boot manager. But the program has the
capacity to provide for up to 32 primary partitions using the Advanced
Boot Manager!! and I am sure you will never have to have that many
different Operating Systems on your hard disk.
A Great Help and a Lifesaver idea (Recovery primer!)
Whichever
way you partition your hard disk, run part.exe and note down all the
CHS (that is Cylinder, Head, Sector) values for the MBR and the various
EMBR levels.
You can also use the command line instruction
part -p -r > disk.txt
that will save the partition information to the disk file disk.txt from you can take out a print.
This
will come in handy to recover the partitions in case the partition
information was trashed by accident or a virus. In most instances
destruction of partition table alone does not affect the data in the
disk and using PART.EXE you can restore the partitions by entering the
information noted earlier by you and saving it to the hard disk. Just
start part.exe and enter manually all the CHS values you had noted
earlier, save them and bingo! your partitions are back.
Even
if you do not have the CHS boundary values for the partitons you can
still recover lost partitions. This will take some time and your
patience so you can try this if you have important data you want badly
from the disk. From the size of the partitions you had on your disk you
can roughly calculate the approximate beginning of each patition. Then
use a sector reading utility, for example, Findsect.exe from Seagate,
check some sectors in the vicinity of the calculated beginning sector.
You cannot miss the starting sector which may go like this
.< .M SW IN 4. 1. .. ..
.@ .. .. .. ?. @. ?. ..
A. .. .. ). .' .
FA T1 6 3.
.. .. {. .. x. .v .. V.
U. ". .~ .. N. .. .. ..
|
And
that is your begining of a partition. Note the beginning sector for all
the partitions in this way and then enter them manually using part.exe
and you are done ! And remember that all partitions begin at the first
sector of a cylinder.
As an example the MBR of the partition table of a hard disk having 1022 physical Cylinders, 64 physical Heads (Sides) and 63 Sectors per cylinder (normally called CHS
values, having logical values 1021-63-63 in this case) made into four
partitions will show as follows. Remember that Cylinders and Sides
start counting from 0 while Sectors from 1.
Partition Table 1021-63-63
|
---|
|
Starting |
Ending |
|
Record |
Cylinder |
Head |
Sector |
Cylinder |
Head |
Sector |
Comments |
MBR
| 0 |
1 |
1 |
248 |
63 |
63 |
Primary partition, C: |
249 |
0 |
1 |
1021 |
63 |
63 |
Entire extended partition |
EMBR1
| 249 |
1 |
1 |
497 |
63 |
63 |
Partition, D: |
498 |
0 |
1 |
726 |
63 |
63 |
|
EMBR2
| 498 |
1 |
1 |
726 |
63 |
63 |
Partition, E: |
727 |
0 |
1 |
1021 |
63 |
63 |
|
EMBR3
| 727 |
1 |
1 |
1021 |
63 |
63 |
Partition, F: |
While
the MBR holds the entries for the primary partition and the entire
extended partition each EMBR hold the entries for itself and the
following partition.
You
can see that the primary partition starts at 0-1-1 and not 0-0-1 and
that is the case with all other partitions, that is, they all start at
Side 1. The Side 0 is kept for partition information for the primary
partition (MBR) and this is consistently followed by other partitions
too. (Theoretically a partition can start anywhere but practice follows
the above convention)
The
starting sector data shown earlier (for DOS & Windows, that is) is
always found at Side 1 Sector 1 of any partition and this helps you
hand code the partition information using PART.EXE. (In the example
above you will find that data at (C-H-S) 0-1-1, 249-1-1, 498-1-1 and
727-1-1. The sector reading programs will give you the address of that
sector and you can make a table. Remember that each sector is 512 bytes
in size and a kilo byte is 1024 bytes in computerese though hard disk
manufacturers use the (metric) kilo as 1000 bytes that gives you
misleading sizes - you always see the capacity shown by Windows is
lower than that stated by the manufacturers.
All
these hassles can be avoided if you just run PART.EXE after you
partition a hard disk and write down the values in your scrap book for
use at a later date. Note that modifying partition tables does nothing
to the data in the hard disk and data can be accessed once you restore
the original values - provided you did not write to the disk in
between.
Playing with Partition sizes
Here comes another great gift in the form Zeleps's Partition Resizer - a freeware program that is a real wonder.
Go to Zeleps's site and download the latest version of Partition Resizer, Version 1.3.4 using the following link:
How
does this program help you? OK, let us take a look at this case.
Suppose I had my partitions in a 1 gb hard disk as two equal halves and
suddenly I end up with the following situation:
Active partition C: Windows with minimum programs 500 mb
Partition D: All my software and shareware collections 500 mb
At
one point I find that I have hardly used 250 mb of C: but D: is full
with downloaded programs. I want to have 100mb more in D: What do I do?
Partition Resizer will do all without a hitch. First I defrag C: and
move all data to the beginning of the partition. When I run Partition
Resizer it says I can have minimum size of 250 mb for C: but to be on
the safe side I (graphically) change the size to 400 mb and once I ok
the parameters the program completes the job and on rebooting I have C:
with 300 mb and a D: with 500mb. At this point the 100 mb is shown
unused if you run part.exe on the disk
Now,
using Partition Resizer again, I enlarge, grow - to use the correct
word, D: to 600 mb (that is I first move the 500 mb nearer C: and then
grow D: to the maximum - all this is graphically shown on the screen)
and I have what I wanted. Of course, all the above could have been done
in a single step too.
The
program actually creates additional space or reduces the space required
for the fat and directory entries relative to the size of the new
partition size, relocates the the data area by moving sectors. As the
program handles only at the sector level, all your data is intact
including Long File Names (LFN) And it does it fast and very well.
In
fact, according to the documents available with the program, Presizer
is capable of completing the job successfully even if interrupted by a
power failure by your sister-in-law pulling off the power plug; I have
had no occasion to test this feature.
If
on the other hand you need to get 600mb of C: and 400 mb of D: no
problem. Use the program to reduce D: to 400 mb, moves it to the end of
the hard disk so that you can grow C: to 600 mb. Simple, right?.
And all this done without any data loss.
Getting a working copy of Windows on another hard disk
(Using Windows itself)
Please note
that there may be some problem in the running of some programs due to
the way Windows assigns short file names which may not agree with the
short file names stored in the registry. Luckily, I suppose, I never
encountered such a problem but you may not be so lucky! |
Lots
of people are using different commercial programs or even xcopy to copy
all files from one disk to another but I have always used the Windows
Explorer to do this and I have never failed once.
I install and uninstall so much shareware, at least one a day, removing
it perhaps after a few hours or days, mostly for evaluation for
magazine reviews. Most uninstall programs do not remove everything and
leave garbage about in the c:\windows and C:\windows\system folders..
My registry also is left with a lot of dud entries that do not go away
even if I Regclean every week and compress the registry once in a
while. Result - A mega registry which uses up memory.
I therefore go for a fresh installation of Windows every three months
or so but this again is a hassle, sitting in front of the computer and
responding to the setup prompts and choosing settings not to mention
the few reboots.
I installed Windows, the barest minimum and tuned it to my exact requirements. (I
also never keep my data in the C:\ partition so that when I format it
the data is never lost nor have I to save the data except when I take
an archive.) Then I copied it to another spare hard disk and now
whenever required I simply boot with the spare disk and copy back the
stored installation to my working disk.
So if you want to copy your hard disk to another just follow these steps:
1. Using any of your favorite utility, prepare (partition, format and
set the active partition) the second hard disk and connect it to the
computer (primary slave or secondary master).
2
Start Windows. Your boot drive will be C: and the boot partition of the
second hard disk will be D: in the normal course. You want a copy of C:
in D:
3.
You need a boot disk and if you do not have one go ahead and make one.
Start up Control Panel, click on Add/Remove Programs and click on the
Startup Disk tab and create the startup disk.
4. Start Windows Explorer and click on View and then Options. You will
get a dialog box as follows: (This looks way different in Windows 98
but you cannot miss the proper entries)!
Make sure that boxes are checked exactly as shown.
5.
Make sure no other programs are running. Now in Windows Explorer
highlight C: and drag it to D:. Wait till all files have been copied.
6.
Switch off the computer and connect the second hard drive as the
primary master. At this time the hard disk will not be able to boot.
Use the startup disk to boot the computer and when you are at the A:\
prompt type sys c: and press Enter. The required boot information will
be copied to the new disk and you have a working copy of the old hard
disk.
Important Note Many
people have been objecting to this method of copying in the newsgroups
for the simple reason the way Windows creates short file names which
can lead to certain program not working ater copying. So use a bit of
caution in selecting this method.
An eXcellent XCOPY for you
Here
is a utility, XXCOPY, (courtesy: Kan Yabumoto) that you can use to
clone your disk with considerable ease . Apart from several switches
which can control the various options, it has a super switch XXCOPY
/clone that meets all the requirement of cloning your hard disk. But do
remember to use your Windows boot disk to do a sys C: and set the
partition active so that the cloned drive becomes bootable. There is
extensive documentation available at this site on this program and it
is well worth your time reading them.
You can download the latest version of XXCOPY from one of the following sites:
SavePart A free handy util for your Hard Disk cloning
Here
is one utility from Damien Guiboure, actually three, (1) to save a copy
of your partition as a file, (2) to restore that file to a new
partition and (3) to clone a disk.
All
copying programs take the filename, find its location, copy the file to
the memory and then copy it to the destination. And the file name is
destroyed when it happens to be a long file name unless the copying
program itself can handle the long file name.
However
if you copy sector to sector without worrying about the contents then
you get an exact copy and as no files are handled the long file names
are safe. Further improvements to this process were implemented by
adding capcity to create a compressed file of the sectors and copy only
occupied sectors as well as adjusting to the size of the destination
partition size if it was different from the source partition.
Though
there are priced software, SavePart does this job equally well. The
utility allows you create a compressed file of the sectors and you can
adjust the compression level. Be warned though - too much compression
will lead to long copy times. You have to choose between time and file
size. Please read the documents, the program can handle a number of
file systems.
A note on formatting hard disks
Many
people in the newsgroups ask questions about Low Level Formatting. In
older computers the bios itself provided a low level formatting
facility which had trashed many a disk and newer computers do not
include this facility. The IDE drives use certain translation routines
that does not agree with those older bios routines. Low level
formatting is not required in the normal usage of a hard disk as this
has been done already by the manufacturer. What is being currently
talked about is a sort of pseudo low level format that does not disturb
the physical sectors - just write zeroes to all sectors.
However,
if all else fails to recover a hard disk you can attempt a low level
format, writing all zeroes to every sector for which safe Low Level
Format programs are provided by most hard disk manufacturers.
These
LLF programs write to every sector of the disk, wiping all data in the
disk. It just informs the user of the presence and address of the bad
sectors. Note that none of this information is not written to disk
(unlike the normal format operation where bad sectors are marked as
such).
But
you face the situation where you have to clear a partition of all data.
Usually a quick format will be sufficient to clear the particular hard
disk partition of all "data pointers". I say this because the quick
format just places a new FAT (file allocation table) that shows all
clusters are free (except the ones marked bad , though) and an empty
directory. All the original data in the data area is still there and
will just be overwritten when you copy new files.
The
FORMAT program has a small problem. Immediately after you make the
partitions using FDISK there are no FAT and Directory areas, called the
System area and so FORMAT program, sensing the absence of the system
area, insists on a complete check of all the sectors so that when it
writes the FAT table it can indicate the bad sectors and programs will
avoid writing to these sectors.
This
happens everytime you repartition your drive and it really takes too
long with the latest large size disks. This is where you can use
Ranish's PART.EXE to save time. Later ...
For
an already formatted partition, Quick format is best, the least
punishing and the fastest option if you are sure no bad sectors have
crept in since the previous format.
If
you have used PART.EXE for a while and have become familiar with it you
will start using its format option because it is fast, it does not
force you to verify the entire partition. So if you are sure that the
partition you want formatted has no bad sectors part.exe is the program
to use with the "F /quick" option. You can also do an extremely fast
verify too, if you need to, with PART.EXE
Compared
to the Quick format the normal unconditional format is used when
formatting immediately after partitioning or changing partition sizes.
During this operation every sector is read (nothing is written
to the data area of the disk) to verify it and a note of bad sectors
are made. The fat and the directory entries are then put in marking the
bad sectors as unavailable.
Unconditional
format does not write anything in the data area of the hard disk. A few
times, I have given a format c: /u command by error on the wrong disk
and realizing my mistake when the format has gone 60 or 70% I had
pressed the panic button and noted with pleasant surprise that the hard
disk was just the same as before I started the format operation.
Warning!
Quick format is a different story altogether- it gives no time for
thinking - it straightaway writes a new FAT and Directory information,
so be careful if you carry valuable data in the hard disk.