Swap drive mess up, my fault HELP!

Asked by Topsie

Okay...

I'm new to ubuntu, and this is my first install.... which went fine. Then i tried to look for my 500GB USB Hard drive.

No where to be seen.

i've dual booted with windows, so i didn't worry, but windows cant find the drive either...

i used the usb drive as my swap drive... didn't say anything about formatting it. but, this does seem to be exactly what its done. Can i get my data back? Help!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Topsie
Solved:
Last query:
Last reply:
Revision history for this message
Pascal Fares (pascalfares) said :
#1

Hello,

A swap drive is not a data drive, it is used for virtual memory. What are the data that you need back?

Can you give the content of the file /etc/fstab?

Revision history for this message
Topsie (topsie-turner) said :
#2

Yeah i can

About 200gb of videos and music that have taken an age to put together... anyway of just remounting the drive? its as if its no longer there...

Actually, i just realised what u mean... shows how much i know....

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda5
UUID=a105f190-ee02-4cbf-b2ba-161e122cb20e / ext3 relatime,errors=remount-ro 0 1
# /dev/sdb1
UUID=3e2d22d8-3993-44b7-bfab-3112fac7273a none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0

Regards for the help... im lost!

Revision history for this message
Pascal Fares (pascalfares) said :
#3

Ok

Type sudo parted /dev/sdb (your usb must be pluged)

when you get the (parted) prompt type print

and give the result (copy/paste)

Revision history for this message
Topsie (topsie-turner) said :
#4

(parted) print
Model: Maxtor 3200 (scsi)
Disk /dev/sdb: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 500GB 500GB primary linux-swap boot

Again, Many thanks!

Revision history for this message
Pascal Fares (pascalfares) said :
#5

Bad news! i am afraid that all you data are lost! You have only one partition and it is a swap partition for Linux!

Revision history for this message
Topsie (topsie-turner) said :
#6

Cheers for the help! im glad there was a good warning that data on that partition would be lost :S

Thanks for your help!

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#7

You can try to use TestDisk to recover your data.
http://www.cgsecurity.org/wiki/TestDisk

Please thoroughly read and review the documentation sections regarding this program before you use it.

It is recommended to run testdisk from a recovery CD or an Ubuntu LiveCD.

To install TestDisk, please enable the universe repository from the menu System-> Administration-> Software Sources. Then open a terminal from Applications-> Accessories-> Terminal and type

sudo apt-get update
sudo apt-get install testdisk

You cannot run test disk on mounted partitions/drives. And you must run testdisk with root privileges, so from the terminal

sudo swapoff
sudo umount -a
sudo testdisk

Hope this helps