Short story: I did mkswap hda5 (which cfdisk showed as 58.5M free
space). Instead it made hda6 (2G ext2 root partition) become type
linux-swap, while hda5 vanished. Is the data recoverable by a
non-guru like me?
Long story: RH 7.3 dual boot/Win95, 4GB IDE drive. Linux space filled
up by programmer. I wanted to carve off some unused FAT space and make
it ext2. Partition table had worked for long time but apparently was
flakey according to Partition Magic 7.0. Its Partinfo utility showed
(i think) overlapping MS-DOS and Linux logical drives in the extended
partition. Not-so-brilliantly I used the Win95 DOS fdisk to delete
the FAT D: drive in the extended partition, hoping it would leave the
ext2 Linux partition accessible and resizable by Partition Magic.
Instead it blew away both.
I bought Partition Magic 8.0 and undeleted the root Linux partition
(hallelujah). Then copied off almost all the otherwise non-backed-up
web development code. Whew.
But the box would now boot only from CD in linux rescue mode, though
you could chroot to /new and sort of run. No swap defined. Wild and
crazy moi got into cfdisk, which showed four non-overlapping
partitions (plus some kind of "/" designation at the top with no
size??): FAT(boot), free, ext2, and a little more free. I told it to
make the first free space into type 82 linux-swap. Seemed OK. It
showed up (I thought) as hda5 when I reran cfdisk.
Then I did that mkswap hda5. It reported creating 2GB of swap space
instead of the 58.5M expected. Ugh. Since I hope that mkswap doesn't
overwrite ALL the superblocks used by ext2, I wonder if the partition
& data can be recovered. Any clues? "Undo mkswap" didn't seem to
Google me much. |