I just partly completed upgrading my notebook computer by
replacing the 20GB TravelStar with a new 60GB one. The new one
is much quieter in addition to bigger!
I followed instructions that were available on the web and
would like to thank the authors of these pages:
Ghost For Unix (G4U):
http://www.feyrer.de/g4u/
NTFS resize:
http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html
Partimage backup page:
http://www.partimage.org/
Helpful notes:
http://www.digitalissues.co.uk/html/os/misc/partimage.html
I was disappointed that the Microsoft backup program is
explicitly not able to perform a back to a network device and it
seems that in Win2K they go out of their way to require you to
be able to boot the operating system that you are trying to
overwrite. Kind of inconvenient... Studying the manuals of
commercial solutions like PowerQuest DriveImage and
PartitionMagic couldn't satisfy me that they would work in the
face of the bad disk blocks.
I was impressed that there are free tools that get you most of
the way but I got hung up on the issue of what happens when you
begin to get bad sectors that NTFS maps into the "Bad Cluster
File". See here for more information:
http://www.microsoft.com/windows2000/techinfo/reskit/en-us/core/fncc_fil_khzt.asp
It appears that as the disk drive firmware runs out of bad
sectors, then chkdsk will then begin to stash them away in a
deeply hidden file called the bad cluster file. Now that I have
successfully copied my filesytem onto the new drive, I am
stymied because ntfsresize refuses to operate on a filesystem
with a non-empty bad cluster file. However, now that it is a
fresh drive, the bad sectors are now just zero-filled and not
bad any more. So what I want to do is just remove the bad
cluster file. Any suggestions? I know that I could buy the $60
copy of Partition Magic to do this and I am willing but it seems
like a shame to give up when such a simple fix is possible.
Does anyone know a good way to do this? I will also try a
chkdsk /r /f overnight on the off chance (unlikely) that it will
re-scan the bad blocks. The web would have mentioned it if it
did.
For posterity and fellow travelers, here are the steps that I
used to make the image of the disk and restore it.
Step 1: Create the image
The simplicity of G4U was very nice for a one-time image/restore
as all that was needed was to temporarily turn on ftp. I found
that it got part way through and stopped when it hit the blocks
in the bad cluster file. So I checked into using the
"conv=sync,noerror" options to dd underlying the image process.
The minimal dd included with g4u didn't seem to have it so I
grabbed a Knoppix disk and changed the lines in the script
slightly to use "bs=512" and "conv=sync,noerror'. The "bs=512"
makes it a lot slower due to the small blocksize but if you
don't, then a megabyte of data surrounding the bad sector will
get filled with zeroes... Not a good thing. In addition,
Knoppix hides ftp as pftp and uses a different convention for
the /dev name, /dev/hda in my case. Linux doesn't use
/dev/rhdad or such a convention for raw devices.
Step 2: Restore the image
Similarly, I just modified g4u slurpdisk to restore the image.
Step 3: Resize the partition.
I used fdisk as described here to increase the NTFS partition:
http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html
Step 4: Resize the filesystem
I used the Knoppix-delivered version of ntfsresize which has the
stable release (I think 1.7.1).
KNOPPIX_V3.2-2003-07-26-EN.iso
To my chagrin ntfsresize detected the existence of this now
needless Bad Cluster File and refused to make the last tweak.
In any case, I am temporarily using the drive as a 20GB drive
until one of:
- Someone has a solution to move forward.
- I buy Partition Magic
- I just create a d: partition (yecch).
Cheers and TIA.
Jim
|