Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Initially, Ubuntu was installed on another partition (sda5 or sda4).

At some point I did manually move the root partition to sda2.

Now, the problem is that whenever a new kernel is installed, the automatic regeneration of the menu.lst is using the OLD Linux partition. So I have to manually change in menu.lst the lines :

root            (hd0,5)

into

root            (hd0,1)

How can I configure update-grub to automatically generate menu.lst with the current Linux root partition? I assume that the (hd0,5) was written somewhere at installation, but I couldn't find it.

share|improve this question
add comment

1 Answer

One possibility that I have chosen is to tell grub to install at the master boot partition with

sudo fdisk -l                # where you get the disk
sudo grub-install /dev/hda   # in my computer it is /dev/sda

and then you update everything with:

update-grub2

Hope you succeed, you better wait for an expert answer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.