From: brudiakg@isis.cs.du.edu (Ben Rudiak-Gould) Subject: Results of my attempt at nondestructive repartitioning Date: Sun, 12 Apr 1992 04:11:30 GMT
I used a slightly different method than the usual one for
nondestructively repartitioning my hard drive, which I thought some
people might be interested in. My method (I proposed it originally
in comp.sys.ibm.pc) was to create a large contiguous unmovable file
on the original partition, and then set the new partition to the
cylinders corresponding to the file. I asked if it would work, and
was told, "try it and see." So I did.
It turned out to be quite easy, although I don't know how I could have
done it without the Norton Utilities. I optimized the hard disk, then
created the file by opening it, seeking to byte 25000000, and writing
one byte. I also set the file's system attribute so that it wouldn't
accidentally be moved. Using NU, I determined the first and last
hard disk cylinders that were completely contained within the file,
and set the new partition to begin and end with those. (I used
partition type "Xenix.") Then I wrote some unique signature bytes to
various places in the file and read the new partition both from NU and
from linux to make sure that the bytes showed up in the proper places.
Finally, and with a little trepidation, I ran mkfs... and it worked
perfectly.
I think that this method is safer than the usual method, which involves
resizing the original partition and putting the new partition in the
newly unused space, because this method does not alter the original
partition in any way--it was intact and bootable at every point in the
process. It was also easy to test that the new partition was set up
correctly before I ran mkfs, which was lucky, because I set it up
incorrectly the first time, and if I had used the usual method and
hadn't been able to check it, I would have had to lug out the backups
and spend all day restoring (170 MB from floppies). The only danger I
see is that some software may not be able to deal with overlapping
partitions, but since neither MS-DOS nor Linux knows about the other's
partition, this seems extremely unlikely.
I would recommend this procedure to anyone who wants to
nondestructively repartition their hard disk and has some knowledge of
MS-DOS and hard disk geometry (which they would probably need for the
other method anyway).