2

I have dual boot(triple boot) setup with Kali/Fedora and Windows 10. I'm using Fedora for my daily work and Kali for various experiments.

The problem is that whenever Kali gets and kernel update it still boots with older kernel after reboot.

I have following installed kernels :

> root@CoreImpact:~# dpkg --list | grep linux-image  
> linux-image-4.3.0-kali1-amd64             4.3.3-5kali4                
> amd64        Linux 4.3 for 64-bit PCs ii 
> linux-image-4.6.0-kali1-amd64             4.6.4-1kali1                
> amd64        Linux 4.6 for 64-bit PCs ii 
> linux-image-4.9.0-kali2-amd64             4.9.13-1kali1               
> amd64        Linux 4.9 for 64-bit PCs ii 
> linux-image-4.9.0-kali3-amd64             4.9.13-1kali2               
> amd64        Linux 4.9 for 64-bit PCs ii  linux-image-amd64           
> 4.9+79+kali2                         amd64        Linux for 64-bit PCs (meta-package)

How do I force Kali to boot with latest linux-image 4.9.0-kali3 instead of 4.6.0?

I've tried to update grub via grub-update command on Kali and grub-mkconfig on Fedora but it didn't helped.

Thanks.

  • Mount the root partition under ferdora then update Grub – GAD3R Mar 11 '17 at 10:05
  • It didn't helped :( – ConnectingPeople Mar 11 '17 at 10:25
  • No, only that one created by Win10. – ConnectingPeople Mar 11 '17 at 10:38
0

Since I cannot comment. Isn't the command update-grub instead of grub-update Plus please post your update-grub output.

  • Sorry update-grub is the correct command indeed. I will post the output on next comment. – ConnectingPeople Mar 11 '17 at 13:19
  • root@CoreImpact:~# update-grub Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.9.0-kali3-amd64 Found initrd image: /boot/initrd.img-4.9.0-kali3-amd64 Found linux image: /boot/vmlinuz-4.9.0-kali2-amd64 Found initrd image: /boot/initrd.img-4.9.0-kali2-amd64 Found linux image: /boot/vmlinuz-4.6.0-kali1-amd64 Found initrd image: /boot/initrd.img-4.6.0-kali1-amd64 Found Windows 10 on /dev/sda1 Found Fedora 25 (Workstation Edition) on /dev/sda4 done – ConnectingPeople Mar 11 '17 at 13:19
  • How come you have linux-image-4.9.0-kali3-amd64. Mine latest update is linux-image-4.9.0-kali2-amd64. I dont see any problem here. Try to boot manually. When grub screen appears go to advanced option and select the latest one. Meanwhile please post the /etc/default/grub file only the uncommented ones. – Sagaryal Mar 11 '17 at 14:36
  • I'm not sure how it installed version 3. Unfortunately the only option I have on boot screen is either to choose kernel version 4.6 or 4.3. 4.9 doesn't appear regardless of the update-grub output. Here are the contents of /etc/default/grub : GRUB_DEFAULT=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian GRUB_CMDLINE_LINUX_DEFAULT="quiet" GRUB_CMDLINE_LINUX="initrd=/install/gtk/initrd.gz" – ConnectingPeople Mar 11 '17 at 16:19
  • Hah, after reinstalling grub in Kali it boots with newest kernel, but it modifies Fedora entry and so now fedora boots with older kernel... That's strange. – ConnectingPeople Mar 11 '17 at 16:31
0

I've managed to fix this with selecting proper output file to grub2-mkconfig : grub2-mkconfig -o /boot/grub2/grub.cfg

Not sure where it was saving it by default in previous attempts. Now everything seems to be working fine.

-1

Glad you figured it but if I have grub issues my weapon of choice is grub-customizer.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

When run it, it will probe your system for OSes, rebuild grub and put it in the right place on your drive. It also makes it easy to edit the grub entries and control the boot process.

To force grub to load any specific kernel you just fire it up, select the menu entry you want to force, open it and edit to either:

  1. Change the kernel name to point to your desired kernel (in /boot/) while REMEMBERING to make the equivalent edit to the matching initrd, or
  2. Change the kernel and initrd paths in grub to point to the symlinks at /vmlinuz and /initrd.img in / and save the entry. Then edit the symlinks in / to point to your desired versions of kernel and initrd.

I had grief upon grief upon grief trying to get grub to automagically find the kernel for my dual boot into Busenlabs after I decided to migrate the BL installation to a LV (...fiddle, fiddle, fiddle...kaboom .... oops...broken again). BL being my emergency back up for booting and fixing Kali on the frequent occasions when my incessant and regular fiddling breaks it, so maybe BL was just getting its revenge.

However, opened up the grub entry in g-c, threw in the correct path name for / in grub-speak (lvm/...) and shell-speak (/dev/mapper/...), point linux and initrd at the symlinks in / of the LV, and voila.....fixed.

insmod part_gpt
insmod lvm
insmod ext2
set root='lvm/vg6-bunsen'
linux /vmlinuz root=/dev/mapper/vg6-bunsen ro quiet
initrd /initrd.img

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.