Messed up GRUB after repartitioning and upgrading kernel

Asked by Tsvi Mostovicz

After deciding on repartition of my hard disk, I updated manually GRUB's entries so as to reflect changes in the partition table (Deleted a couple of partitions, and restructured hard disk). After that at every upgrade of the kernel, GRUB revert's to the original entry "root (hd0,8)" instead of (hd0,5) which naturally leads to GRUB error 22: partition not a found.

As a temporary fix, I manually edit menu.lst at every kernel update, or edit the entry in grub at boot time by pressing e, but I want a permanent solution.

Question information

English Edit question
Ubuntu grub Edit question
No assignee Edit question
Solved by:
Tsvi Mostovicz
Last query:
Last reply:
Revision history for this message
Benoit Malet (benoit-malet) said :

Hello !

As I also have the same kind of problems (but less annoying), I researched a bit and a bug had already been filed. So I added comment on that bug and linked this support requesst to it ... So feel free to add info on the bug report and please help bug squads by giving as much info as you can ;).

The bug can be found here:

Thanks for helping !


Revision history for this message
Best Tsvi Mostovicz (tsvi) said :

Problem solved. After installing a new kernel., dpkg runs update-grub. Read the man page, as seen there, it checks for the defaults set up in menu.lst one of them being "groot (hd0,8)" This of course in my case has to be edited to reflect the new partitioning.
What we need is either a code that will double-check the current grub configuration and alert the user to a discrepancy between the currently considered default, and the actual default.
This alert can also be called upon after closing gparted. Another option is having a current view of the partitions stored, and checked to see changes weren't made at reboot. (Most partitioning of systems is done while running some kind of livecd so after running parted doesn't really help)