Ubuntu – How to repair a new kernel version and omit the “Previous Linux versions” from GRUB

grub2kernelpartial-upgradeupgrade

A few days ago, I upgraded to a new kernel. Unfortunately, before the installation was finished, the computer froze and I had to restart it forcefully.

Now, in GRUB, it shows the new kernel and below it a "Previous Linux versions" item. Whenever I boot into the new kernel, I get my screen flickering. Several daemons start, but it freezes there; it never gets me to the display manager.

Fortunately, the items under "Previous Linux versions" work. From there, I want to reinstall the new kernel. I tried from searching in the /var/cache/apt/archives/ directory and installed all the kernel related files there; that didn't work — I still get the new kernel version that doesn't work and the Previous Linux versions item. I tried through Synaptic, the results were the same. I ran sudo update-grub, but that didn't do anything

How can I upgrade my kernel to the newest version and eliminate the "Previous Linux versions" item?

I am using 11.04 with amd64 architecture.

Best Answer

This may help you to arrange and omit previous kernel versions and gain some extra space.

Have you ever installed Grub-Customizer? Yes, it's a nice tool for rearrange our boot system and gain some extra space in the discs. Very usefull though!

But, as i recomende that you install this usefull app, at the same time i advise you to be carefull, because any distraction and your dual boot simply could go away!

And how can we fix this as an easy way?

Boot your cd (as you did before) with your Ubuntu (if you have latest version installed in your pc it doesn't matter if you boot another version of ubuntu. If you have Natty 11.04 you can simply use your 10.04 cd...)

try the experiment mode (you don't need to install ubuntu again!)

Then install (as you have made in your system) Grub-Customizer packages (sudo add-apt-repository ppa:danielrichter2007/grub-customizer && sudo apt-get update)

in update manager select the option "open source code software (Universal)"

In the terminal again, install the repository packages (sudo apt-get install grub-customizer)

Acess to Grub-Customizer and select your root. Then your boot option (in case you have dual or triple boot) will appear and you can select again and treat a big headache...

Very simple.

Hope you liked it!

Related Question