I've compiled a new kernel based on 5.4.18-xanmod10 kernel. Then I've installed it:
sudo dpkg -i linux*5.4.18-xanmod10-custom*.deb
But after installing, it have not been found by update-grub2
:
root@lenovo:~# ls /boot/
config-5.3.0-29-lowlatency memtest86+.elf
config-5.4.18-xanmod10-custom memtest86+_multiboot.bin
config-5.5.0-3.2-liquorix-amd64 System.map-5.3.0-29-lowlatency
config-5.5.0-4.1-liquorix-amd64 System.map-5.4.18-xanmod10-custom
config-5.5.4-xanmod3 System.map-5.5.0-3.2-liquorix-amd64
grub System.map-5.5.0-4.1-liquorix-amd64
initrd.img System.map-5.5.4-xanmod3
initrd.img-5.3.0-29-lowlatency vmlinuz
initrd.img-5.4.18-xanmod10-custom vmlinuz-5.3.0-29-lowlatency
initrd.img-5.5.0-3.2-liquorix-amd64 vmlinuz-5.4.18-xanmod10-custom
initrd.img-5.5.0-4.1-liquorix-amd64 vmlinuz-5.5.0-3.2-liquorix-amd64
initrd.img-5.5.4-xanmod3 vmlinuz-5.5.0-4.1-liquorix-amd64
initrd.img.old vmlinuz-5.5.4-xanmod3
memtest86+.bin vmlinuz.old
root@lenovo:~# update-grub2
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.3.0-29-lowlatency
Found initrd image: /boot/initrd.img-5.3.0-29-lowlatency
Found linux image: /boot/vmlinuz-5.3.0-29-lowlatency
Found initrd image: /boot/initrd.img-5.3.0-29-lowlatency
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
There're other kernels present, but after reboot only lowlatency
kernel and memtest are present in the grub menu. Also, during update it shows the same kernel two times. Previously, before generic cernels moving to another folder, generic and lowlatency kernels have been listed during grub update.
How could I resolve this issue?
The following three commands also solve this problem, by turning off the executable bit on 09_lowlatency and turning on the bit for 10_linux, in accordance with the text in /etc/grub.d/README.lowlatency. I recommend editing /etc/default/grub to change GRUB_TIMEOUT to a positive value, prior to invoking update-grub as well.
I've solved it, but the solution is not very nice.
Copy lowlatency grub configuration file into new custom grub config file:
sudo cp /etc/grub.d/09_lowlatency /etc/grub.d/08_custom
I got
09_lowlatency
file by following instructions:Take away these files so they will not duplicate grub menu entries and will not be duplicated in a list during
sudo update-grub2
command execution:sudo mv /etc/grub.d/10_linux /home/myuser/backup/ && sudo mv /etc/grub.d/09_lowlatency /home/myuser/backup/
I changed one
case
statement in the08_custom
file:Before changing it was:
After changing it became:
My
ls -alh /boot
andsudo update-grab2
commands show the next:I removed excessive code not needed in my case, then copy-pasted a pair of
for
loops forlowlatency
kernel and changedlowlatency
toxanmod10-custom
in it.