I had selected a partition (F) for swap area while installing.
To explain this I need to star with a clarification of partitions, filesystems and volumes.
A disk is usually one physical device. *1.
A partition is a piece of that disk. If you wish you can compare the disk with a book, and the partition with a number of pages (e.g. page 100 till 150).
A filesystem is a way to write information to the disk. E.g. take a number of blank pages, add horizontal lines to write on, add special marking on the first page to contain a title etc etc.
A volume is what is exposed to the user. It is the result of a filesystem on a raw disk (using the whole disk) or on a partition. Your F:\ would be a filesystem, as are C:\ and D:\
You wrote: "I selected a partition (F) for swap area while installing.".
Linux has two ways of using swap:
- To a file on a disk.
- To a raw partition or a raw disk.
Usually the second option is chosen because it skips the overhead of a filesystem. Briefly said it is simpler and faster. *2
The way I read your post you selected the partition previously available as volume F:\ to be used as a swap partition. Then
mkswap was used on it when needed information was paged out from memory to this partition. This overwrites any data which was previously present.
All this means that your old data on F:\ is gone. If you never needed the swap then you might recover it with some programs, but it is ever was used then the data has been overwritten.
To recover F:\ as empty space:
- Go to disk management (start, run,
- Change the filesystem on what is now swap (0x83) to something windows recognizes (e.g. to the ID of NTFS).
You now have your old F:\ volume back.
I have un-installed Ubuntu from (D), but Windows is unable to see or access
the swap area that is (F). It does not displaying (F) in 'my computer'.
Windows sees the swap partition just fine. However it is not in a format that it can use.
How do I get that partition (F) back, as it has got some information on it that I need.
To get it back, see the 3 points with diskmanagement.
To get the information back, restore F: using those three option and restore the data which you need from your backup.
I also read in a forum to use 'manage' option and then delete the partition,
but, I am unable to do that, as I have got info in that partition (F).
In all likelihood you no longer have that information on that partition.
Is it possible to remove swap area without losing any info in that partition?
No, because to already wiped that information.
If you have no backups and really need that information then turn off your computer. Remove the disk and take it to someone who can make a raw image if the disk and who can attempt*3 recovery on that.
*1: Usually because I am ignoring external drives with internal HW RAID.
*2: Windows used to do the same. One or more partitions for the OS and one partition for swap. Later they abandoned this in favour of swapping to a file. This is the default
C:\pagefile.sys. It is probably a wise marketing choice to do it that way.
*3: Attempt. If you actually used the swap partition then there is nothing to recover.