Grub Can't find Kernel

Asked by Andrew Xavier

Recently I have removed older versions of my kernel, but when I try to access the newest version, grub spits out

error: invalid magic number
error: you need to load the kernel first.

I removed older kernel versions, and updated menu.lst, however all the old kernels still show up at boot. I even ran update-grub and took a look at menu.lst and only the newest kernel is in there. I wonder if the list of kernels at boot is not updating properly for some reason. What could this be?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Andrew Xavier
Solved:
Last query:
Last reply:
Revision history for this message
Andrew Xavier (9b8h) said :
#1

I'm running Ubuntu 11.04 Server.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

There is no menu.lst, Grub2 uses a whole host of config files. If you hold SHIFT at boot and choose an older kernel does it boot

Revision history for this message
Andrew Xavier (9b8h) said :
#3

One of my old kernels (2.6.*) does boot after it automatically fixed the errors in /boot.

Revision history for this message
Andrew Xavier (9b8h) said :
#4

I would like to ultimately use 3.0.0-14, the newest version I have on the system. However for some reason grub won't find it. All the required files are in /boot.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

If you run:

sudo update-grub

What is output?

Revision history for this message
Andrew Xavier (9b8h) said :
#6

    Searching for GRUB installation directory ... found: /boot/grub
    Searching for default file ... found: /boot/grub/default
    Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
    Searching for splash image ... none found, skipping ...
    Found kernel: /vmlinuz-3.2.0-24-generic
    Found kernel: /vmlinuz-3.0.0-20-server
    Found kernel: /vmlinuz-3.0.0-19-server
    Found kernel: /vmlinuz-3.0.0-17-server
    Found kernel: /vmlinuz-3.0.0-16-server
    Found kernel: /vmlinuz-3.0.0-15-server
    Found kernel: /vmlinuz-3.0.0-12-server
    Found kernel: /vmlinuz-2.6.38-12-server
    Found GRUB 2: /boot/grub/core.img
    Found kernel: /memtest86+.bin
    Updating /boot/grub/menu.lst ... done

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

If you reboot now, is it ok?

Revision history for this message
Andrew Xavier (9b8h) said :
#8

No, the list of kernels has not been updated.

Revision history for this message
Andrew Xavier (9b8h) said :
#9

I ran this command a number of times before, it appeared based on the output that all was OK but on boot the same old list remained in tact.

Revision history for this message
Andrew Xavier (9b8h) said :
#10

I'm going to try upgrading my system to 12.04 and see how that goes.

Revision history for this message
Andrew Xavier (9b8h) said :
#11

After upgrading grub and my system to the latest version, I was able to solve this problem, and now I'm loading off the latest kernel.