Boot problem with Xen DomU after kernel upgrade

Bug #1094247 reported by Mathias Weidner
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Setting:

- Xen Dom0 running Ubuntu Server 12.04
- Xen DomU running Ubuntu Server 12.04

$ lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04

$ apt-cache policy grub2-common
grub2-common:
  Installed: 1.99-21ubuntu3.4
  Candidate: 1.99-21ubuntu3.4
  Version table:
 *** 1.99-21ubuntu3.4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.99-21ubuntu3 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

$ apt-cache policy xen-utils-4.1
xen-utils-4.1:
  Installiert: 4.1.2-2ubuntu2.4
  Kandidat: 4.1.2-2ubuntu2.4
  Versionstabelle:
 *** 4.1.2-2ubuntu2.4 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     4.1.2-2ubuntu2 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages

DomU was installed with Netboot-Image on a LVM volume. Bootloader than changed to pygrub.

--- Xen configuration for machine ---
name = "openldaptest"
memory = 256
disk = ['phy:/dev/camion/openldaptest,xvda,w']
vif = ['bridge=xenbr0']
bootloader = "pygrub"
---

Did `apt-get dist-upgrade` inside the DomU with kernel upgrade and after `init 6` the DomU would not boot anymore.

Starting pygrub manually:

    $ sudo /usr/bin/pygrub -n /dev/camion/openldaptest
    Using <class 'grub.GrubConf.Grub2ConfigFile'> to parse
    /boot/grub/grub.cfg
    WARNING:root:Unknown directive load_video
    WARNING:root:Unknown directive terminal_output
    WARNING:root:Unknown directive else
    WARNING:root:Unknown directive else
    WARNING:root:Unknown directive else
    WARNING:root:Unknown directive else
    WARNING:root:Unknown directive else
    WARNING:root:Unknown directive export
    WARNING:root:Unknown image directive recordfail
    WARNING:root:Unknown image directive gfxmode
    WARNING:root:Unknown image directive recordfail
    WARNING:root:Unknown directive submenu
    WARNING:root:Unknown image directive recordfail
    WARNING:root:Unknown image directive gfxmode
    WARNING:root:Unknown image directive recordfail
    Traceback (most recent call last):
      File "/usr/bin/pygrub", line 763, in <module>
        raise RuntimeError, "Unable to find partition containing kernel"
    RuntimeError: Unable to find partition containing kernel

The message 'Unknown directive submenu' was the first different from a working DomU.

So I mounted the the system partition, copied a backup over /boot/grub/grub.cfg and manually changed it to the version of the new kernel on all occurences of the version number. After that I unmounted the system partition and could start the DomU again. I then did login on the DomU and removed the old kernel with `apt-get purge`. This time after `init 6` the DomU booted fine.

So after all it is working but the process of upgrading the kernel is suboptimal.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub (Ubuntu):
status: New → Confirmed
Revision history for this message
Olli (patteh) wrote :

On my system I found an unmatched curly bracket in /boot/grub/grub.cfg after the end of the last menuentry of this submenu for older kernels:

menuentry 'Ubuntu, with Linux 3.2.0-36-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        [ ...SNIP...]
        initrd /boot/initrd.img-3.2.0-36-generic
}
} <------ BAD BOY
### END /etc/grub.d/10_linux ###

I uncommented "BAD BOY" and everything was fine.

Olli

Revision history for this message
Olli (patteh) wrote :

Forget about my last comment. The bracket is correct. Just remove the submenu entry in grub.cfg an the DomU will boot again.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.