Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Thanks in advance for any help.

I'm running Ubuntu and Windows 7 on separate partitions with a large storage drive to share files between them.

fdisk -l shows:

Device Boot         Start         End      Blocks   Id  System
/dev/sda1   *        2048   209717247   104857600    7  HPFS/NTFS/exFAT
/dev/sda2       209717248   419432447   104857600   83  Linux
/dev/sda3       419432448  3907028991  1743798272    b  W95 FAT32

There's a second GPT backup disk, but it shouldn't be a problem.

Device Boot         Start         End      Blocks   Id  System
/dev/sdb1               1  4294967295  2147483647+  ee  GPT

I've just upgraded my 11.10 Ubuntu to 12.04, during the upgrade I got an error about grub being installed on a partition, which I recognised from installing 11.10 and ignored.

However, having completed the upgrade all the Ubuntu entries have disappeared from grub. There are a few linux 3 entries, which don't work and my Windows 7 entry, which I didn't try but I presume still works.

I've booted up the 11.10 live cd and i've tried following this:

however when I get to the part where I run


I get

/etc/grub.d/00_header: 28: .: Can't open /usr/share/grub/grub-mkconfig_lib

I had similar problems when I installed 11.10 but I can't remember how I fixed them >_<

Any advice on what to try next?

share|improve this question
In the end I fixed this by running boot-repair Installed through the 11.10 live cd. The default repair fixed the problem for me, although it didn't change the names of my grub records, so I now select Linux 3 to boot Ubuntu. I'm sure I can fix that issue separately by editing the grub config. – thelastshadow May 15 '12 at 21:43

This is apparently a bug in Ubuntu. Package grub-common contains the missing file but in another place. I added a symbolic link to allow the file to be found.

I ran this command:

ln -s /usr/lib/grub/grub-mkconfig_lib /usr/share/grub/grub-mkconfig_lib

Afterwards update-grub succeeded.

share|improve this answer
Cheers. If I have any trouble on my next update I'll give that a go. – thelastshadow Jun 11 '12 at 16:11
up vote 1 down vote accepted

I've had this issue every time I've upgraded a dual boot system since. I've fixed it every time using boot-repair installed via apt-get from the Ubuntu live CD.

Note: You only need to install boot-repair temporarily onto the CD, then run it to fix the problem. The default option has worked for me every time.

share|improve this answer

I had a similat problem and:

ln -s /usr/lib/grub/grub-mkconfig_lib /usr/share/grub/grub-mkconfig_lib 

worked for me.

share|improve this answer

Your Answer


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.