Announcement

Collapse
No announcement yet.

Need to recover my installation after partition extension failed

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

    Need to recover my installation after partition extension failed

    As titled, the partition extension to my dual booted Kubuntu threw up an error and it totally broke the grub. I tried all the usual grub rescue commands I found on YouTube and even though people commenting were delighted, it still didn't fix mine. It found the location of the grub in hd0, msdos6 when I did command "set", but when I did the "insmod normal" command it just said "no such partition".

    Eventually I decided to temporarily install a second Kubuntu partition so that it could create a new grub (then I can delete it later) and and it did create a new grub and my Windows 7 is on the list but the original Kubuntu installation is not on the list. I'm now posting this from Windows 7 and I can see the old partition is still there on the partition manager (and on Kubuntu's partition manager too), I just need to somehow get the original Kubuntu installation back on the new grub so I can log into it.

    I'm still quite new to Linux but I've had this installation for 8 months and I'd hate to lose it if it's still there. Any help is appreciated.
    • Kubuntu 20.04
    • KDE Plasma version: 5.18.5
    • KDE Framework version: 5.68.0
    • Qt Version: 5.12.8
    • Kernel version 5.11.0-40-generic
    • Dell Vostro 220
    • X86-based PC
    • 4gb RAM
    • Intel Quad Core Q9550 2.83mhz
    • Bios: Dell 1.0.3 24/10/2008

    #2
    It seems that a lot of people have had good luck with
    Boot-Repair
    https://help.ubuntu.com/community/Boot-Repair

    I would try that (you'll have to wade through that page; they've improved it; I haven't looked at it in ages but I keep a live Boot-Repair USB in my desk drawer here).

    In addition, in theory, you can boot a live USB (like your Kubuntu USB), and "chroot" into the damaged partition to reinstall grub (from your live session). I have done it. I/we here can get you some how-to's on that. I've written a how-to on it somewhere here. First try the Boot-Repair.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      My how-to:

      Re-install GRUB2 from Live DVD/USB flash drive

      https://www.kubuntuforums.net/forum/...l=1#post537598

      I hesitate to give you this only because I'm so rusty on it. Fact is, it uses techniques that are advanced (but easy to copy/type into Konsole). I can't say that I fully understand it (from a programming standpoint). But, like a lot of folks here, I've "cook-booked it," used it, on occasion to get the job done. Perhaps you have experience using such command methods.

      There is also the issue of booting by the old grub (legacy) versus booting by Grub-UEFI ... and that's yet another issue to be aware of. Boot-Repair * should * handle that sort of worry for you ;-)
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        I'll go through both of those and let you know. I had actually tried Boot Repair from a live USB and it said it fixed the grub but when I restarted it just took me back to the Grub Rescue screen of death. I might try it again now I have a new grub, it might actually fix it better now.

        Your "how to" looks very technical for me but if Boot Repair still doesn't work then I'll have to have a go with it. Anyway thanks I'll get to work and let you know.

        Comment


          #5
          If you want to repair and recover the partition, TESTDISK is the tool.

          Please Read Me

          Comment


            #6
            But it sounds like he only goofed up the GRUB? Now that you said it, I'm not sure which is broken.
            https://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              I saw this "...when I did the "insmod normal" command it just said "no such partition"... and assumed the partition table is damaged.

              Please Read Me

              Comment


                #8
                Yes I think the partition table must be damaged, not just the grub, since the new grub doesn't list the partition. I'm able to view the all files inside the partition using a Windows application called DiskGenius, so at least the partition isn't lost exactly. I just came back from shopping and will try TestDisk first and see if I have any luck with it

                Comment


                  #9
                  You didn't say what threw up an error code. Was it something you did or is your disc failing? Still my advice is the same. If you can "see" the files I'd suggest you copy all your personal files off to a safe place (ie not the same disc) then wipe it clear, check for bad sectors and reinstall from scratch. I give you this advice because I have a simple install and it's easy to reinstall,

                  Comment


                    #10
                    You can run testdisk from a Live USB or another install if you have one. The main thing is don't be saving anything to that disk until you get this worked out

                    Please Read Me

                    Comment


                      #11
                      I've used TestDisk in the past, but am rusty on it, too. I used it for experiments where I intentionally zero-ed out my MBR and boot code, and thus the partition seem to vanish (I also did it with UEFI/GPT, where I deleted partition headers and such and then restoring the partition(s) affected). TestDisk absolutely works. A common mistake is to damage your boot mechanism and partition table (MBR or GPT). If TestDisk restores that partition, and if it is a case of damaged boot code, you will still have to re-install your boot loader.
                      Last edited by Qqmike; Dec 01, 2021, 08:08 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
                        I ran TestDisk and it said something about the 200gb partition being too small for something. I took screenshots to show on this page exactly what it said but it completely broke the partition (including screenshots) and both that partition and the old Windows partition showed as "available" in KDE partition manager. It was a losing battle so I just reinstalled Kubuntu on the whole hard drive and started from scratch. The work I was putting in trying to save the partition was bigger than starting again and retuning my old settings.

                        Thanks for everybody's efforts anyway.

                        Comment


                          #13
                          Yeah, that makes sense to me, too. At least you got to learn about TestDisk a little.
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment

                          Working...
                          X