ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved Grub Entries cleanup and maintenance

    IT Discussion
    grub linux fedora learning education
    7
    16
    1.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DustinB3403D
      DustinB3403
      last edited by DustinB3403

      As I continue to try and learn more, how critical is it to cleanup existing grub entries on any given linux system.

      As I understand it grubby should keep some historical records if issues are encountered. But how many records are to many, and do you clean them up manually?

      If so how do you cleanup grub, and why isn't this a relatively automatic feature or setting?

      travisdh1T 1 Reply Last reply Reply Quote 0
      • travisdh1T
        travisdh1 @DustinB3403
        last edited by

        @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

        As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

        RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

        Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

        This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

        notverypunnyN dbeatoD stacksofplatesS 3 Replies Last reply Reply Quote 3
        • notverypunnyN
          notverypunny @travisdh1
          last edited by

          @travisdh1 said in Grub Entries cleanup and maintenance:

          @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

          As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

          RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

          Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

          This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

          How many entries are you seeing? Like @travisdh1 said, it's not something that you should be messing with by hand. You do want to keep an eye on usage of the partition where your /boot resides. If it gets too full you're in for some fun trying to clear kernels by hand, hoping that everything still works afterwards

          DustinB3403D 1 Reply Last reply Reply Quote 0
          • DustinB3403D
            DustinB3403 @notverypunny
            last edited by

            @notverypunny not many 2 and a recovery.

            But I have seen many more on past systems so I wanted to take a look into it. To see if this is/was something most people are managing manually.

            travisdh1T 1 Reply Last reply Reply Quote 0
            • travisdh1T
              travisdh1 @DustinB3403
              last edited by

              @DustinB3403 said in Grub Entries cleanup and maintenance:

              @notverypunny not many 2 and a recovery.

              But I have seen many more on past systems so I wanted to take a look into it. To see if this is/was something most people are managing manually.

              Do you have an Ubuntu system that has been around a while? Look at one of those and you'll see one reason why me and @JaredBusch actively hate Ubuntu.

              DustinB3403D 1 Reply Last reply Reply Quote 0
              • DustinB3403D
                DustinB3403 @travisdh1
                last edited by

                @travisdh1 said in Grub Entries cleanup and maintenance:

                @DustinB3403 said in Grub Entries cleanup and maintenance:

                @notverypunny not many 2 and a recovery.

                But I have seen many more on past systems so I wanted to take a look into it. To see if this is/was something most people are managing manually.

                Do you have an Ubuntu system that has been around a while? Look at one of those and you'll see one reason why me and @JaredBusch actively hate Ubuntu.

                No I don't have any remaining systems of importance that I've seen this on. Just from recollection did this come to mind.

                travisdh1T 1 Reply Last reply Reply Quote 1
                • travisdh1T
                  travisdh1 @DustinB3403
                  last edited by

                  @DustinB3403 said in Grub Entries cleanup and maintenance:

                  @travisdh1 said in Grub Entries cleanup and maintenance:

                  @DustinB3403 said in Grub Entries cleanup and maintenance:

                  @notverypunny not many 2 and a recovery.

                  But I have seen many more on past systems so I wanted to take a look into it. To see if this is/was something most people are managing manually.

                  Do you have an Ubuntu system that has been around a while? Look at one of those and you'll see one reason why me and @JaredBusch actively hate Ubuntu.

                  No I don't have any remaining systems of importance that I've seen this on. Just from recollection did this come to mind.

                  Lucky

                  DustinB3403D 1 Reply Last reply Reply Quote 0
                  • DustinB3403D
                    DustinB3403 @travisdh1
                    last edited by

                    @travisdh1 said in Grub Entries cleanup and maintenance:

                    @DustinB3403 said in Grub Entries cleanup and maintenance:

                    @travisdh1 said in Grub Entries cleanup and maintenance:

                    @DustinB3403 said in Grub Entries cleanup and maintenance:

                    @notverypunny not many 2 and a recovery.

                    But I have seen many more on past systems so I wanted to take a look into it. To see if this is/was something most people are managing manually.

                    Do you have an Ubuntu system that has been around a while? Look at one of those and you'll see one reason why me and @JaredBusch actively hate Ubuntu.

                    No I don't have any remaining systems of importance that I've seen this on. Just from recollection did this come to mind.

                    Lucky

                    I've got XOCE in my lab, but that's not critical to my day to day.

                    1 Reply Last reply Reply Quote 0
                    • dbeatoD
                      dbeato @travisdh1
                      last edited by

                      @travisdh1 said in Grub Entries cleanup and maintenance:

                      @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

                      As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

                      RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

                      Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

                      This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

                      For Debian/Ubuntu it is

                      sudo apt-get autoremove --purge
                      

                      But that should happen when you do update as you don't want an old lingering kernel to cause trouble...

                      dbeatoD travisdh1T 2 Replies Last reply Reply Quote 2
                      • dbeatoD
                        dbeato @dbeato
                        last edited by

                        @dbeato said in Grub Entries cleanup and maintenance:

                        @travisdh1 said in Grub Entries cleanup and maintenance:

                        @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

                        As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

                        RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

                        Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

                        This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

                        For Debian/Ubuntu it is

                        sudo apt-get autoremove --purge
                        

                        But that should happen when you do update as you don't want an old lingering kernel to cause trouble...

                        More here
                        https://help.ubuntu.com/community/RemoveOldKernels

                        black3dynamiteB 1 Reply Last reply Reply Quote 1
                        • travisdh1T
                          travisdh1 @dbeato
                          last edited by

                          @dbeato said in Grub Entries cleanup and maintenance:

                          @travisdh1 said in Grub Entries cleanup and maintenance:

                          @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

                          As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

                          RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

                          Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

                          This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

                          For Debian/Ubuntu it is

                          sudo apt-get autoremove --purge
                          

                          But that should happen when you do update as you don't want an old lingering kernel to cause trouble...

                          Should happen, and does happen, are two different things in Ubuntu.

                          1 Reply Last reply Reply Quote 1
                          • black3dynamiteB
                            black3dynamite @dbeato
                            last edited by

                            @dbeato said in Grub Entries cleanup and maintenance:

                            @dbeato said in Grub Entries cleanup and maintenance:

                            @travisdh1 said in Grub Entries cleanup and maintenance:

                            @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

                            As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

                            RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

                            Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

                            This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

                            For Debian/Ubuntu it is

                            sudo apt-get autoremove --purge
                            

                            But that should happen when you do update as you don't want an old lingering kernel to cause trouble...

                            More here
                            https://help.ubuntu.com/community/RemoveOldKernels

                            It only works if we set up unattended upgrade to remove old kernels.

                            dbeatoD 1 Reply Last reply Reply Quote 2
                            • dbeatoD
                              dbeato @black3dynamite
                              last edited by

                              @black3dynamite said in Grub Entries cleanup and maintenance:

                              @dbeato said in Grub Entries cleanup and maintenance:

                              @dbeato said in Grub Entries cleanup and maintenance:

                              @travisdh1 said in Grub Entries cleanup and maintenance:

                              @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

                              As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

                              RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

                              Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

                              This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

                              For Debian/Ubuntu it is

                              sudo apt-get autoremove --purge
                              

                              But that should happen when you do update as you don't want an old lingering kernel to cause trouble...

                              More here
                              https://help.ubuntu.com/community/RemoveOldKernels

                              It only works if we set up unattended upgrade to remove old kernels.

                              Correct

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                manxam @dbeato
                                last edited by

                                OMG, so this.. If using unattended upgrades, make sure autoremove is configured properly.
                                I had a box take a dump because it ran out of space in /boot with a ridiculous number of old kernels installed.
                                Trying to run autoremove failed because it requires some space to do its work.

                                Had to manually remove a bunch of files before autoremove could run...

                                1 Reply Last reply Reply Quote 1
                                • stacksofplatesS
                                  stacksofplates @travisdh1
                                  last edited by

                                  @travisdh1 said in Grub Entries cleanup and maintenance:

                                  @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

                                  As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

                                  RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

                                  Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

                                  This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

                                  You can install without /boot. IIRC there is a other config change with unattended-upgrades to auto remove kernels.

                                  travisdh1T 1 Reply Last reply Reply Quote 0
                                  • travisdh1T
                                    travisdh1 @stacksofplates
                                    last edited by

                                    @stacksofplates said in Grub Entries cleanup and maintenance:

                                    @travisdh1 said in Grub Entries cleanup and maintenance:

                                    @DustinB3403 You never touch grub yourself. You let the system take care of it for you when it adds or removes kernels.

                                    As to removing old kernels, it depends on the distribution you use. A good distro just takes care of this for you. The annoying ones make you do it manually.

                                    RedHat/CentOS/Fedora = automatically cleans up older kernels. You don't do anything and it will keep a sane number by default. I think it's 4 and a recovery option.

                                    Debian/Ubuntu = keeps all kernels till you manually remove them. I forget offhand what the command is besides it's an option for apt.

                                    This is one reason I'm happily moving things from the old rental box to my new server for my home lab. The old rental box has Ubuntu with a tiny little 256MB /boot partition. It can keep ~3 kernels, and that's it, ugh!

                                    You can install without /boot. IIRC there is a other config change with unattended-upgrades to auto remove kernels.

                                    You normally can, yes. Since my current home lab box is a rental, I could only choose from the options they gave me at the time. Today, they'd let you use your own iso, but still wouldn't recommend them for anything other than a test lab.

                                    1 Reply Last reply Reply Quote 0
                                    • 1 / 1
                                    • First post
                                      Last post