Kernel messed up; unable to get internet access

I have apparently screwed up my kernel. When I boot the server using the CentOS 6 kernel (“CentOS 6 x64 vmlinuz-2.6.32-504.16.2.el6.x86_64” from the DO control panel), I get the following error and I’m not able to access the internet (it appears not networking):

FATAL: Could not load /lib/modules/2.6.32-504.12.2.el6.x84_64/modules.dep: No such file or directory.

(the directory /lib/modules/ is empty)

I’ve also tried using the DigitalOcean GrubLoader v0.2 (20160714) CentOS, which I only get the grub prompt. Grub doesn’t find any kernels in /boot/vmlinuz....

If I boot with the CentOS kernel, use console access and then run service network restart, I get the following errors:

Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.
FATAL: Could not load /lib/modules/2.6.32-504.12.2.el6.x84_64/modules.dep: No such file or directory.

I believe the problem that caused this was removing old kernels (using rpm -e kernel-...), but it broke the kernel somehow (I think deleted it) as I wanted to get to the latest kernel with the meltdown/spectre fixes.

Any ideas how I can get a working kernel installed?

Let me know if you need any other details.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


Have you tried Boot into the Recovery ISO? You can follow the steps on how to do that here: