Problem installing OpenVZ with Debian Etch (2)

Discussion in 'HOWTO-Related Questions' started by pjdevries, Feb 13, 2007.

  1. pjdevries

    pjdevries Member

    First I want to appologize for posting this problem as a comment on the OpenVZ On Debian Etch For Webservers howto. Although it was meant as a comment, I also asked for a possible solution for the problem making the comment better fit for the forum.

    My problem concerns the above mentioned howto. A couple of weeks ago I managed to install a working OpenVZ system following the instructions of the howto. Yesterday I tried exatly the same thing, only to find out that the openvz kernel patch no longer applies. Has anyone else experienced the same problems and been able to solve them?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Do you get any error messages? Do you use the exact same kernel as in the tutorial?
     
  3. pjdevries

    pjdevries Member

    Thanks for the reply Falko.

    I downloaded all the kernel compilation prerequisites using a sligthly modified version of the aptitude command you describe in your tutorial:

    apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev​

    This should install the same kernel sources and patch as the ones you mention. The error messages I get when running the make-kpkg command are:
    START applying openvz patch (OpenVZ kernel patch for virtual server support)
    Testing whether "OpenVZ kernel patch for virtual server support" patch for 2.6.18 applies (dry run):
    1 out of 7 hunks FAILED -- saving rejects to file mm/fremap.c.rej
    5 out of 44 hunks FAILED -- saving rejects to file mm/memory.c.rej
    1 out of 6 hunks FAILED -- saving rejects to file mm/mprotect.c.rej
    6 out of 29 hunks FAILED -- saving rejects to file net/ipv4/netfilter/ip_tables.c.rej
    1 out of 8 hunks FAILED -- saving rejects to file net/ipv6/udp.c.rej
    "OpenVZ kernel patch for virtual server support" patch for 2.6.18 does not apply cleanly
    Patch /usr/src/kernel-patches/all/apply/openvz failed.​

    So the real answer to your second question is: probably not:D

    Any helpful suggestions are very welcome and highly appreciated but I guess I'll just have to wait until a modified version of the kernel patch will be available in the Etch package repository.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    uname -a
     
  5. pjdevries

    pjdevries Member

    Thanks for your follow up as well Till.

    The uname -a output is:
    Linux host1 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686 GNU/Linux​
     
  6. falko

    falko Super Moderator ISPConfig Developer

    You're using kernel 2.6.18-3 whereas the author of the OpenVZ tutorial uses 2.6.18. That's a difference, and that's why your patches failed.
     
  7. pjdevries

    pjdevries Member

    That makes sense. The problem is that I did a straight forward Debian install with the latetest net install CD and then followed the instructions of the tutorial. So it's not that I explicitly 'asked' for a 2.6.18-3 kernel to be installed but I got it anyhow and one way or another the 'apt-get install' from the tutorial gets me stuck with a kernel patch that doesn't apply. Don't get me wrong: I don't want to suggest there is something wrong with the tutorial. But it does seem that the most recent kernel and OpenVZ kernel patch in the Debian repository don't match up. Either that or I'm making some kind of stupid reasoning mistake, in which case I gladly get corrected.

    Any suggestions how to circumvent this situation?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    But in the tutorial you compile a 2.6.18 kernel (
    Code:
    tar xjvf linux-source-2.6.18.tar.bz2
    cd linux-source-2.6.18
    cp /boot/config-2.6.18-3-amd64 .config
    ...
    ).
    I'm not sure why uname still displays the default Debian kernel (2.6.18-3-686).
    What's the output of
    Code:
    ls -la /boot
    ?
     
  9. pjdevries

    pjdevries Member

    I have the slight feeling we have a bit of a communication problem. Let's rewind:

    I first did a plain, bare Debian install, which apparently installs a 2.6.18-3 kernel. Next I installed all the prerequisites with the command
    apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev​
    and tried to patch and compile the kernel using the command
    make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 kernel_image​
    which resulted in the patch failure. So the reason why 'uname -a' still displays the default Debian kernel is that I never got around to installing the the OpenVZ kenel as a result of the failing patch.

    To be honest I don't quite understand what the default 2.6.18-3 kernel has to do with my current problem because the 'apt-get install' command installs 'linux-source-2.6.18.tar.bz2' which seems to be the right one. I was under the assumption that 'apt-get install' command magically installs both the proper kernel sources and a suitable, corresponding OpenVZ patch. But that doesn't seem to be the case.

    In the mean time I also followed the Installation on Debian thread in the HOWTO section of wiki.openvz.org and installed the precompiled kernel image 'linux-image-2.6.18-openvz-686_028test007.1d2-1_i386.deb' which I downloaded from http://download.openvz.org/kernel/debian/etch/. This seems to work as expected but it doesn't really solve the actual problem though.

    As of today I also see 'linux-image-2.6.18-openvz-686' when I run 'apt-cache search openvz', which I'm (almost) sure wasn't there before. My questions now are:
    1. Is that the same image as the one I downloaded from openvz.org?
    2. Should I install that image or can I safely use the one I downloaded from openvz.org?
    3. Is it better to compile my own kernel, using kernel sources and OpenVZ patch from the Debian repository, or to install a compiled image from either the Debian or the OpenVZ repository? Or doesn't it make any difference?

    By the way, ls -l /boot displays:
    Code:
    -rw-r--r-- 1 root root   71331 2006-12-04 16:52 config-2.6.18-3-686
    -rw-r--r-- 1 root root   71017 2007-02-03 15:45 config-2.6.18-openvz-686
    drwxr-xr-x 2 root root    4096 2007-02-16 20:52 grub
    -rw-r--r-- 1 root root 4490228 2007-02-15 14:48 initrd.img-2.6.18-3-686
    -rw-r--r-- 1 root root 4487429 2007-02-16 20:51 initrd.img-2.6.18-openvz-686
    -rw-r--r-- 1 root root      41 2007-02-03 18:10 patches-2.6.18-openvz-686
    -rw-r--r-- 1 root root  720074 2006-12-04 23:24 System.map-2.6.18-3-686
    -rw-r--r-- 1 root root  752899 2007-02-03 18:10 System.map-2.6.18-openvz-686
    -rw-r--r-- 1 root root 1259920 2006-12-04 23:24 vmlinuz-2.6.18-3-686
    -rw-r--r-- 1 root root 1267097 2007-02-03 18:10 vmlinuz-2.6.18-openvz-686
    But remember that I installed that precompiled kernel image from openvz.org which wasn't there with in my previous post.
     
  10. pjdevries

    pjdevries Member

    Just found out that I made a stupid mistake. The linux-image that shows up when running 'apt-cache search openvz' is in fact the one I downloaded from openvz.org. Appolgies for the confusion.
     
  11. pjdevries

    pjdevries Member

    Any news? I'm still hoping for a solution for the problem, because from the viewpoint of maintainability, I prefer to install from the Debian repository.
     
  12. falko

    falko Super Moderator ISPConfig Developer

    Oh, I thought the problem was solved.
    No, I have no idea how to fix the problem. :(
     
  13. pjdevries

    pjdevries Member

    Problem disappeared!

    I had a few other things on my mind and let it rest for a couple of days. Today I did an aptitude upgrade and tried it from scratch. Guess what? The problem has magically disappeared.

    Good things happen to the ones who wait indefinitly:)

    Thanks for the help Till & Falko!
     

Share This Page