Announcement

Collapse
No announcement yet.

recover a partition

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

    recover a partition

    Dear All,
    I had Windows 10, Kubuntu 20, Kubuntu 22 and Lubuntu.
    As the size for Lubuntu was too small, I reduced the size of Kubuntu 22 (from the right) and I began to increase the size of Lubuntu (from the left). But suddenly the increase stopped and there are only Windows 10 and Kubuntu 20 left.
    Could you please help me to recover Kubuntu 22? The lost of Lubuntu don't heart me much.
    Kubuntu 22 was installed with a partition for the system and another one for the files.
    Attached Files

    #2
    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.

    Please Read Me

    Comment


      #3
      Thank you very much oshunluvr for your answer.
      I did'nt move any data from or on the transformed partitions. I will try testdisk because I changed Kubuntu22 successfully.
      I don't really care for the few lost files (the difference with my back up). I care for the numerous opened tabs of the browser and the sessions which were registered in it.
      I will write you how it will go on.

      I've been thinking about using GPT partitioning, but I got this computer with Windows 10 installed on it using MBR. This is why I installed linux on MBR. Would it have been possible to have a mix of GPT and MBR partitioning?

      Comment


        #4
        Originally posted by nicrnicr View Post
        ]…|Would it have been possible to have a mix of GPT and MBR partitioning?
        Only on two separate drives (for example /dev/sda and /dev/sdb).
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


          #5
          Originally posted by nicrnicr View Post
          I've been thinking about using GPT partitioning, but I got this computer with Windows 10 installed on it using MBR. This is why I installed linux on MBR. Would it have been possible to have a mix of GPT and MBR partitioning?
          Not "mix" exactly. However, it is possible to convert from MBR to GPT if your current drive layout allows it. I really only mentioned it for future reference. I wouldn't even consider messing with a drive with that many partitions and various OSs.


          Please Read Me

          Comment


            #6
            Hello oshunluvr and Schwarzer Kater,

            Thank you for your answers.

            I used testdisk without changing anything on the proposition of partitions and when I turn on the computer, I don't have any choice of system (I had previously the choice of systems, though only two systems booted).
            This time Lubuntu boots directly and I have access to the files of Kubuntu 20 and Kubuntu 22.
            I can save all files and keep on looking for a way to boot with Kubuntu 22. If I'm successful, I would be after looking on how to boot with Windows 10.
            Last edited by nicrnicr; Jan 01, 2023, 09:20 PM.

            Comment


              #7
              Partitions after the use of testdisk.
              There is no langer any swap.
              Attached Files

              Comment


                #8
                Originally posted by nicrnicr View Post
                […]
                This time Lubuntu boots directly and I have access to the files of Kubuntu 20 and Kubuntu 22.
                I can save all files and keep on looking for a way to boot with Kubuntu 22. If I'm successful, I would be after looking on how to boot with Windows 10.
                My goal in your situation would simply be data recovery first and foremost.

                If and when I were able to revover all my data (ideally everything were in my backups, of course), I would wipe the disk (GPT this time), install everything from scratch (Windows first!) and copy my data back - because I would not trust the integrity of a supposedly corrupt partition table or file system/table any longer/at all!

                And ideally I would have backups of my Linux systems (Timeshift, et al…), probably even of Windows if there was something important in the claws of a Microsoft system…
                (And the whole partition table as oshunluvr mentioned above).

                Just my two cents and an "ideal" scenario. I am holding thumbs for you.

                PS:
                Originally posted by nicrnicr View Post
                […]
                This time Lubuntu boots directly and I have access to the files of Kubuntu 20 and Kubuntu 22.[…]
                So you can copy the .mozilla directory now to restore your Firefox-Tabs (as an example for other browsers and other settings you wish to keep).
                Last edited by Schwarzer Kater; Jan 02, 2023, 02:49 PM. Reason: typos and added PS
                Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                Comment


                  #9
                  Originally posted by nicrnicr View Post
                  Dear All,
                  I had Windows 10, Kubuntu 20, Kubuntu 22 and Lubuntu.
                  As the size for Lubuntu was too small, I reduced the size of Kubuntu 22 (from the right) and I began to increase the size of Lubuntu (from the left). But suddenly the increase stopped and there are only Windows 10 and Kubuntu 20 left.
                  Could you please help me to recover Kubuntu 22? The lost of Lubuntu don't heart me much.
                  Kubuntu 22 was installed with a partition for the system and another one for the files.
                  I know it is easier said than done: but try planning ahead next time, if possible…

                  And if you ab-so-lute-ly have to do something like this again: any time I succeeded (roughly 40 out of 50 times) was by booting from an USB-stick with GParted. (https://gparted.org)

                  I just wrote this, because you did not tell us what you had done in detail - not that it would matter at this point, I think…
                  Last edited by Schwarzer Kater; Jan 02, 2023, 02:36 PM.
                  Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                  Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                  get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                  install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                  Comment


                    #10
                    Dear oshunluvr, dear Schwarzer Kater,

                    Thank you very much for your piece of advice.

                    As I used testdisk, I didn't do anything special. I just "enter", "enter", "enter" or did what is written in the simple tutorials without changing L, P or ext of any partition.
                    As I wrote previously, I could save all my data. The difference with my backup was small.
                    As I started the computer for the second time, I was given the choice between the 4 systems. I started Kubuntu 22 successfully and I suppose that Windows 10 and Kubuntu 20 work (and if they don't work I don't care). I can select each of the tabs of my browser, which was for me the most important.

                    "So you can copy the .mozilla directory now to restore your Firefox-Tabs (as an example for other browsers and other settings you wish to keep).​"
                    Thank you Schwarzer Kater because I didn't know this.

                    "I know it is easier said than done: but try planning ahead next time, if possible…"
                    Yes, I have to save my tabs and my sessions outside the computer.

                    "And if you ab-so-lute-ly have to do something like this again: any time I succeeded (roughly 40 out of 50 times) was by booting from an USB-stick with GParted. (https://gparted.org)​"
                    I used a USB flash drive with Lubuntu on it, and I used its partitionmanager.​

                    I still don't have any swap. It might be because I had to unmount the swap of the original partition in order to increase the size of the Lubuntu partition at its left.
                    The swap might be the blue partition at the right of sda7. I'm too afraid of trying to mount it, as everything work fine.

                    Thank you again.

                    Cheers

                    Comment


                      #11
                      Originally posted by nicrnicr View Post
                      The swap might be the blue partition at the right of sda7. I'm too afraid of trying to mount it, as everything work fine.
                      Show us your /etc/fstab file.
                      Windows no longer obstructs my view.
                      Using Kubuntu Linux since March 23, 2007.
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #12
                        The /etc/fstab file is
                        Code:
                        # /etc/fstab: static file system information.
                        #
                        # Use 'blkid' to print the universally unique identifier for a
                        # device; this may be used with UUID= as a more robust way to name devices
                        # that works even if disks are added and removed. See fstab(5).
                        #
                        # <file system> <mount point>   <type>  <options>       <dump>  <pass>
                        # / was on /dev/sda7 during installation
                        UUID=17854a0b-4743-479f-92b7-c644c978a4ab /               ext4    errors=remount-ro 0       1
                        # /home was on /dev/sda9 during installation
                        UUID=ad392a39-a7b7-4a57-bd4b-3ac2636929ef /home           ext4    defaults        0       2
                        # swap was on /dev/sda6 during installation
                        UUID=96b7fac7-340e-4e13-ab55-192ab9b5c513 none            swap    sw              0       0
                        //share.in.bksys.at/shared /s cifs guest,user,uid=1000,gid=1000 0 0
                        ​
                        I wrote yesterday
                        Code:
                        I still don't have any swap. It might be because I had to unmount the swap of the original partition in order to increase the size of the Lubuntu partition at its left.
                        The swap might be the blue partition at the right of sda7. I'm too afraid of trying to mount it, as everything work fine.​
                        I'm planing since today to move this partition sda8 to the far right and then to increase the size of sda7 to 10 GB, which was my initial plan. At the end I'm intending to mount the sda8 and I think that it should become a swap.

                        Comment


                          #13
                          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.
                          If there was an easy "how to guide for LINUX ONLY" as it sounds like a wonderful program. Everything I've come across it keeps jumping from windows, then mac then Linux and like basic simple things that I can already figure out just from the question and options asked using the program.
                          HAVEN'T found one GUIDE or HOW TO on recovering a lost partition, or recovering lost files.... That I can follow for LINUX ONLY.

                          Originally posted by oshunluvr View Post
                          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.
                          Photorec is the bees knees at PHOTO'S. It recovered 30gig, then I stopped it. I was searching for MKV. Found lots of them. All the same movie file but fragmented to heck. I think the original file as 1.2Gig in size, and the biggest chunk if found was 240Kb.. KILO BYTES. It played for 2 seconds then jumped to 10mins something seconds and played that (jerky) for 3 seconds then stopped.
                          Did same for all the other pieces, start then some random section of the 49Minute movie.
                          Totally useless, IMHO.
                          Only use to recover PHOTOS.
                          Oh! and the 1,000's of txt files contained garbage. From what I can tell (it's been decades since I had to decode software to repair errors) it look like a hex printout of a program. Most wouldn't open in the text editor.

                          Putting those files back together is an impossible pointless task.
                          Just My Humble Opinion and an FYI for others.

                          Comment

                          Working...
                          X