Why does upgrading to 12.04 on an OpenVZ VPS warn that the kernel size is 0?

6,071

But what to do now?

Continue. The warning is expected, since OpenVZ VPSs do not have their own kernels -- they operate on the physical host's kernel. OpenVZ is more like an enhanced chroot rather than a true virtual machine in that respect.

Important - if your running kernel is less than 2.6.24

Please check your current kernel version with uname -r. If it is less than 2.6.24, the upgrade will fail half-way with a glibc error. That happens because the glibc included by default with 12.04 requires a minimum 2.6.24 kernel -- glibc are the critical C libraries used by every application.

At that point, you will need the instructions [from this answer], as pasted below:


I've set up a PPA containing a recompiled libc which is compiled to work on 2.6.18 or newer (please check uname -r!), and it should override the current libc provided by Precise. Just add ppa:izx/ovz-libc, update, and it should let you get past this. Specifically, something like this:

apt-add-repository ppa:izx/ovz-libc
apt-get update
apt-get -f install
do-release-upgrade

and continue on until the upgrade completes successfully. I highly recommend NOT replacing any changed or non-existent config files.

I will be keeping the ppa updated as and when libc is updated upstream. The PPA package includes a pin so that it will only be updated when the new fixed libc is available on the PPA, not when it first appears in the official repositories.

Share:
6,071

Related videos on Youtube

Frank Moore
Author by

Frank Moore

Updated on September 18, 2022

Comments

  • Frank Moore
    Frank Moore over 1 year

    When I tried to upgrade my server to ubuntu 12.04, it gave this message, but the upgrade process will continue :

     WARNING:root:estimate_kernel_size_in_boot() returned '0'?
    

    This is a VPS server on openvz. I just upgraded from 11.04 to 11.10 without any problems. But what to do now?

    • Mitch
      Mitch almost 12 years
      Can you access a shell?
    • Frank Moore
      Frank Moore almost 12 years
      @Mitch Yes its working. I tried to upgrade through it. I didn't upgrade to 12.04... cancelled it after seeing the error!
    • Mitch
      Mitch almost 12 years
      Can you include the output of sudo fdisk -l
    • Frank Moore
      Frank Moore almost 12 years
      @Mitch It says "cannot open /proc/partitions"
    • Mitch
      Mitch almost 12 years
      Do you have other OS's on you system
    • Frank Moore
      Frank Moore almost 12 years
      @Mitch Nope... its a VPS... Inside OpenVZ
    • ish
      ish almost 12 years
      @Mitch : fdisk fails because OpenVZ has one single "simulated filesystem", no partitions or anything.
    • jeremiah
      jeremiah over 11 years
      I'm getting this too on my TrimSlice, a tegra 2 dev board.
  • Frank Moore
    Frank Moore almost 12 years
    It worked but it took my server offline :P There were some issues with openvz and 12.04. Thanks to my host's support, we fixed it :D
  • nurikabe
    nurikabe about 11 years
    Just gave this a go but I'm still getting gcc errors when trying to run apt-get -f install: gcc: /lib/libc.so.6: version `GLIBC_2.14' not found (required by gcc)
  • shakaran
    shakaran over 10 years
    This PPA didn't work for Virtuozzo at least. Testing from Ubuntu 10.04 to 12.04 it fails to me with: "/lib/libc.so.6: version `GLIBC_2.14' not found (required by locale)"