Grub: How to move an item at the top
Hello,
I recompiled the Debian Linux kernel using the command:
linux-source-6.12$ time make -s -j9 bindeb-pkg
it generates some files Debian packages and info file:
$ ls -lh|grep '17 set'
-rw-r--r-- 1 frank frank 8,5M 17 set 15.47
linux-headers-6.12.43_6.12.43-2_amd64.deb
-rw-r--r-- 1 frank frank 12M 17 set 15.47
linux-image-6.12.43_6.12.43-2_amd64.deb
-rw-r--r-- 1 frank frank 39M 17 set 15.47
linux-image-6.12.43-dbg_6.12.43-2_amd64.deb
-rw-r--r-- 1 frank frank 1,4M 17 set 15.46
linux-libc-dev_6.12.43-2_amd64.deb
drwxr-xr-x 27 frank frank 4,0K 17 set 15.46 linux-source-6.12
-rw-rw-r-- 1 frank frank 6,0K 17 set 15.47
linux-upstream_6.12.43-2_amd64.buildinfo
-rw-rw-r-- 1 frank frank 2,2K 17 set 15.47
linux-upstream_6.12.43-2_amd64.changes
then I installed the files "linux-headers-6.12.43_6.12.43-2_amd64.deb"
and "linux-image-6.12.43_6.12.43-2_amd64.deb" using "dpkg -i" the issue
is that Grub doesn't set my customized kernel image at the top of the
list of all possible bootable kernel images:
~# update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.12.43+deb13-amd64
Found initrd image: /boot/initrd.img-6.12.43+deb13-amd64
Found linux image: /boot/vmlinuz-6.12.43
Found initrd image: /boot/initrd.img-6.12.43
Found linux image: /boot/vmlinuz-6.12.41+deb13-amd64
Found initrd image: /boot/initrd.img-6.12.41+deb13-amd64
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 Debian GNU/Linux 11 (bullseye) on /dev/mapper/ld0-lv1
Found Debian GNU/Linux 12 (bookworm) on /dev/mapper/ld0-lv2
Found Debian GNU/Linux 9 (stretch) on /dev/mapper/ld0-lv4
Found Debian GNU/Linux 10 (buster) on /dev/mapper/ld0-lv5
Adding boot menu entry for UEFI Firmware Settings ...
done
as you can see my customized kernel is at the second place so every time
I boot I have to manually choose the proper kernel image to boot
(/boot/vmlinuz-6.12.43).
I have also noticed that in the root's directory "vmlinuz" symlink does
not point to "/boot/vmlinuz-6.12.43":
~$ ls -lh /
totale 56K
lrwxrwxrwx 1 root root 7 13 ago 15.24 bin -> usr/bin
drwxr-xr-x 3 root root 4,0K 17 set 15.49 boot
drwxr-xr-x 18 root root 3,2K 17 set 19.55 dev
drwxr-xr-x 113 root root 4,0K 8 set 13.56 etc
drwxr-xr-x 3 root root 4,0K 13 ago 15.38 home
lrwxrwxrwx 1 root root 35 8 set 13.54 initrd.img ->
boot/initrd.img-6.12.43+deb13-amd64
lrwxrwxrwx 1 root root 35 8 set 13.54 initrd.img.old ->
boot/initrd.img-6.12.41+deb13-amd64
lrwxrwxrwx 1 root root 7 13 ago 15.24 lib -> usr/lib
lrwxrwxrwx 1 root root 9 13 ago 15.24 lib64 -> usr/lib64
drwx------ 2 root root 16K 13 ago 15.23 lost+found
drwxr-xr-x 6 root root 4,0K 9 set 14.52 media
drwxr-xr-x 2 root root 4,0K 13 ago 15.24 mnt
drwxr-xr-x 2 root root 4,0K 13 ago 15.24 opt
dr-xr-xr-x 279 root root 0 17 set 19.55 proc
drwx------ 7 root root 4,0K 17 set 20.39 root
drwxr-xr-x 27 root root 700 17 set 19.55 run
lrwxrwxrwx 1 root root 8 13 ago 15.24 sbin -> usr/sbin
drwxr-xr-x 2 root root 4,0K 13 ago 15.24 srv
dr-xr-xr-x 12 root root 0 17 set 19.55 sys
drwxrwxrwt 15 root root 340 17 set 20.36 tmp
drwxr-xr-x 12 root root 4,0K 13 ago 15.24 usr
drwxr-xr-x 11 root root 4,0K 13 ago 15.49 var
lrwxrwxrwx 1 root root 32 8 set 13.54 vmlinuz ->
boot/vmlinuz-6.12.43+deb13-amd64
lrwxrwxrwx 1 root root 32 8 set 13.54 vmlinuz.old ->
boot/vmlinuz-6.12.41+deb13-amd64
is it this the issue? In all previous Debian stable releases when I
installed a customized kernel image package the "vmlinuz" symlink
pointed to the latest kernel image installed, why this behavior has stopped?
Thanks in advance, kind regards.
--
Franco Martelli
Reply to: