Announcement

Collapse
No announcement yet.

Disk error-unable to recover

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Disk error-unable to recover

    Hello all,
    I accidentally wrote two new partitions to my main backup (internal) drive which I cannot backup externally as external drive too small (8gb internal to 2gb external)
    What I wrote (god know how) is pinephone twoboot, using DD
    It's two partitions, one is 12meg, the other is 20meg
    the thing is, this drive is used buy a virtual machine, and I can access some folders via the external machine (qbittorrent) which uses some of this drive.
    I have important files that I am sorting through.
    Now the data is still there, something is going to have been lost but it it shouldn't be that important.
    Via kde partition manager, or Dolphin or (VM PCMan) I can access two folders. Every other folder I cannot. I get "Unable to access folder....... Protocol Error"

    Q-What is the best way to restore access to this data.
    FYI - I do NOT have a spare 8GB HDD lying around so what I can get is getting moved to various other smaller drives. It's all I can do. I thought I had a spare 8GB HDD, but I've recently been forced to move and it's no-where to be found.

    I wouldn't be asking this as Urgent if it wasn't.
    Many thanks to all

    #2
    Would this do ?
    https://www.simplified.guide/linux/d...artition-table

    EDIT--- It's amazing. Before I started this thread, I Internet searched "kubuntu how to recover partition" and got basically the link above, and stuff form 10+ years ago.
    Just did this search again using Giggle, and got several PREVIOUS Kubuntu Forum Threads....
    https://www.kubuntuforums.net/forum/...er-a-partition
    https://www.kubuntuforums.net/forum/...very-partition
    https://www.kubuntuforums.net/forum/...artitions-data
    https://www.kubuntuforums.net/forum/...drive-recovery

    Why oH why does this occur !!!! I am angry with myself, and appologise to the community....
    Originally posted by oshunluvr View Post
    The program "testdisk" may be able to recover your partition table but if you started moving data, it's likely trashed or at least some of it.
    The program "photorec" can recover files and does a good job of it, but won't have filenames so you'll have many, many hours going through the recovered files.

    You're probably better off restoring from a backup. I would never mess with partitioning without a recent backup.

    So based on your description, IF the Kubuntu 22 partition size change completed successfully prior to the "crash", test disk MAY be able to simply recreate the partition table and you're good to go.
    If not, you may be stuck with many hours of file recovery. You'll need enough free storage on another drive to use photorec.

    It's clear from your screenshot that you are still using MBR partitioning. Had you been using GPT partitioning, you would have a backup partition table. That's one of the advantages of GPT partitioning.
    For future reference: It is fairly simple to make a partition table backup. I think I wrote a How-To about that on here like a decade ago or more.
    One positive thing to note is if the issue is only the partition table - it can be rebuilt without deleting data.

    I wish you luck.

    From the First kubuntu Forum link above.

    HOW Do I Recover, as in where is it, GPT partition? Please and TIA !!!!

    EDIT 2--- Running testdisk.
    So I've followed the instructions since two websites and one of the kubuntu links pointed to it, I've followed it.
    I've selected the drive
    Analyse
    Quick Search
    and I have this. What do I select please. I am on pause and praying for no power outages.
    Click image for larger version

Name:	230823@1414-Testdisk-Analyse-QuickSearch=Results.jpg
Views:	258
Size:	74.0 KB
ID:	673483
    A = Add partition - I don't really need pine64 Two-Boot so Nah
    L = Load backup... Hmm Good idea ?? Yes or No
    T = Change type.. Huh WTHeck
    P = List Files... I cannot access them so listing them seams a little redundant, but might be useful if some Kubuntu Experienced person says too

    TIA Kubuntu Forums People.
    Last edited by CharlieDaves; Aug 22, 2023, 10:20 PM.

    Comment


      #3
      Okay. Something weird. I've used this command some weeks ago (pinePhone64 stuff) and never noticed the "loop". Thought I would throw this Question in here as well
      lsblk
      NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
      loop0 7:0 0 237.2M 1 loop /snap/firefox/3026
      loop1 7:1 0 73.9M 1 loop /snap/core22/817
      loop2 7:2 0 63.4M 1 loop /snap/core20/1974
      loop3 7:3 0 73.9M 1 loop /snap/core22/858
      loop4 7:4 0 349.7M 1 loop /snap/gnome-3-38-2004/143
      loop5 7:5 0 237.2M 1 loop /snap/firefox/2987
      loop7 7:7 0 4K 1 loop /snap/bare/5
      loop8 7:8 0 349.7M 1 loop /snap/gnome-3-38-2004/140
      loop9 7:9 0 485.5M 1 loop /snap/gnome-42-2204/126
      loop10 7:10 0 485.5M 1 loop /snap/gnome-42-2204/120
      loop11 7:11 0 53.3M 1 loop /snap/snapd/19361
      loop12 7:12 0 91.7M 1 loop /snap/gtk-common-themes/1535
      loop13 7:13 0 53.3M 1 loop /snap/snapd/19457
      loop14 7:14 0 63.5M 1 loop /snap/core20/2015
      sda 8:0 0 111.8G 0 disk
      └─sda1 8:1 0 111.8G 0 part /var/snap/firefox/common/host-hunspell
      /
      sdb 8:16 0 931.5G 0 disk
      └─sdb1 8:17 0 931.5G 0 part /home
      sdc 8:32 0 7.3T 0 disk
      └─sdc1 8:33 0 7.3T 0 part
      └─luks-1fdf3738-0272-4f9d-a425-82ae257eeb97
      253:0 0 7.3T 0 crypt /media/mm3/Nu-Alpha-08
      sdd 8:48 1 5.5T 0 disk
      └─sdd1 8:49 1 5.5T 0 part /media/mm3/S-Drive
      sde 8:64 0 1.8T 0 disk
      └─sde1 8:65 0 1.8T 0 part /media/mm3/Delta-Two-Niner
      sdf 8:80 0 447.1G 0 disk
      └─sdf1 8:81 0 447.1G 0 part /media/mm3/Sphere1903
      sr0 11:0 1 1024M 0 rom


      ​Q-Whats with the loop stuff? Have I really stuffed my PC up, and should urgently purchase a new 12TB HDD, and backup everything, wipe and restart?
      OR
      Is there some simple fix.

      Comment


        #4
        Originally posted by CharlieDaves View Post
        ​Q-Whats with the loop stuff?
        Ignore the "loop stuff", they're non-real devices set up and managed by the snap daemon.

        You've quoted oshunluvr saying "I would never mess with partitioning without a recent backup", and you imply you've written partitions over your data, which definitely counts as "messing". So, making an image copy (say, clonezilla) of the storage would be the recommended first step in a recovery process. Any normal access, such as reading from the storage, may be doing further damage. I presume where you say "8gb internal to 2gb external" that's really TB.
        Regards, John Little

        Comment


          #5
          Originally posted by jlittle View Post
          Ignore the "loop stuff", they're non-real devices set up and managed by the snap daemon.

          You've quoted oshunluvr saying "I would never mess with partitioning without a recent backup", and you imply you've written partitions over your data, which definitely counts as "messing". So, making an image copy (say, clonezilla) of the storage would be the recommended first step in a recovery process. Any normal access, such as reading from the storage, may be doing further damage. I presume where you say "8gb internal to 2gb external" that's really TB.
          Yes. Terabytes. My mistake...

          Originally posted by oshunluvr View Post
          It's clear from your screenshot that you are still using MBR partitioning. Had you been using GPT partitioning, you would have a backup partition table. That's one of the advantages of GPT partitioning.
          ​This is the question I was asking about, with the image of testdisk. Oshunluv is referring that GPT partition would have a backup.... So does it? Where is it? And on the testdisk current location it's asking to "load backup"
          I'm about to do a clonezilla if the system will allow me. I've managed to free up a 6Tb, but I know the 8Tb wasn't anywhere near full. I am sure the last time I looked it was 2.5 or more free space so hopefully it will fit.
          THEN do I do this "Load Backup GPT table" that testdisk has found? It's in analyse mode..

          Originally posted by jlittle View Post
          Ignore the "loop stuff", they're non-real devices set up and managed by the snap daemon.​
          Many thanks for fast reply jlittle

          Running Clonzilla (after stopping testdisk) I get this error.
          Warning: Not all of the space available to /dev/sdd appears to be used, you can fix the GPT to use a
          ll of the space (an extra 11720973454 blocks) or continue with the current setting?


          What The Heck?
          Last edited by CharlieDaves; Aug 23, 2023, 12:05 AM.

          Comment


            #6
            Well that was a bust on clonezilla. Device to device. all it copied was the two-boot (Still called S-Drive - EXT4) and the 2nd Pine64 partition. Nothing else.

            Had to unmount /dev/sdd in order for clonzilla to find it.
            NOW I cannot mount it. The system things it's Pine64 tow-boot. No more label as S-Drive
            Bummer
            ---
            EDIT
            ---
            Now reading through this
            https://www.minitool.com/lib/gpt.html
            There is a backup GPT table at the end of the HDD. How do I tell or get linux to get and use it as the primary GPT and override whatever is there? PLEASE. AnyOne
            Last edited by CharlieDaves; Aug 23, 2023, 12:55 AM.

            Comment


              #7
              https://www.cgsecurity.org/wiki/Test..._file_for_ext2

              Q for the community..... Does Testdisk work on ext4 or only ext1 and 2

              Maybe that's why it's been running for 12+Hrs and.... well.... still waiting.....

              Comment


                #8
                TestDisk for me always ran well on ext4.
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  I haven't messed with this for quite awhile, but here's what I wrote up last time I did it:

                  Fix UEFI+GPT with Testdisk & gdisk -- Deleted partitions & damaged GPT structure
                  https://www.kubuntuforums.net/forum/...ge8#post536190
                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment


                    #10
                    Where is create post button ?

                    Comment


                      #11
                      Where is create post button ?
                      Click on Forum (at the top left). Keep clicking on sub-forums you are interested in.
                      You will eventually come to a button saying "New Topic."
                      Click New Topic, and start your post (write your post, then click Save).

                      For example, you might click on the following as you "drill down" to your goal:

                      Forum
                      Currently Supported Releases
                      Kubuntu 22.04 Jammy Jellyfish (LTS)
                      Pre-Installation​

                      ... then you will see New Topic button.
                      Last edited by Qqmike; Aug 25, 2023, 07:44 AM.
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #12
                        A friend working on her MS degree lost the HD in her laptop a week before her thesis was due. Her HD wouldn't boot and couldn't be accessed via a LiveUSB.
                        I used DD to copy of the entire HD as a file on another, larger HD. Then I used photorec to extract files from the copy. I manged to recover 1,495 files out of 1,500, including her thesis and the photos used in it.
                        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                        – John F. Kennedy, February 26, 1962.

                        Comment


                          #13
                          A friend working on her MS degree lost the HD in her laptop a week before her thesis was due. Her HD wouldn't boot and couldn't be accessed via a LiveUSB.
                          I used DD to copy of the entire HD as a file on another, larger HD. Then I used photorec to extract files from the copy. I manged to recover 1,495 files out of 1,500, including her thesis and the photos used in it.​
                          Good job! Yeah, I've also had pretty good luck with TestDisk and Photorec, even though it may require a little elbow grease to sort out the finds -- and they tell ya so, too, that you need to sort through the files recovered. We need some AI help!!!
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #14
                            Originally posted by Qqmike View Post
                            Good job! Yeah, I've also had pretty good luck with TestDisk and Photorec, even though it may require a little elbow grease to sort out the finds -- and they tell ya so, too, that you need to sort through the files recovered. We need some AI help!!!
                            Well, my intelligence is about as "artificial" as one can get, and the bit rot is increasing exponentially. AI would be nice but what AI would actually do to help Photorec I can't imagine. It certainly can't rename the photos because it would have no memory of where the photos were taken or for what purpose.

                            I forgot to mention, and I'm trusting my bit-rotted memory here, that it took Photorec about 14 or 15 hours to do the extraction. It got the extensions correct but the names were alpha-numeric strings which the girl had to look at individually and rename. I don't know how long that took her but I suspect that she started with the photos in her thesis first because, as I said, she handed in her thesis in time.

                            I haven't had to use Photorec since then.
                            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                            – John F. Kennedy, February 26, 1962.

                            Comment


                              #15
                              Yeah my photorec experience was a complete failure.
                              Testdisk is also proving elusive

                              take 2 on testdisk. I attempted the create a .img file, but if failed, then I read I should have used "mapfile" as it would have allowed me to get the remaining 4%. I have currently tried these, in an attempt to see what files testdisk recovers. so far, nada.
                              Click image for larger version

Name:	230830 - ddrescue what am I doing wrong.jpg
Views:	211
Size:	135.2 KB
ID:	673584
                              16 % completed and still nothing written to my external sde1 disk.
                              So as the file name suggests, what am I doing. wrong

                              Oh! Thanks to Qqmike for his book on ddrescure. I've read through 25% and it just confuses the heck out of me. 90% of what I've read your using if=zero or in other words WIPING the disk. haven't found a single section of actual "data recovery", which is what ddresuce was originally created for. But still thanks.

                              Comment

                              Working...
                              X