Ubuntu 12.04 upgrade: Grub update-grub fails after update
Solution 1
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.
Solution 2
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.
Related videos on Youtube
thelastshadow
Updated on September 18, 2022Comments
-
thelastshadow over 1 year
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:
http://opensource-sidh.blogspot.com/2011/06/recover-grub-live-ubuntu-cd.html
however when I get to the part where I run
update-grub
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?
-
thelastshadow almost 12 yearsIn the end I fixed this by running boot-repair help.ubuntu.com/community/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 almost 12 yearsCheers. If I have any trouble on my next update I'll give that a go.