I am working on the kernel source code. So I compiled the linux core kernel and installed it. After that I removed all the generic kernels from the /boot partition. On the mainline kernel app it still shows the 6.2.0.26.26 Ubuntu kernel is installed on my pc. But I had tried sudo apt update-grub
During boot I can't find the generic ubuntu kernel. Is there anyway to regain that?
I can't reinstall whole ubuntu using iso. Cause it will delete all my installed programs.
What is the fix? ubuntu is not open source. But is there anyways to install the ubuntu kernel and boot on it? Like we do with linux kernel, compile, install, and boot on it.
I have accidentally deleted my ubuntu kernel from /boot. I have some other linux kernels installed. Wanna restore my ubuntu kernel.
I have installed the generic kernel.
pegasus@pegasus:~$ sudo apt-get install --reinstall linux-image-generic
[sudo] password for pegasus:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
gdal-plugins inxi libarmadillo11 libavcodec-dev libavformat-dev libavutil-dev libboost-filesystem1.71.0 libboost-iostreams1.71.0 libboost-program-options1.71.0 libcfitsio10 libdc1394-dev
libexif-dev libexif-doc libfdk-aac2 libgdal32 libgoogle-perftools4 libgphoto2-dev libmbedtls14 libmbedx509-1 libopencv-highgui406 libopencv-imgcodecs406 libpcrecpp0v5 libqt6qml6
libqt6qmlmodels6 libqt6quick6 libqt6svg6 libqt6waylandclient6 libqt6waylandcompositor6 libqt6waylandeglclienthwintegration6 libqt6waylandeglcompositorhwintegration6
libqt6wlshellintegration6 libraw1394-dev libraw1394-tools libsrt1.5-openssl libssl1.1 libswresample-dev libtcmalloc-minimal4 libxapp-gtk3-module libxapp1 libyaml-cpp0.6 qt6-wayland
xapp-sn-watcher xapps-common
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 110 not upgraded.
Need to get 8,224 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://bd.archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-image-generic amd64 6.2.0.26.26 [8,224 B]
Fetched 8,224 B in 1s (15.1 kB/s)
(Reading database ... 289865 files and directories currently installed.)
Preparing to unpack .../linux-image-generic_6.2.0.26.26_amd64.deb ...
Unpacking linux-image-generic (6.2.0.26.26) over (6.2.0.26.26) ...
Setting up linux-image-generic (6.2.0.26.26) ...
But on grub it's not showing up. How to restore it?
pegasus@pegasus:~$ 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-6.5.0-rc3+
Found initrd image: /boot/initrd.img-6.5.0-rc3+
Found linux image: /boot/vmlinuz-6.4.7+
Found initrd image: /boot/initrd.img-6.4.7+
Found linux image: /boot/vmlinuz-6.4.0-rc5
Found initrd image: /boot/initrd.img-6.4.0-rc5
Found linux image: /boot/vmlinuz-6.4.0-rc4+
Found initrd image: /boot/initrd.img-6.4.0-rc4+
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
pegasus@pegasus:~$ dpkg --list | grep linux-image
ii linux-image-5.19.0-1007-nvidia-lowlatency 5.19.0-1007.7 amd64 Signed kernel image nvidia-lowlatency
rc linux-image-5.19.0-41-generic 5.19.0-41.42~22.04.1 amd64 Signed kernel image generic
rc linux-image-5.19.0-42-generic 5.19.0-42.43~22.04.1 amd64 Signed kernel image generic
rc linux-image-6.2.0-20-generic 6.2.0-20.20 amd64 Signed kernel image generic
rc linux-image-6.2.0-23-generic 6.2.0-23.23 amd64 Signed kernel image generic
rc linux-image-6.2.0-24-generic 6.2.0-24.24 amd64 Signed kernel image generic
pi linux-image-6.2.0-26-generic 6.2.0-26.26 amd64 Signed kernel image generic
ii linux-image-generic 6.2.0.26.26 amd64 Generic Linux kernel image
pi linux-image-generic-hwe-22.04 6.2.0.26.26 amd64 Generic Linux kernel image