Announcement

Collapse
No announcement yet.

removing a temporary trial installation of 1910

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

    [SOLVED] removing a temporary trial installation of 1910

    I am looking for a method to remove an installation of [k]ubuntu from my UEFI enabled computer.

    I downloaded an early version [pre-Beta] of Kubuntu 1910, from daily downloads, to see how it behaved on my PC.
    I installed it alongside my everyday 1904 version.
    I do not have Windows on my computer.
    When I decided to remove the version 1910 I could only find instructions on removing Linux to return to using Windows. This was not what I wanted.

    So in my ignorance I deleted the system partition for 1910 hoping that I could somehow repair grub in order to go back to using 1904 alone.

    I was unsuccessful and had to reinstall 1904 in order to rescue my system. I would like to avoid having to perform a complete re-install if I feel tempted to temporarily try out another system alongside the one I generally use.

    My question is, do I somehow remove the OS I no longer require from grub then delete its partition and how would I go about this?
    I've been using Kubuntu for many years now but the workings of grub have never been something I have needed to understand.
    Perhaps someone could help with my instruction.
    As I mentioned earlier I do not use windows, so the usual information that covers this is not what I am looking for.

    Also I did think this topic might be classed as 'newbie stuff' but I have too many posts to start a new thread there.

    I outline a solution to my problem, in post #12 of this thread, arrived at with help from the forummers' posts here presented, many thanks.

    Last edited by bobbicat; Oct 11, 2019, 10:27 AM.

    #2
    Did you run
    sudo update-grub
    after deleting the partition?

    It should work...

    Comment


      #3
      I should have mentioned my system has UEFI, perhaps. [I'll edit my first post to include this info]

      I'm pretty sure I ran sudo update-grub. I also tried using rescue software unsuccessfully.
      I was probably within an inch of getting boot back but my ignorance held me back.
      After a few hours a reinstall seemed the best option, but I would like to know how to do things 'properly'.

      I could reinstall 1910 beta then attempt to remove it again, but I would prefer not to have to reinstall 1904 to get things back.

      I think the issues I have encountered are due to my system having an UEFI partition.
      Last edited by bobbicat; Oct 09, 2019, 04:05 AM.

      Comment


        #4
        When you say you removed the "system partition", was that the ESP, or something else?

        If it was the ESP, that can be recreated by using gparted launched from a USB thumb drive, such as your Live Installer for either Kubuntu. The files for the ESP partition cab found under /boot/efi of your Kubuntu 19.04 installation. If gparted shows that you have a very small unpartitioned space on disk (500MB or less) that was probably where your ESP was located. The gparted tool can make that space into an ESP again.
        The next brick house on the left
        Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



        Comment


          #5
          I think I'm with these guys on it all:
          sudo update-grub
          issued from within your OS, should always work, assuming you do still have an ESP in place (see jglen400).
          A handy thing for UEFI to keep on hand is Rod Smith's program called rEFInd, available through Muon. You can keep it on a CD or on a USB. It finds everything bootable on your UEFI system.

          The USB & CD, how-to's:
          https://www.kubuntuforums.net/showth...l=1#post379352
          https://www.kubuntuforums.net/showth...l=1#post376838

          Lots of how-to's on UEFI:
          https://www.kubuntuforums.net/showth...-fixing-things
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Originally posted by jglen490 View Post
            When you say you removed the "system partition", was that the ESP, or something else?

            If it was the ESP, that can be recreated by using gparted launched from a USB thumb drive, such as your Live Installer for either Kubuntu. The files for the ESP partition cab found under /boot/efi of your Kubuntu 19.04 installation. If gparted shows that you have a very small unpartitioned space on disk (500MB or less) that was probably where your ESP was located. The gparted tool can make that space into an ESP again.
            here is how my partitions were set up:

            sda1 /boot/efi 500Mb fat32 efi boot partition
            sda2 / 20Gb ext4 system root for kubuntu1904
            sda3 / 30Gb ext4 system root and home for kubuntu1910 [now deleted]

            sdb1 /home 200Gb ext4 home partition for kubuntu1904

            I deleted sda3 which contained root and home for kubuntu1910, I think I needed to update sda1 [/boot/efi] but wasn't successful in my attempt.
            Last edited by bobbicat; Oct 09, 2019, 06:48 AM.

            Comment


              #7
              Originally posted by Qqmike View Post
              I think I'm with these guys on it all:
              sudo update-grub
              issued from within your OS, should always work, assuming you do still have an ESP in place (see jglen400).
              A handy thing for UEFI to keep on hand is Rod Smith's program called rEFInd, available through Muon. You can keep it on a CD or on a USB. It finds everything bootable on your UEFI system.

              The USB & CD, how-to's:
              https://www.kubuntuforums.net/showth...l=1#post379352
              https://www.kubuntuforums.net/showth...l=1#post376838

              Lots of how-to's on UEFI:
              https://www.kubuntuforums.net/showth...-fixing-things
              I tried the fixing things route and ended up doing a re-install.

              From what I have read elsewhere over the last hour sudo update-grub is great for reinstalling GRUB in legacy BIOS mode only, It looked to me like uefi needs a different approach.
              I'll have a read through those links and see if I can get a better idea of my position. Thanks.

              After reading through a selection of those links provided above I am coming to the conclusion that multiple booting is horribly complex and better left alone by ordinary mortals such as myself.
              Last edited by bobbicat; Oct 09, 2019, 06:47 AM.

              Comment


                #8
                Hi bobbicat.

                sudo update-grub
                works also for UEFI.

                With UEFI, dual booting is really not difficult, not any more so than in the older GRUB (with old BIOS's). It is especially not difficult if you don't have Windows. You'll get it, just takes a little time to get the hang of it.
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  Btw, if you do get booted into your good Kubuntu (or OS), you can also re-install GRUB there using
                  sudo grub-install
                  and then doiing
                  sudo update-grub.

                  The grub-install should catch most weird things going on.

                  Boot-Repair can be used to re-install GRUB:
                  https://help.ubuntu.com/community/Boot-Repair

                  Since you deleted a partition, grub-install is a good thing to run.
                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment


                    #10
                    This thread begs a conversation on the boot loader and how to restore it or how to avoid breaking it to begin with. Please note I don't know squat about EFI and how it works with GRUB so feel free to correct me on points that apply to that...

                    This was caused by the installation of 19.10 installing it's version of grub boot loader. Thus when 19.10 was erased, the grub files that the system needed to boot were also erased. This is an old dilemma for dual booters. However, there are several ways to avoid or prevent this from happening (in order of simplicity):
                    1. Use separate drives
                    2. Install the new distro normally, but know to re-install the bootloader from the previous distro before removing the new one
                    3. Install the new distro without a bootloader
                    4. Restore grub using a bootable USB
                    5. Manually boot from the grub shell and once booted, re-install grub
                    6. Use a stand-alone GRUB install


                    #1 is by far the easiest but requires two drives. Simply tell the installer to install grub the the second drive regardless of where you install the distro and your first drive will remain untouched.

                    #2 is also very easy. BEFORE wiping the secondary install, boot to the primary install, then re-install grub from the command line. This should result in booting to the primary install again, freeing you to delete the secondary one.

                    #3 usually works fine, but with EFI I'm not sure if that's still true. The Kubuntu installer can be launched using the "-b" which will stop it from installing a boot loader. Then you can run "update-grub" from your primary install and it should put the secondary install into the grub menu.

                    #4 works similarly to #2 but requires a bit more work. Boot to a Live Kubuntu session (USB or CD, whatever). Open a terminal, mount the /boot partition from your hard drive, run grub-install using the "-boot-directory=" option pointed at the mounted boot folder, and reboot. There's also a "--efi-directory=" option but I don't know if that applies for this method.

                    #5 rather that write this up, here's a great link explaining the process.

                    #6 is time consuming but works great once it's set up and you will never have to re-install grub again. Again though, NOTE: EFI may complicate or invalidate this. You can create an install with grub, delete all but the /boot/grub files, and it will continue to boot. Then by manually creating a simple grub menu that links to each other partition's /boot/grub/grub.cfg, it will load the menu created by each distro at installation. Then you can install other distros to your heart's content but install each one's boot loader to it's own partition instead of the hard drive. This creates the needed grub.cfg without wiping the primary installation's grub from the boot loader sectors. This is how my system is set up.


                    I'm sure there are other ways to skin this cat, but these 6 came right to mind. I felt it worth mentioning in case some other poor soul runs into this problem.

                    Please Read Me

                    Comment


                      #11
                      For Kubuntu (and/or multiple Linux OSs), I go through the details in those how-to's I linked to, like this one:

                      https://www.kubuntuforums.net/showth...l=1#post373198
                      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 think I finally understand why I had problems with the O.S.[kubuntu1910] trial install and removal.
                        I will try to outline what had happened and give what I think is a way of working with it.
                        Thanks, by the way, to all who have provided me with pointers on this thread.
                        [I tend to never follow the well-known and sign-posted route to the summit.
                        I have to pick my own path, discover a way of my own and usually end up where everyone else got to anyway.
                        Just me, but it does give a different point of view sometimes.]

                        As far as I see it, by installing a different version of an O.S. [operating system] I had, in effect unknowingly, handed over control of the boot-up system [grub2] to that latest install [in my case Kubuntu 1910]. This created no problems while that O.S. existed on my device. However if I chose to remove it, which is what I wanted to do eventually, then nothing remained in command of the boot and it no longer functioned.

                        It is easy enough to transfer control back to the original O.S. [1904] before any removal is attempted. First boot up Kubuntu 1904 then 'sudo grub-install /dev/sda' which transfers control back to 1904. After this the partition holding Kubuntu 1910 can be deleted followed by 'sudo update-grub'.

                        'sudo grub-install' is run while in the O.S. which is required to be in control [in this case 1904]:

                        Code:
                        sudo grub-install /dev/sda
                        
                        Installing for x86_64-efi platform.
                        Installation finished. No error reported.
                        Then use 'sudo update-grub' to reconfigure the files:

                        Code:
                        sudo update-grub
                        
                        Sourcing file `/etc/default/grub'
                        Sourcing file `/etc/default/grub.d/init-select.cfg'
                        Generating grub configuration file ...
                        Found linux image: /boot/vmlinuz-5.0.0-31-generic
                        Found initrd image: /boot/initrd.img-5.0.0-31-generic
                        Found linux image: /boot/vmlinuz-5.0.0-29-generic
                        Found initrd image: /boot/initrd.img-5.0.0-29-generic
                        Found Ubuntu Eoan Ermine (development branch) (19.10) on /dev/sda3
                        Adding boot menu entry for EFI firmware configuration
                        done
                        When I am ready, I can now delete the partition on /dev/sda3, sudo update-grub again and I will have removed Kubuntu 1910 without upsetting my set-up.

                        After deleting /dev/sda3 updating grub gives:

                        Code:
                        sudo update-grub
                        
                        Sourcing file `/etc/default/grub'
                        Sourcing file `/etc/default/grub.d/init-select.cfg'
                        Generating grub configuration file ...
                        Found linux image: /boot/vmlinuz-5.0.0-31-generic
                        Found initrd image: /boot/initrd.img-5.0.0-31-generic
                        Found linux image: /boot/vmlinuz-5.0.0-29-generic
                        Found initrd image: /boot/initrd.img-5.0.0-29-generic
                        Adding boot menu entry for EFI firmware configuration
                        done
                        I now appreciate the importance of where control of the boot resides and I now know how to deal with that.

                        Again, thanks for the pointers.

                        Comment


                          #13
                          Re your Post #12: Yep!
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #14
                            Thank you for your report. For me, this sort of post is one of the strengths of KFN.

                            Originally posted by bobbicat View Post
                            [I tend to never follow the well-known and sign-posted route to the summit.
                            I have to pick my own path, discover a way of my own ...]
                            Given that, and you experiment with multiple installs, suggests that you would do well controlling grub yourself, installing grub independently of any install, on its own partition or subvolume.

                            The debian scripts that set up and maintain grub, that the buntus use, really are for end users with simple set-ups IMO. If there's more than one Linux install, they will screw up often. They will still try to screw things up, and sometimes succeed, but one has learned enough on that path to regain control and fix things.

                            It might seem a lot of work, but my experience is that I go for years with minimal effort, certainly much less than the debian approach.
                            Regards, John Little

                            Comment

                            Working...
                            X