LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-12-2009, 01:29 AM   #1
thilakjk
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Exclamation 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
 
Old 05-12-2009, 02:08 AM   #2
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 291Reputation: 291Reputation: 291
Quote:
Originally Posted by thilakjk View Post
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 View Post
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 View Post
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 View Post
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!
 
Old 05-12-2009, 02:36 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,964

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
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"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux tool for assigning drive letters to Windows XP partitions? moxieman99 Linux - General 3 10-23-2008 04:56 PM
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 04:20 AM
assigning a swap partition after installation Cinematography MEPIS 3 07-28-2005 12:09 PM
linux swap format tedist_god Linux - Software 6 09-19-2003 12:02 PM
Assigning swap to a partition. bmike1 Linux - General 15 07-26-2003 07:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration