Google Answers Logo
View Question
 
Q: Linux - How undo mkswap on ext2 data partition ?! ( No Answer,   2 Comments )
Question  
Subject: Linux - How undo mkswap on ext2 data partition ?!
Category: Computers > Operating Systems
Asked by: curious7-ga
List Price: $3.00
Posted: 08 Nov 2002 13:08 PST
Expires: 08 Dec 2002 13:08 PST
Question ID: 102981
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.

Clarification of Question by curious7-ga on 16 Nov 2002 09:21 PST
Thanks for the comments.  Probably for $3 it's unrealistic to expect a
detailed answer from "someone who REALLY knows what they're doing." 
But since we have backups (mostly) it's more a matter of convenience
and curiosity than desperation.  I was hoping someone might know a
site with advanced data recovery techniques for Linux
filesystems...but perhaps Open Source doesn't necessarily imply Open
Tricks.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Linux - How undo mkswap on ext2 data partition ?!
From: seizer-ga on 08 Nov 2002 16:55 PST
 
It's almost certainly not what you're looking for, but do bear in mind
that there are data recovery services like http://www.vogon.co.uk/ who
specialize in recovering data.

At a rather high cost, though, I'm afraid.

Good luck anyway!
Subject: Re: Linux - How undo mkswap on ext2 data partition ?!
From: nickargall-ga on 16 Nov 2002 07:02 PST
 
Short answer:  No.

Slightly longer answer: In unix and therefore linux, there is no undo.
 MAYBE (especially if you turned your computer off immediately when it
said it was allocating 2GB of swap) the data can be recovered, by
someone who REALLY knows what they're doing.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy