Setting-up GRUB2 Properly for Ubuntu 12.04 Running on XenServer

by cloudnull
GNU/Linux ◆ xterm ◆ bash 5732 views

What we are doing here :

In this screen cast we are going to be setting up (fixing) a Ubuntu Linux 12.04 LTS instance running on XenServer such that the menu.lst file is never broken by the injection of UUIDs on installation of a Kernel or through distribution upgrades.

Why we are doing it :

In Ubuntu, if you install an updated Kernel and or do a distribution upgrade you may be asked to use a package maintainers version of Ubuntu’s menu.lst. If you are asked to update the menu.lst file you and choose to install the “Package maintainers” version of the file you will break your installation of Ubuntu. This is because UUIDs are injected into the menu.lst file and XenServer does not know how to handle these UUID entries when it attempts to boot the instance.

If you have Hypervisor access you will see something like this when you attempt to boot the instance.

ERROR:Using <class \’grub.GrubConf.GrubConfigFile\’> to parse /grub/menu.lst: [ Traceback (most recent call last):;

  File \"/usr/bin/pygrub\", line 746, in ?;
  raise RuntimeError, \"Unable to find partition containing kernel\";

RuntimeError: Unable to find partition containing kernel; ]

If you don’t have hypervisor access you wont see these errors but you will know things are broken because your instance will fail to boot.

Check this post for more information on how to fix an instance that has already been effected by these problems : http://rackerua.com/2012/07/virtual-instance-fails-to-boot-after-an-upgrade/