Accidentally uninstalled kernel with uCareSystem Core - now what?
  • Hi!
    As the title reads, I accidentally removed the kernel (ie did not understand the prompt correctly and responded yes). The system had the previous kernel installed as well, so I can still use the laptop, but when I run the uCareSystem Core software again - it does not update to a more recent kernel... How do I make my system up to date again?
    Thanks in advance,
    Newbie
  • If it deleted the kernel, the PC cannot be used at all. I am thinking it only deleted the old kernels, as in the old files? What is the current kernel version you are running? The Grub menu will give you the version information on boot.

    Look in the root of the computer... for example, in terminal when I list the contents I get this;
    $ ls /
    bin    core  home         lib     media    proc  sbin  tmp  vmlinuz
    boot   dev   initrd.img      lib64     mnt    root  srv   usr  vmlinuz.old
    cdrom  etc   initrd.img.old  lost+found  opt    run   sys   var

    vmlinuz - a link executable file that contains the current Linux kernel.
    vmlinuz.old - is the prior version.

    initrd.img - a link to the current init ram disk image linked to the current kernel.
    initrd.img.old - yes, you guessed it, the prior one linked to the old kernel.

    These are found in the /boot folder.

    $ ls /boot
    config-4.15.0-101-generic      System.map-4.15.0-106-generic
    config-4.15.0-106-generic      System.map-4.15.0-128-generic
    config-4.15.0-128-generic      System.map-4.15.0-60-generic
    config-4.15.0-60-generic       vmlinuz-4.15.0-101-generic
    grub                   vmlinuz-4.15.0-106-generic
    initrd.img-4.15.0-101-generic  vmlinuz-4.15.0-128-generic
    initrd.img-4.15.0-106-generic  vmlinuz-4.15.0-60-generic
    initrd.img-4.15.0-128-generic  vmlinuz-4.4.0-124-generic.efi.signed
    initrd.img-4.15.0-60-generic   vmlinuz-4.4.0-34-generic.efi.signed
    memtest86+.bin               vmlinuz-4.4.0-64-generic.efi.signed
    memtest86+.elf               vmlinuz-4.4.0-74-generic.efi.signed
    memtest86+_multiboot.bin       vmlinuz-4.4.0-98-generic.efi.signed
    System.map-4.15.0-101-generic

    If the old files are just gone... why would any program do that?  The most you will have is a few megabytes saved by clearing them out.

    If you are running into real issues with the new kernel, then the options I would suggest to do would be the following;

    a) If this was a new install, I would back up my data and reinstall from the Live CD or usb. 

    b) Otherwise you should be able to follow this article on how to "Downgrade the Kernel". After that you should be prompted to upgrade by the system.


  • So, I have not followed your suggestion initially - I think I can provide the information you require evenso... let me know if you still need me to go through your steps, and then of course I will.

    So when I try to start the "most recent" kernel version I get the following error: /boot/vmlinuz-4.15.0-118-generic not found
    But when I go into advanced option in the boot menu and choose version 4.15.0.115-generic I can run lxle but without functional wireless connection (it works with ethernet cable - but does not update to 4.15.0-118 when I run uCareSystem Core).

    The install is not entirely new, and I have made some modifications wrt appearance, so I would preferably not like to do a reinstall... uCareSystem Core has attempted to remove the then current kernel before - but then I had an active Timeshift backup that saved me - but unfortunately I do not at present.

    Do you still think your "b)" suggestion from above is the most viable path forward?
    Again thanks!
  • From what I understand, your program deleted /boot/vmlinuz-4.15.0-118-generic and never updated the grub menus, the menu is still trying to locate something not there.

    Open a terminal prompt;
    userID@PCname:~$ sudo update-grub
    [sudo] password for userID:
    Sourcing file `/etc/default/grub'
    Generating grub configuration file ...
    Found background: /etc/grub.d/backgrounds/grub.png
    Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
    Found background image: /etc/grub.d/backgrounds/grub.png
    Found linux image: /boot/vmlinuz-4.15.0-128-generic
    Found initrd image: /boot/initrd.img-4.15.0-128-generic
    Found linux image: /boot/vmlinuz-4.15.0-106-generic
    Found initrd image: /boot/initrd.img-4.15.0-106-generic
    Found linux image: /boot/vmlinuz-4.15.0-101-generic
    Found initrd image: /boot/initrd.img-4.15.0-101-generic
    Found linux image: /boot/vmlinuz-4.15.0-60-generic
    Found initrd image: /boot/initrd.img-4.15.0-60-generic
    Found memtest86+ image: /boot/memtest86+.elf
    Found memtest86+ image: /boot/memtest86+.bin
    Found LXLE Linux 18.04.3 64bit (18.04) on /dev/sdc2
    done

    That should fix it. It won't replace the generic kernels but it will stop looking for what no longer exists.  If you are using 4.15.0.115-generic then that is where you need to be according to this system.

    As for which kernel is most recent, never means it is the best. If you were running 20.10 and not this 18.04 version, you would be in 5.8 kernel version by now.  The whole point of LXLE is to stay put and not progress blindly ahead. It is words to live by, Fools rush in where the angels fear to tread. As you can see, I am running 128 and not 118 and I found an energy compliance issue with this version. It keeps resetting the screensaver to 900 seconds no matter what time I choose. The screen blanks after 900 seconds (15 minutes) and while it is a minor bug, it is still a bug in this version of the kernel.

    The second feature on the LXLE home page is; "Always based on Ubuntu/Lubuntu LTS.". The next LTS version to release will be 22.04 by then LXLE will be a whole new version of itself. Take your time, you still have 2 more years before a full system upgrade.