Page 1 of 1

Can't upgrade to new kernel

PostPosted: Nov 17th, '14, 07:56
by united4
When trying to upgrade Mageia 4 to new kernel (actually any new version), I got non-working additions to GRUB2. GRUB2 configuration didn't include any initrd line, and the corresponding /boot symlinks created were broken. Running dracut gives an error message about being unable to produce modules in /lib/modules, though the corresponding kernel version directories appear to be populated with the correct files. Additionaly, when trying to edit boot configuration in Mageia control centrel the applet just gives an application exited error (though I am not sure this problem is related to the previous).

Is there something I can try?

Re: Can't upgrade to new kernel

PostPosted: Nov 17th, '14, 09:47
by filip

Re: Can't upgrade to new kernel

PostPosted: Nov 17th, '14, 10:21
by gohlip
Try with
Code: Select all
# grub2-install /dev/sda
# grub2-mkconfig -o /boot/grub2/grub.cfg
as root.

Re: Can't upgrade to new kernel

PostPosted: Nov 18th, '14, 10:44
by united4
Both commands run without errors, the second one adds an initrd line for the old kernel but not for the new. The new kernel image doesn't have a corresponding initrd file anyway in /boot.

It seems I'm stuck with the old kernel and I suspect one of the existing libraries is responsible (the system has the latest updates btw).

Concerning GRUB2 support by MCC, I believe it is not "fully" supported, in this case the applet doesn't even start up. Though as I said this may be irrelevant to the actual problem here, which is inability to boot into a new kernel.

(Trying to boot into a new kernel fails and I have to choose the old kernel from GRUB2 menu and remove the latest additions from add/remove software applet)

Re: Can't upgrade to new kernel

PostPosted: Nov 18th, '14, 11:53
by gohlip
Right. I understand.
Now change the vmlinuz and initrd to vmlinuz-desktop and initrd-desktop and it will boot to new kernel.(at the grub menu line - press 'e' at Mageia entry and modify)

ps: I am on Mageia 5 and this issue is resolved.
Unfortunately, it may not for you.

There are 2 methods to change this permanently and I will write again when I reached back.
I am outside.

Re: Can't upgrade to new kernel

PostPosted: Nov 18th, '14, 14:16
by gohlip
Check the first entry in your grub.cfg
o Does it contain 'nomodeset' in the linux line?
o What vmlinuz and initrd does it use?
Does it use vmlinuz-desktop and initrd-desktop.img or does it use vmlinuz and initrd.img?

If it use vmlinuz and initrd.img and has nomodeset,
Then check out you latest kernel and do the following.
I use the following as my example
vmlinuz-3.17.3-desktop-1.mga5
initrd-3.17.3-desktop-1.mga5.img
Note initrd-3.xx.x-xxxx.img must end with .img
Code: Select all
# ln -sf /boot/vmlinuz-3.17.3-desktop-1.mga5 /boot/vmlinuz
# ln -sf /boot/initrd-3.17.3-desktop-1.mga5.img /boot/initrd.img
as root.

You should boot okay then.
No need to grub-install or update-grub (but if do, its okay, but make sure its the exact command per my earlier post, ie. grub2-xxx and grub2-mkconfig -o xxxxxx)

ps: if there is new kernel, repeat with latest kernel. But if kernel updated with the same numbering, no need to do this.
2nd method - let's stick with this as 2nd method while easier, may need to modify grub.cfg each time new kernel or update-grub and most are apprehensive about changing grub.cfg (it's ok, but many are afraid).