[ltp] swap problem (!)

Matthias Posseldt linux-thinkpad@linux-thinkpad.org
Sun, 27 Mar 2005 14:38:42 +0100


On Friday 25 March 2005 17:21, Leo G=FCrtler wrote:
> is it possible to reverse something stupid like
>
> mkswap /dev/hdx
>
> on a ext3 filesystem?

It may be possible if you didn't use the swap partition yet. First do a=20
complete backup of your partition (dd if=3D/dev/hdx of=3Dsomelargefile.img)=
=20
and then operate on this image to try to restore your data on the=20
partition.

Ext3 contains some superblocks which are entry points to the directory=20
structure. If one of them is destroyed, it is possible to use a=20
different superblock to restore the filesystem. That can be done with=20
fsck.ext3. Read the manual pages and the documentation on the internet=20
for further information.

And, that is most important, be very careful when booting rescue CDs and=20
the like. They almost always activate the swap partitions and use them.=20
That will destroy your data. So boot these CDs with a "noswap" option=20
or the like.

Regards,
Matthias

=2D-=20
There is still the danger of EU software patents!

http://swpat.ffii.org/