Announcement

Collapse
No announcement yet.

repair on boot installed wrong kernels, uninstalled all valid LTS kernels

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] repair on boot installed wrong kernels, uninstalled all valid LTS kernels

    What can I do now? 22.04 lts

    I have tried to install the latest kernel by using "sudo apt install --reinstall linux-generic" which failed by prompting "failed to install path/linux-generic_5.15.0.76.74_amd64.deb"

    How can this be solved?
    Last edited by Fred-VIE; Jul 17, 2023, 12:42 PM.

    #2
    I'm a bit confused.

    If all "valid" kernels are uninstalled, how are you booting to install?

    If "linux-generic" was removed, why use the "--reinstall" flag?

    Open Konsole and run "sudo apt update" and then "sudo apt install linux-generic" and report the output.

    Listing all currently installed kernels might help us here.The output of:

    ll /boot
    uname -r

    Please Read Me

    Comment


      #3
      Originally posted by oshunluvr View Post
      If all "valid" kernels are uninstalled, how are you booting to install?
      Well I can just boot into the repair console, thats it. Kub doesnt start.

      Originally posted by oshunluvr View Post
      If "linux-generic" was removed, why use the "--reinstall" flag?
      Because I dont know what I'm doing and that was what I found on the www with kernel problems.

      Originally posted by oshunluvr View Post
      Open konsole and run "sudo apt update"
      failed to fetch. Temporary failure resolving at.alrchive.ubuntu.com/etcetcetc. I can not save the error so I wrote only part of it down
      Temporary failore at.archive.ubuntu.com/jammy/inrelease
      failure with jammy-updates, jammy-security packages coming from at.archive.ubuntu.com/ and ppa.launchpadcontent.net​

      How can I get the apt update to use another url? I get "temporarily not available" messages for days now and that can not be right.

      Originally posted by oshunluvr View Post
      "sudo apt install linux-generic" and report the output.
      "linux-generic latest version 5.15.0.76.74 already installed" but I can just boot into the 6.2.0-1015-oem version which doesnt start. All other boot options have been removed by trying all the options in the boot menu. When I start any other boot option of the list it says that I would have to install it first, which is weird considering 5.15.0.76.74 should be installed. Well it probably is but there is no boot option for it. Maybe I should try to update grup again? I did that everytime after trying to install linux-generic though.

      Originally posted by oshunluvr View Post
      Listing all currently installed kernels might help us here.The output of:
      ll /boot
      uname -r
      One of the repairs removed all of them but "6.2.0-1015-oem". There also where lowlatency and oracle kernels (or bootoptions)

      I am sorry for shortening the messages but my handwriting is awful and I can not save a screenshot nor copy the messages into a text file in the console.

      Yesterday I downloaded the latest Kubuntu ISO. Any chance I can fix my drive installation from there?
      What if I would install Kub from the iso on the same drive without reformating it (if that is possible). Would my settings remain?

      When I am starting Kub normally it stops booting after telling the usual "gpu disabled in bios" message without displaying any error.
      Last edited by Fred-VIE; Jul 18, 2023, 10:13 AM.

      Comment


        #4
        I tried all the options on the boot screen and finally found the 5.15.0.76.74 version way down in the list.
        One would have thought available boot options would be on top.

        Thanks for trying to help! Your pointers got me in

        Now I have to figure out howto get rid of all those pointless boot options that dont work anymore.

        Does installing the community drivers instead of proprietary ones get rid of the bug of getting kernel downloads that are not meant for this system?

        Can I remove the oem-packages of the attached picture without breaking something?
        Attached Files
        Last edited by Fred-VIE; Jul 18, 2023, 10:34 AM.

        Comment


          #5
          You should find the answer(s) in this forum.
          I think either oshunluvr, claydoh or Snowhog posted how to do so.

          But you could start with sudo apt purge --auto-remove linux-image-6* in the Konsole terminal emulator to get rid of the 6.x kernels, reboot and see what of the wrong kernels is left.
          Leave out the --auto-remove if the output is suspicious to you.
          Last edited by Schwarzer Kater; Jul 18, 2023, 10:50 AM.
          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


            #6
            Originally posted by Schwarzer Kater View Post
            You should find the answer(s) in this forum.

            But you could start with sudo apt purge --auto-remove linux-image-6* in the Konsole terminal emulator to get rid of the 6.x kernels, reboot and see what of the wrong kernels is left.
            Leave out the --auto-remove if the output is suspicious to you.
            It said it would remove some packages but would also install two new packages, linux-image-unsigned-6.0.0-1018-oem linux-image-unsigned-6.1.0-1015-oem. So I cancelled it and removed the packages in synaptic.

            Comment


              #7
              So which of the stock Ubuntu kernels ("-generic") are still installed?
              In my experience you will have to get rid of all Nvidia drivers in your situation eventually, also get rid of all non-stock kernels and reinstall the Nvidia drivers for the stock Ubuntu kernels again afterwards.

              PS: You can list all kernels, headers, etc. that are still installed e.g. with
              apt search linux | grep -E "^linux" | grep -i install
              in Konsole.
              Last edited by Schwarzer Kater; Jul 18, 2023, 11:07 AM. Reason: 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


                #8
                Originally posted by Schwarzer Kater View Post
                So which of the stock Ubuntu kernels ("-generic") are still installed?
                here is the list - I believe that repair I did when I tried to fix my boot problem removed all the unwanted kernels except for the one I just removed via synaptic. Although there is that 525.125.06-oubuntu0.22.04.1 Nvidia kernel which I dont know what to do with so I left it alone.

                linux-base/jammy,jammy,now 4.5ubuntu9 all [installed,automatic]
                linux-firmware/jammy-updates,jammy-updates,jammy-security,jammy-security,now 20220329.git681281e4
                -0ubuntu3.14 all [installed,automatic]
                linux-generic/jammy-updates,jammy-security,now 5.15.0.76.74 amd64 [installed]
                linux-headers-5.15.0-76/jammy-updates,jammy-updates,jammy-security,jammy-security,now 5.15.0-76.8
                3 all [installed,automatic]
                linux-headers-5.15.0-76-generic/jammy-updates,jammy-security,now 5.15.0-76.83 amd64 [installed,automatic]
                linux-headers-generic/jammy-updates,jammy-security,now 5.15.0.76.74 amd64 [installed,automatic]
                linux-image-5.15.0-76-generic/jammy-updates,jammy-security,now 5.15.0-76.83 amd64 [installed,automatic]
                linux-image-generic/jammy-updates,jammy-security,now 5.15.0.76.74 amd64 [installed,automatic]
                linux-libc-dev/jammy-updates,jammy-security,now 5.15.0-76.83 amd64 [installed,automatic]
                linux-modules-5.15.0-76-generic/jammy-updates,jammy-security,now 5.15.0-76.83 amd64 [installed,automatic]
                linux-modules-extra-5.15.0-76-generic/jammy-updates,jammy-security,now 5.15.0-76.83 amd64 [instal
                led,automatic]
                linux-modules-nvidia-515-generic/jammy-updates,jammy-security,now 5.15.0-76.83+5 amd64 [installed]
                linux-modules-nvidia-525-5.15.0-76-generic/jammy-updates,jammy-security,now 5.15.0-76.83+5 amd64
                [installed,automatic]
                linux-modules-nvidia-525-generic/jammy-updates,jammy-security,now 5.15.0-76.83+5 amd64 [installed
                ,automatic]
                linux-objects-nvidia-525-5.15.0-76-generic/jammy-updates,jammy-security,now 5.15.0-76.83+5 amd64
                [installed,automatic]
                linux-signatures-nvidia-5.15.0-76-generic/jammy-updates,jammy-security,now 5.15.0-76.83+5 amd64 [installed,automatic]
                linux-sound-base/jammy,jammy,now 1.0.25+dfsg-0ubuntu7 all [installed,automatic]

                ​​
                Last edited by Fred-VIE; Jul 18, 2023, 11:52 AM.

                Comment


                  #9
                  Originally posted by Fred-VIE View Post
                  Because I dont know what I'm doing and that was what I found on the www with kernel problem.
                  LOL, ok can't fault you for that.

                  So "oem" sort of means "for a specific manufacturer" and you don't need those at all and shouldn't install them unless some hardware maker says to. "Nvidia kernel" doesn't mean "use this kernel if you have an nvidia graphics card". NVidia drivers are installed into the generic kernels as modules. It's much easier to use the driver modules rather than attempt to use some OEM kernel.
                  An OEM kernel is created by Canonical engineers for specific brand-new hardware that is not yet supported by the (mainline) generic Linux kernel that everybody else uses. OEM is a short-term kernel; users will migrate to the generic Linux kernel when support for that new hardware becomes available.​
                  While we're at it, you don't need "lowlatency" or ANY other kernel except for generic unless something doesn't work with the generic and you're told to try a different kernel.

                  Generally, with *buntu distros you get the kernel series that was released when you first installed. A LTS (Long Term Support) doesn't usually upgrade you to a new kernel series without you installing it. By "series" I mean like the 5.15.0 vs. 5.19.0 vs. 6.3.0 series.

                  Honestly, IMO unless some piece of hardware isn't working or some research reveals a kernel upgrade will help with some problem you have, I'd stick to the stock, original kernel. The older they get the less bugs crop up because the majority have already been fixed.


                  As far as the grub menu and "who's on first" the latest (newest by version) kernel is always the default boot kernel. You can change this manually in /etc/default/grub to a specific kernel (actually which line in the grub.cfg menu do you want) if you wish. For example, I installed the 5.19 kernel awhile back but it had a known bug with my audio device that resulted in no sound. So I left the 5.19 kernel installed AND the 5.15 kernel also . Then went into /etc/default/grub and replaced this line:

                  Code:
                  GRUB_DEFAULT="0"

                  with this:
                  Code:
                  GRUB_DEFAULT="1>2"


                  Computer geeks count beginning with zero. So "...DEFAULT=0" means boot the default (first) kernel.
                  The "1>2" means second line (remember 1 is next after zero) which is the submenu for "Advanced Options."
                  The third line in the Advanced Options submenu is "2" (again, counting from zero) which is the next most newest kernel. In my case the 5.15.0 kernel series.

                  All of this means when I punched the Power On the default boot was the previous rather than the newest kernel and my sound still worked. As time rolled on and both kernels were updated, I would test the .19 kernel with a manual reboot and selecting it. If the sound was still dead, I rebooted back to .15. Eventually - like 3 months - the bug was fixed so I change the default boot line back to zero.

                  Please Read Me

                  Comment


                    #10
                    @oshunluvr​ I avoided the "weird" kernels after I installed them once. This time the repair in the boot menu installed them and I couldnt intervene.

                    Thanks for the grub tips! I will look into them.

                    So basically my system was never not working but the myriad of boot options made me think I had no choice but the first one (after trying the next 5 ones).

                    /etc/default/grub looks empty and if I try to open the cfg directly via /etc/default/grub/grub.cfg it prompts "unknown error code 100" chdir:not a directory. I tried in dolphin though because I am opening all text files in Kate.

                    But maybe that has to do with how I am booting to begin with because I installed Kub and later Manjaro and managed to put Kub on the Manjaro bootmanager so I probably do not use the Kub one. Thats all a guess though because I have no clue where the bootmanagers install themselfs. Sometimes I had the feeling they liked the Win-drive but lately they want to be on the nvme's.

                    When I started the iso yesterday I saw I could now manually choose on which drive grub is going to be installed but I would have so many choices, I couldnt make my mind up and that even though I had to unplug two drives when I put in the latest nvme-drive.
                    Last edited by Fred-VIE; Jul 18, 2023, 11:45 AM.

                    Comment


                      #11
                      Seems so.
                      It was an "easy" fix after all, wasn't it. Without having to purge and reinstall any Nvidia stuff.
                      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


                        #12
                        Originally posted by Fred-VIE View Post
                        /etc/default/grub looks empty and if I try to open the cfg directly via /etc/default/grub/grub.cfg it prompts "unknown error code 100" chdir:not a directory.
                        The correct path is: /etc/default/grub

                        There is a /etc/default/grub.d 'directory', and it contains a "do nothing" init-select.cfg file.
                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Originally posted by Schwarzer Kater View Post
                          Seems so.
                          It was an "easy" fix after all, wasn't it.
                          Since that "easy" one took me several days I dont want to know how long a complicated one would take.

                          Snowhog yep that was the path I was using. I just did not mention that even though I got that error message the cfg file opened in Kate anyways

                          Comment


                            #14
                            Originally posted by Fred-VIE View Post
                            I just did not mention that even though I got that error message the cfg file opened in Kate anyways
                            /etc/default/grub is not an empty file; far from it!

                            Kate won't open /etc/default/grub.cfg, as that file doesn't exist. The grub file doesn't have a file name extension.
                            Using Kubuntu Linux since March 23, 2007
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Originally posted by Snowhog View Post
                              /etc/default/grub is not an empty file; far from it!
                              my bad I thought it was a folder Even after more than a year of Linux I am still thinking in Win-terms.

                              Originally posted by Snowhog View Post
                              Kate won't open /etc/default/grub.cfg, as that file doesn't exist. The grub file doesn't have a file name extension.
                              so that was why the grub text file was open already after the first try

                              Comment

                              Working...
                              X