Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Restore data from sata hd partition

  1. #1
    Join Date
    Sep 2010
    Location
    Galaxy cluster Nº 344.001
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Restore data from sata hd partition

    Hello,

    Ive installed ubuntu for the first time today, i have a hdd of 500gb, that had 65gb occupied with music, movies and games.

    What i did during installation:

    it asked me where to install it, so i created a new partition of 100gb ext4 type, to install it there, and i was going to leave the rest for the data, but it wont let me do it, so i went back and selected the "exchange type swap linux 0x82 type" for the 400gb partition.

    Then installed it, and now i cant find my data, and i have only 100gb of space in the hd, if i use the "disc utility" i can see the other 400gb, and change partition type, but i dont want to lose my data...

    any advice is welcome,

  2. #2
    Join Date
    Sep 2010
    Location
    Galaxy cluster Nº 344.001
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Restore data from sata hd partition

    i was wondering if i could add another exchange type partition of 3gb, and change the partition type of the other 397gb..., but i would like to know what type of partition to chose...

    thanks

  3. #3
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Restore data from sata hd partition

    You've rather lost me with what you've done partition-wise. I'm not sure what you mean by an 'exchange-type' but if that's a swap partition you may be misunderstanding what that's for. Linux uses a dedicated swap partition where Windows uses a swap file. You can't use it to store data and it only needs to be about 2GB in size, perhaps less and certainly no more than your available RAM. I really hope you don't have a swap partition of 400GB.

    So that we can see what is going on, open a terminal (Applications > Accessories) and post the output of the command:

    Code:
    sudo fdisk -l
    It will prompt you for your password and nothing appears to happen as you type it in. That is normal. You'll want to copy and paste the output - the keyboard shortcut for a copy in the terminal is not ctrl-C, but ctrl-shift-C. (Or you can use the edit menu in the terminal).

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  4. #4
    Join Date
    Sep 2010
    Location
    Galaxy cluster Nº 344.001
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Restore data from sata hd partition

    i've ubuntu in spanish, please excuse me if i dont translate it correctly.

    yes i have a swap partition of 400gb lol

    output of the fdisk -l

    in spanish:

    Disco /dev/sda: 500.1 GB, 500107862016 bytes
    255 cabezas, 63 sectores/pista, 60801 cilindros
    Unidades = cilindros de 16065 * 512 = 8225280 bytes
    Tamaño de sector (lógico / físico): 512 bytes / 512 bytes
    Tamaño E/S (mínimo/óptimo): 512 bytes / 512 bytes
    Identificador de disco: 0x000772d6

    Dispositivo Inicio Comienzo Fin Bloques Id Sistema
    /dev/sda1 * 1 12158 97654784 83 Linux
    /dev/sda2 12158 60802 390729729 5 Extendida
    /dev/sda5 12158 60802 390729728 82 Linux swap / Solaris


    translated:

    /dev/sda1 start: yes start:1 end: 12158 blocks: 97654784 id: 83 system: linux.
    /dev/sda2 start: no start :12158 end. 60802 blocks: 390729729 id: 5 system: extended
    /dev/sda5 start: no start :12158 end. 60802 blocks: 390729729 id: 5 system: linux swap / solaris

  5. #5
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Restore data from sata hd partition

    The bad news is that you have reformatted the whole drive and your 65GB of data will no longer be accessible unless you use special recovery software. Even if you do that, the Ubuntu system you installed to the first 100GB partition may have overwritten some of these files, depending on where physically they were written.

    Before you installed Ubuntu, what was the partition layout on the drive? Did you have Windows or was it just a storage drive?

    Your fdisk output shows:

    sda1 = partition 1, formatted with a Linux ext filesystem (probably ext4), 100 GB (93GiB) in size.

    sda2 = partition 2, an extended partition with one logical partition (sda5) occupying the whole of it. sda5 is a Linux swap partition of 400.1 GB (373 GiB).

    I hope you had your data backed up elsewhere. If not, and you need to recover the data, don't use that hard drive any more, to prevent any further writes to it. If you do need to recover the data, you need to attach that drive to another system, or boot up with the live CD and use the Ubuntu app testdisk. But, be warned, it is not easy for a newcomer to Linux.

    Post back with what you want to do and I might be able to point you in the right direction, but I won't be able to talk you through testdisk - I have minimal experience of it.

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  6. #6
    Join Date
    Sep 2010
    Location
    Galaxy cluster Nº 344.001
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Restore data from sata hd partition

    it was a storage drive, and i would like to restore some of the data, because i dont have it backed up... mostly music, books, photos and movies, and a few games.. but its my first time with linux and i think i wont be able to handle the recovery procedure... i mean, i just made a 400gb swap partition
    i would like you to advice me of what to do.

    Thanks

  7. #7
    Join Date
    Oct 2007
    Location
    Australia
    Beans
    136

    Re: Restore data from sata hd partition

    Oh no! I hope you didn't have anything important on there!?

    For future reference ALWAYS backup anything that you want to keep before you do potentially damaging disk activity (such as formating, partitioning, OS installation etc). You should still be able to recover some (if not all) of your data but the folders and filenames will be gone! I'd advise you to NOT start this PC again except from a live CD until you've recovered your data and if you haven't got one already, go and buy another harddrive (internal or portable - doesn't matter) or USB stick big enough for the files you want to recover.

    Have a look here for recovery info: https://help.ubuntu.com/community/DataRecovery

    Sorry late reply - thats what happens when I'm replying to multiple threads at once. Looks like coffeecat is helping you out. I have used the recovery tools I link to above but as I said above all the folders and file names will be gone so you'll have to go through the files individually to work out what they are.
    Last edited by JedMeister; September 4th, 2010 at 11:34 AM.

  8. #8
    Join Date
    Sep 2010
    Location
    Galaxy cluster Nº 344.001
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Restore data from sata hd partition

    yes i had very important stuff, specially books (ill get them somehow), music (and some very rare records, that i might not find again) and some photos... the movies/games are not important,

    Maybe its a "signal" to start all over from 0?...

    wish i could recover it without having to remember all those lines to type after booting from the live cd... or at least have a paper-copy...
    Last edited by octohedra; September 4th, 2010 at 11:45 AM.

  9. #9
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Restore data from sata hd partition

    Quote Originally Posted by JedMeister View Post
    Have a look here for recovery info: https://help.ubuntu.com/community/DataRecovery

    Sorry late reply - thats what happens when I'm replying to multiple threads at once. Looks like coffeecat is helping you out. I have used the recovery tools I link to above but as I said above all the folders and file names will be gone so you'll have to go through the files individually to work out what they are.
    @octohedra, I'm not sure I can add much to what JedMeister has said. Read the link and particularly the bit about using testdisk. If you boot from the live CD and can connect to the internet, you can install testdisk. It's installed to RAM in a live session so will be lost as soon as you power down, but at least you can use it while still using the live CD.

    I'm sorry I can't be of further help because I only used testdisk/photorec once to recover non-critical data. I remember that photorec is not straightforward. You can use testdisk to restore a lost partition, but now that you've written to sda1 this may not be feasible - I really don't know. The app photorec is part of testdisk and can recover various types of files - not just jpegs. The problem with it is, as JedMeister says, your original file and folder names are gone. You'll get hundreds of files with obscure names which you then have to sort through by hand. Not a pleasant job.

    This is the package information for testdisk:

    TestDisk checks the partition and boot sectors of your disks.
    It is very useful in recovering lost partitions.
    It works with :
    * DOS/Windows FAT12, FAT16 and FAT32
    * NTFS ( Windows NT/2K/XP )
    * Linux Ext2 and Ext3
    * BeFS ( BeOS )
    * BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
    * CramFS (Compressed File System)
    * HFS and HFS+, Hierarchical File System
    * JFS, IBM's Journaled File System
    * Linux Raid
    * Linux Swap (versions 1 and 2)
    * LVM and LVM2, Linux Logical Volume Manager
    * Netware NSS
    * ReiserFS 3.5 and 3.6
    * Sun Solaris i386 disklabel
    * UFS and UFS2 (Sun/BSD/...)
    * XFS, SGI's Journaled File System
    .
    PhotoRec is file data recovery software designed to recover
    lost pictures from digital camera memory or even Hard Disks.
    It has been extended to search also for non audio/video headers.
    It searchs for
    * Sun/NeXT audio data (.au)
    * RIFF audio/video (.avi/.wav)
    * BMP bitmap (.bmp)
    * bzip2 compressed data (.bz2)
    * Source code written in C (.c)
    * Canon Raw picture (.crw)
    * Canon catalog (.ctg)
    * FAT subdirectory
    * Microsoft Office Document (.doc)
    * Nikon dsc (.dsc)
    * HTML page (.html)
    * JPEG picture (.jpg)
    * MOV video (.mov)
    * MP3 audio (MPEG ADTS, layer III, v1) (.mp3)
    * Moving Picture Experts Group video (.mpg)
    * Minolta Raw picture (.mrw)
    * Olympus Raw Format picture (.orf)
    * Portable Document Format (.pdf)
    * Perl script (.pl)
    * Portable Network Graphics (.png)
    * Raw Fujifilm picture (.raf)
    * Contax picture (.raw)
    * Rollei picture (.rdc)
    * Rich Text Format (.rtf)
    * Shell script (.sh)
    * Tar archive (.tar )
    * Tag Image File Format (.tiff)
    * Microsoft ASF (.wma)
    * Sigma/Foveon X3 raw picture (.x3f)
    * zip archive (.zip)
    I'd better say no more because if you need help with testdisk and photorec you need someone who has real experience of it.

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  10. #10
    Join Date
    Sep 2010
    Location
    Galaxy cluster Nº 344.001
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Restore data from sata hd partition

    then i think ill start from 0, its too complicated, i dont have time.
    Could you please help me to fix the 400gb swap partition?

    Thanks!

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •