LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Does linux, when assigning swap space format the drive ? (https://www.linuxquestions.org/questions/linux-newbie-8/does-linux-when-assigning-swap-space-format-the-drive-725337/)

thilakjk 05-12-2009 12:29 AM

Does linux, when assigning swap space format the drive ?
 
Does Linux format the drive where it assigns swap space?
if yes is it possible to recover the data that was previously on that drive?
If it is possible how can i do it? Is there any software for this purpose?
and my windows cant detect the swap drive? is this supposed to happen?
How can i see the swap space in linux itself?
I'm using Linux 9.04

tommcd 05-12-2009 01:08 AM

Quote:

Originally Posted by thilakjk (Post 3537839)
Does Linux format the drive where it assigns swap space?

If you installed linux to the hard drive, and the installer created a swap partition, then yes. The swap partition was formatted as swap space. Any data that was on that partition would be lost.
Quote:

Originally Posted by thilakjk (Post 3537839)
if yes is it possible to recover the data that was previously on that drive?
If it is possible how can i do it? Is there any software for this purpose?

There are data recovery tools and services available. Many of them will cost money though. I don't know enough about these services / software to recommend anything specific. A quick google search will turn up many options.
Quote:

Originally Posted by thilakjk (Post 3537839)
and my windows cant detect the swap drive? is this supposed to happen?

Yes, Windows can not read linux partitions. Linux can read Windows partitions though.
Quote:

Originally Posted by thilakjk (Post 3537839)
How can i see the swap space in linux itself?
I'm using Linux 9.04

You can't really "see" what is on the swap partition. Swap is space on the hard drive that is reserved to swap out programs from RAM if all your RAM is used up. If you have 1GB or more of RAM you will likely never actually use the swap space.
And by "linux 9.04" I assume you mean Ubuntu 9.04:
http://www.ubuntu.com/

And welcome to the LQ forums!

syg00 05-12-2009 01:36 AM

That's not quite correct. Been a while since I looked at the mkswap code, so I just ran a test. Just the first 2k will get walked on.
If a filesystem was on there this is fairly significant as it will make a mess of the meta-data - most (almost all) of the actual data should still be intact.
Of course if this swap was used (as swap), then there will be more data potentially over-written.

Photorec or foremost would probably be your best bet for recovery. Search here on LQ for numerous references.

To see the active swap, use "swapon -s"


All times are GMT -5. The time now is 12:38 AM.