Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't update kernel

In a seemingly endless quest to get Vagrant working I am trying to update Fedora. Vagrant needs VirtualBox, VirtualBox needs kernel sources, and kernel sources are only available for the latest kernel version.

$ uname -r
4.3.5-300.fc23.x86_64

I tried updating the system.

$ sudo dnf update
Last metadata expiration check: 2:03:57 ago on Tue May 10 11:20:17 2016.
Dependencies resolved.
Nothing to do.
Complete!

Clearly the system is already updated.

$ sudo dnf install kernel

Last metadata expiration check: 2:05:00 ago on Tue May 10 11:20:17 2016.
Package kernel-4.4.8-300.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

I tried removing the current kernel:

$ sudo dnf remove kernel-(uname -r)

Complete. Let's see what's installed:

$ rpm -qva "kernel-*"
kernel-core-4.4.8-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-headers-4.4.8-300.fc23.x86_64
kernel-modules-4.4.8-300.fc23.x86_64
kernel-devel-4.4.8-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

All good so far.

So I rebooted....

Only to find that three kernels were listed in Grub: 4.3.5-300.fc23.x86_64, and two much older ones from the 4.2 branch.

$ rpm -qva "kernel-*"
kernel-modules-4.3.5-300.fc23.x86_64
kernel-core-4.4.8-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-core-4.3.5-300.fc23.x86_64
kernel-headers-4.4.8-300.fc23.x86_64
kernel-modules-4.4.8-300.fc23.x86_64
kernel-devel-4.4.8-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

What on earth is going on here?

Can't update kernel

In a seemingly endless quest to get Vagrant working I am trying to update Fedora. Vagrant needs VirtualBox, VirtualBox needs kernel sources, and kernel sources are only available for the latest kernel version.

$ uname -r
4.3.5-300.fc23.x86_64

I tried updating the system.

$ sudo dnf update
Last metadata expiration check: 2:03:57 ago on Tue May 10 11:20:17 2016.
Dependencies resolved.
Nothing to do.
Complete!

Clearly the system is already updated.

$ sudo dnf install kernel

Last metadata expiration check: 2:05:00 ago on Tue May 10 11:20:17 2016.
Package kernel-4.4.8-300.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

I tried removing the current kernel:

$ sudo dnf remove kernel-(uname -r)

Complete. Let's see what's installed:

$ rpm -qva "kernel-*"
kernel-core-4.4.8-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-headers-4.4.8-300.fc23.x86_64
kernel-modules-4.4.8-300.fc23.x86_64
kernel-devel-4.4.8-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

All good so far.

So I rebooted....

Only to find that three kernels were listed in Grub: 4.3.5-300.fc23.x86_64, and two much older ones from the 4.2 branch.

$ rpm -qva "kernel-*"
kernel-modules-4.3.5-300.fc23.x86_64
kernel-core-4.4.8-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-core-4.3.5-300.fc23.x86_64
kernel-headers-4.4.8-300.fc23.x86_64
kernel-modules-4.4.8-300.fc23.x86_64
kernel-devel-4.4.8-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

What on earth is going on here?

Edit: I later attempted to update grub to pick up the new kernel.

$ cd /boot/grub2
$ mv grub.cfg grub.cfg.old
$ sudo grub2-mkconfig -o grub.cfg.new
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.8-300.fc23.x86_64
Found initrd image: /boot/initramfs-4.4.8-300.fc23.x86_64.img
Found linux image: /boot/vmlinuz-4.4.4-301.fc23.x86_64
Found initrd image: /boot/initramfs-4.4.4-301.fc23.x86_64.img
Found linux image: /boot/vmlinuz-4.3.5-300.fc23.x86_64
Found initrd image: /boot/initramfs-4.3.5-300.fc23.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-0468365313db460f867aa0a7c6284ace
Found initrd image: /boot/initramfs-0-rescue-0468365313db460f867aa0a7c6284ace.img

I can confirm that the new config file has the correct entries:

 $ grep 4.4 grub.cfg
  menuentry 'Fedora (4.4.8-300.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.3.5-300.fc23.x86_64-advanced-29e2d74b-255e-44fa-b8e7-edb54b33f225' {
linux16 /vmlinuz-4.4.8-300.fc23.x86_64 root=/dev/mapper/fedora_deepwinter-root ro rd.lvm.lv=fedora_deepwinter/root rd.luks.uuid=luks-b09d62d7-9782-42d5-890d-f117ccb8a1cc rd.lvm.lv=fedora_deepwinter/swap rhgb quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012' LANG=en_GB.UTF-8
initrd16 /initramfs-4.4.8-300.fc23.x86_64.img
    menuentry 'Fedora (4.4.4-301.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.3.5-300.fc23.x86_64-advanced-29e2d74b-255e-44fa-b8e7-edb54b33f225' {
linux16 /vmlinuz-4.4.4-301.fc23.x86_64 root=/dev/mapper/fedora_deepwinter-root ro  rd.lvm.lv=fedora_deepwinter/root rd.luks.uuid=luks-b09d62d7-9782-42d5-890d-f117ccb8a1cc rd.lvm.lv=fedora_deepwinter/swap rhgb quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012' LANG=en_GB.UTF-8
initrd16 /initramfs-4.4.4-301.fc23.x86_64.img

Now, I'm not dual-booting or anything complicated like that. I have one hard drive with one Fedora installation on it. How can it be that grub.cfg has the right entries but when I reboot the computer, it still shows 4.2.4, 4.2.3 and 4.3.5? Could it be a mount point problem with multiple /boots?

$ mount | grep boot
/dev/sda2 on /boot type ext4 (rw,relatime,seclabel,data=ordered)

$ ls /dev/ | grep sd
sda
sda1
sda2
sda3
sda4

I'm not really sure why the Grub is not picking up the kernels or where its loading its from config from.

$ ls /boot | grep 4.4
config-4.4.4-301.fc23.x86_64
config-4.4.8-300.fc23.x86_64
initramfs-4.4.4-301.fc23.x86_64.img
initramfs-4.4.8-300.fc23.x86_64.img
System.map-4.4.4-301.fc23.x86_64
System.map-4.4.8-300.fc23.x86_64
vmlinuz-4.4.4-301.fc23.x86_64
vmlinuz-4.4.8-300.fc23.x86_64

Can't update kernel

In a seemingly endless quest to get Vagrant working I am trying to update Fedora. Vagrant needs VirtualBox, VirtualBox needs kernel sources, and kernel sources are only available for the latest kernel version.

$ uname -r
4.3.5-300.fc23.x86_64

I tried updating the system.

$ sudo dnf update
Last metadata expiration check: 2:03:57 ago on Tue May 10 11:20:17 2016.
Dependencies resolved.
Nothing to do.
Complete!

Clearly the system is already updated.

$ sudo dnf install kernel

Last metadata expiration check: 2:05:00 ago on Tue May 10 11:20:17 2016.
Package kernel-4.4.8-300.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

I tried removing the current kernel:

$ sudo dnf remove kernel-(uname -r)

Complete. Let's see what's installed:

$ rpm -qva "kernel-*"
kernel-core-4.4.8-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-headers-4.4.8-300.fc23.x86_64
kernel-modules-4.4.8-300.fc23.x86_64
kernel-devel-4.4.8-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

All good so far.

So I rebooted....

Only to find that three kernels were listed in Grub: 4.3.5-300.fc23.x86_64, and two much older ones from the 4.2 branch.

$ rpm -qva "kernel-*"
kernel-modules-4.3.5-300.fc23.x86_64
kernel-core-4.4.8-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-core-4.3.5-300.fc23.x86_64
kernel-headers-4.4.8-300.fc23.x86_64
kernel-modules-4.4.8-300.fc23.x86_64
kernel-devel-4.4.8-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

What on earth is going on here?

Edit: I later attempted to update grub to pick up the new kernel.

$ cd /boot/grub2
$ mv grub.cfg grub.cfg.old
$ sudo grub2-mkconfig -o grub.cfg.new
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.8-300.fc23.x86_64
Found initrd image: /boot/initramfs-4.4.8-300.fc23.x86_64.img
Found linux image: /boot/vmlinuz-4.4.4-301.fc23.x86_64
Found initrd image: /boot/initramfs-4.4.4-301.fc23.x86_64.img
Found linux image: /boot/vmlinuz-4.3.5-300.fc23.x86_64
Found initrd image: /boot/initramfs-4.3.5-300.fc23.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-0468365313db460f867aa0a7c6284ace
Found initrd image: /boot/initramfs-0-rescue-0468365313db460f867aa0a7c6284ace.img

I can confirm that the new config file has the correct entries:

 $ grep 4.4 grub.cfg
  menuentry 'Fedora (4.4.8-300.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.3.5-300.fc23.x86_64-advanced-29e2d74b-255e-44fa-b8e7-edb54b33f225' {
linux16 /vmlinuz-4.4.8-300.fc23.x86_64 root=/dev/mapper/fedora_deepwinter-root ro rd.lvm.lv=fedora_deepwinter/root rd.luks.uuid=luks-b09d62d7-9782-42d5-890d-f117ccb8a1cc rd.lvm.lv=fedora_deepwinter/swap rhgb quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012' LANG=en_GB.UTF-8
initrd16 /initramfs-4.4.8-300.fc23.x86_64.img
    menuentry 'Fedora (4.4.4-301.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.3.5-300.fc23.x86_64-advanced-29e2d74b-255e-44fa-b8e7-edb54b33f225' {
linux16 /vmlinuz-4.4.4-301.fc23.x86_64 root=/dev/mapper/fedora_deepwinter-root ro  rd.lvm.lv=fedora_deepwinter/root rd.luks.uuid=luks-b09d62d7-9782-42d5-890d-f117ccb8a1cc rd.lvm.lv=fedora_deepwinter/swap rhgb quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012' LANG=en_GB.UTF-8
initrd16 /initramfs-4.4.4-301.fc23.x86_64.img

Now, I'm not dual-booting or anything complicated like that. I have one hard drive with one Fedora installation on it. How can it be that grub.cfg has the right entries but when I reboot the computer, it still shows 4.2.4, 4.2.3 and 4.3.5? Could it be a mount point problem with multiple /boots?

$ mount | grep boot
/dev/sda2 on /boot type ext4 (rw,relatime,seclabel,data=ordered)

$ ls /dev/ | grep sd
sda
sda1
sda2
sda3
sda4

I'm not really sure why the Grub is not picking up the kernels or where its loading its from config from.The kernel files are definitely there:

$ ls /boot | grep 4.4
config-4.4.4-301.fc23.x86_64
config-4.4.8-300.fc23.x86_64
initramfs-4.4.4-301.fc23.x86_64.img
initramfs-4.4.8-300.fc23.x86_64.img
System.map-4.4.4-301.fc23.x86_64
System.map-4.4.8-300.fc23.x86_64
vmlinuz-4.4.4-301.fc23.x86_64
vmlinuz-4.4.8-300.fc23.x86_64

Perhaps I should try reinstalling grub into the hard drive...

$ sudo grub2-install --target=/dev/sda
grub2-install: error: /usr/lib/grub/dev/sda/modinfo.sh doesn't exist. Please specify --target or --directory.
$ sudo grub2-install --directory=/boot
grub2-install: error: /boot/modinfo.sh doesn't exist. Please specify --target or --directory.

I dont know what modinfo.sh is, but it looks important...

At this point I'm not really sure why the Grub is not picking up the kernels or where its loading its from config from.

Grub wont pick up new kernels (was: Can't update kernelkernel)

In a seemingly endless quest to get Vagrant working I am trying to update Fedora. Vagrant needs VirtualBox, VirtualBox needs kernel sources, and kernel sources are only available for the latest kernel version.

$ uname -r
4.3.5-300.fc23.x86_64

I tried updating the system.

$ sudo dnf update
Last metadata expiration check: 2:03:57 ago on Tue May 10 11:20:17 2016.
Dependencies resolved.
Nothing to do.
Complete!

Clearly the system is already updated.

$ sudo dnf install kernel

Last metadata expiration check: 2:05:00 ago on Tue May 10 11:20:17 2016.
Package kernel-4.4.8-300.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

I tried removing the current kernel:

$ sudo dnf remove kernel-(uname -r)

Complete. Let's see what's installed:

$ rpm -qva "kernel-*"
kernel-core-4.4.8-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-headers-4.4.8-300.fc23.x86_64
kernel-modules-4.4.8-300.fc23.x86_64
kernel-devel-4.4.8-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

All good so far.

So I rebooted....

Only to find that three kernels were listed in Grub: 4.3.5-300.fc23.x86_64, and two much older ones from the 4.2 branch.

$ rpm -qva "kernel-*"
kernel-modules-4.3.5-300.fc23.x86_64
kernel-core-4.4.8-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-core-4.3.5-300.fc23.x86_64
kernel-headers-4.4.8-300.fc23.x86_64
kernel-modules-4.4.8-300.fc23.x86_64
kernel-devel-4.4.8-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

What on earth is going on here?

Edit: I later attempted to update grub to pick up the new kernel.

$ cd /boot/grub2
$ mv grub.cfg grub.cfg.old
$ sudo grub2-mkconfig -o grub.cfg.new
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.8-300.fc23.x86_64
Found initrd image: /boot/initramfs-4.4.8-300.fc23.x86_64.img
Found linux image: /boot/vmlinuz-4.4.4-301.fc23.x86_64
Found initrd image: /boot/initramfs-4.4.4-301.fc23.x86_64.img
Found linux image: /boot/vmlinuz-4.3.5-300.fc23.x86_64
Found initrd image: /boot/initramfs-4.3.5-300.fc23.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-0468365313db460f867aa0a7c6284ace
Found initrd image: /boot/initramfs-0-rescue-0468365313db460f867aa0a7c6284ace.img

I can confirm that the new config file has the correct entries:

 $ grep 4.4 grub.cfg
  menuentry 'Fedora (4.4.8-300.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.3.5-300.fc23.x86_64-advanced-29e2d74b-255e-44fa-b8e7-edb54b33f225' {
linux16 /vmlinuz-4.4.8-300.fc23.x86_64 root=/dev/mapper/fedora_deepwinter-root ro rd.lvm.lv=fedora_deepwinter/root rd.luks.uuid=luks-b09d62d7-9782-42d5-890d-f117ccb8a1cc rd.lvm.lv=fedora_deepwinter/swap rhgb quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012' LANG=en_GB.UTF-8
initrd16 /initramfs-4.4.8-300.fc23.x86_64.img
    menuentry 'Fedora (4.4.4-301.fc23.x86_64) 23 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.3.5-300.fc23.x86_64-advanced-29e2d74b-255e-44fa-b8e7-edb54b33f225' {
linux16 /vmlinuz-4.4.4-301.fc23.x86_64 root=/dev/mapper/fedora_deepwinter-root ro  rd.lvm.lv=fedora_deepwinter/root rd.luks.uuid=luks-b09d62d7-9782-42d5-890d-f117ccb8a1cc rd.lvm.lv=fedora_deepwinter/swap rhgb quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012' LANG=en_GB.UTF-8
initrd16 /initramfs-4.4.4-301.fc23.x86_64.img

Now, I'm not dual-booting or anything complicated like that. I have one hard drive with one Fedora installation on it. How can it be that grub.cfg has the right entries but when I reboot the computer, it still shows 4.2.4, 4.2.3 and 4.3.5? Could it be a mount point problem with multiple /boots?

$ mount | grep boot
/dev/sda2 on /boot type ext4 (rw,relatime,seclabel,data=ordered)

$ ls /dev/ | grep sd
sda
sda1
sda2
sda3
sda4

The kernel files are definitely there:

$ ls /boot | grep 4.4
config-4.4.4-301.fc23.x86_64
config-4.4.8-300.fc23.x86_64
initramfs-4.4.4-301.fc23.x86_64.img
initramfs-4.4.8-300.fc23.x86_64.img
System.map-4.4.4-301.fc23.x86_64
System.map-4.4.8-300.fc23.x86_64
vmlinuz-4.4.4-301.fc23.x86_64
vmlinuz-4.4.8-300.fc23.x86_64

Perhaps I should try reinstalling grub into the hard drive...

$ sudo grub2-install --target=/dev/sda
grub2-install: error: /usr/lib/grub/dev/sda/modinfo.sh doesn't exist. Please specify --target or --directory.
$ sudo grub2-install --directory=/boot
grub2-install: error: /boot/modinfo.sh doesn't exist. Please specify --target or --directory.

I dont know what modinfo.sh is, but it looks important...

At this point I'm not really sure why the Grub is not picking up the kernels or where its loading its from config from.