Ask Your Question
3

invalid magic number; you need to load the kernel first

asked 2015-06-21 11:29:34 -0500

leydekker gravatar image

I messed up trying to boot fedora 22 in a higher resolution after installing NVIDIA drivers. Probably i ran dracut -f with the wrong file. Booting kernel-4.0.5-300.fc22.x86_64 from the menu gives the message: error invalid magic number; you need to load the kernel first'. I removed vmlinuz-4.0.5* from /boot and tried to reinstall, but it says ' Package is already installed, skipping. Any idea how i get a valid entry for 4.0.5 back in the grub menu? An older kernel still works.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-06-23 09:44:38 -0500

You should as a rule never manually remove binary artifacts - let the package manager handle that. You can force a reinstall using "dnf reinstall kernel". As a rule, dnf can also rollback bad installs - so keeping things managed means it's easier down the road.
Every install of a kernel will cause a dracut to be run. HOWEVER, realize it uses the prior kernel/initrd setup to determine the settings for the new/update. If you have installed NVidia you'll have to roll back those changes - following http://www.if-not-true-then-false.com... would help cleaning things up (Nvidia will disable standard Fedora features which you'll need if you want to run plain FOSS).

edit flag offensive delete link more

Comments

Thank you for the response bit4man. I managed to have a valid grub entry for 4.0.5 back again. I could generate the initramfs-4.0.5-* file following your lines. The config-4.0.5-* and the vmlinuz-4.0.5-* file I copied from a fedora 22 virtual machine. To my surprise that worked. Uninstalling the NVidia drivers failed, so I had to reinstall them again. But.. rereading your lines I understand now I have to fix the former kernel (4.0.4) first. Thanks again for your help.

leydekker gravatar imageleydekker ( 2015-06-25 09:07:03 -0500 )edit

Question Tools

Stats

Asked: 2015-06-21 11:29:34 -0500

Seen: 8,365 times

Last updated: Jun 23 '15