Results 1 to 4 of 4

Thread: Partitions goes into breadcrumbs after interrupted operation

  1. #1
    Join Date
    May 2014
    Beans
    2

    Red face Partitions goes into breadcrumbs after interrupted operation

    Hi guys !
    Yesterday i was trying to reduce the size of a partition with gparted and ubuntu (Gnome 13.10) crashed entirely, while gparted was running.
    Needless to say that i was worried about my partitions destiny.
    So i booted on a kali linux live cd and tried to launch a repair with testdisk. In fact it totally messed up my hard drive :

    (there used to be "Data", "Fichiers", Free space, and a logicial partition containing a little swap and around 55go ext4)
    Notice the largest partition in the world at the end.

    fsck is'nt sucessful either.
    Does anyone know how i could restore my partition ? or at least get the folders back for backup ?
    thank you a lot, and sorry for the poor english
    Last edited by Mininao; May 7th, 2014 at 10:56 PM. Reason: spellcheck

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Partitions goes into breadcrumbs after interrupted operation

    Power failure in the middle of a partition change is about worst case.
    Part of data is in one place and part in another and it is about impossible to restore the parts.
    Humpty-Dumpty has fallen down.

    Do you know exact partition sizes before, by sector? If you were just reducing size, only the data at end of partition was being moved so rest may be there. But anything that was being moved may not be.

    Use parted rescue to restore missing partition details in post #22
    http://ubuntuforums.org/showthread.php?t=1775331
    http://www.gnu.org/software/parted/m...de/rescue.html
    http://gparted.sourceforge.net/faq.php/#faq-22

    If parted or testdisk cannot get partitions back, then photorec is the last choice. I have used it and it takes forever. I had to run it overnight on a smaller drive and have another drive of same size as data it may find. It found in my case all the deleted text files also, but does not find file names, just extensions. So I had to do a lot of grep to find file and file compares to try to find most recent and add text back to last backup.


    Testdisk & photorec
    http://www.cgsecurity.org/wiki/PhotoRec
    http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step
    http://www.psychocats.net/ubuntucat/...rdeletedfiles/
    http://ubuntu4beginners.blogspot.com...otorec-in.html

    Use scripts to help sort and rename files:
    http://www.cgsecurity.org/wiki/After_Using_PhotoRec
    use flac tags to rename files
    http://lglinux.blogspot.com/2008/10/...ame-files.html
    http://system-tricks.com/index.php/d...overy-results/
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    May 2014
    Beans
    2

    Re: Partitions goes into breadcrumbs after interrupted operation

    Hi,
    thanks for your answer, i will try to recover it with parted.
    The only problem (with both Gparted and parted), is that i get the following error when trying to print :

    Here is the partition before i attempted to resize it :


    You'll notice that i tried to reduce the size of "Fichiers" only.
    My ext4 partition went into breadcrumbs only after testdisk messed it up.

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Partitions goes into breadcrumbs after interrupted operation

    If it is related to partition table fixparts often rebuilds a partition table. It recalculates correct values for entire drive and extended partition size. But cannot fix size of a partition.

    First backup partition table, use your drive for sdX or sda, sdb etc.
    sudo sfdisk -d /dev/sdX > parts.txt
    And in extreme cases you can manually edit the parts.txt file as it is just txt.


    Fixparts - Repair broken partition tables (not overlapping issues) & delete Stray gpt data from MBR drives
    http://ubuntuforums.org/showthread.p...7#post10367957
    http://ubuntuforums.org/showthread.php?t=1705325


    Using sfdisk to fix partition table problems - not without risk
    http://ubuntuforums.org/showthread.php?t=1192598
    Equivalent sfdisk values would keep the start point and convert the end point via the formula size = end - start + 1.
    Also fdisk -lu shows start & blocks, blocks * 2 also equals size in sectors
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

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
  •