crash - Ubuntu Server 13.10: How to downgrade kernel

05
2014-04
  • Orlo

    Ubuntu Server 13.10 appears to be very unstable, I got random crashes of the system with no apparent reason and nothing is showing in syslog.

    This is screenshot from the console when the crash occurred http://i.stack.imgur.com/HYLLk.png

    Anyway I think it's actually caused by the new kernel 3.11. I would like to downgrade to 3.4 to check it. Is it possible?

    sudo aptitude search linux-image indicates that only versions available I've is 3.11 kernel:

    p   linux-image                                                     - Generic Linux kernel image.                                               
    p   linux-image:i386                                                - Generic Linux kernel image.                                               
    v   linux-image-3.0                                                 -                                                                           
    v   linux-image-3.0:i386                                            -                                                                           
    p   linux-image-3.11.0-11-lowlatency                                - Linux kernel image for version 3.11.0 on x86/x86_64                       
    p   linux-image-3.11.0-11-lowlatency:i386                           - Linux kernel image for version 3.11.0 on x86/x86_64                       
    i A linux-image-3.11.0-12-generic                                   - Linux kernel image for version 3.11.0 on 64 bit x86 SMP                   
    p   linux-image-3.11.0-12-generic:i386                              - Linux kernel image for version 3.11.0 on 32 bit x86 SMP                   
    p   linux-image-3.11.0-13-generic                                   - Linux kernel image for version 3.11.0 on 64 bit x86 SMP                   
    p   linux-image-3.11.0-13-generic:i386                              - Linux kernel image for version 3.11.0 on 32 bit x86 SMP                   
    p   linux-image-3.11.0-13-lowlatency                                - Linux kernel image for version 3.11.0 on x86/x86_64                       
    p   linux-image-3.11.0-13-lowlatency:i386                           - Linux kernel image for version 3.11.0 on x86/x86_64                       
    p   linux-image-3.11.0-14-generic                                   - Linux kernel image for version 3.11.0 on 64 bit x86 SMP                   
    p   linux-image-3.11.0-14-generic:i386                              - Linux kernel image for version 3.11.0 on 32 bit x86 SMP                   
    p   linux-image-3.11.0-14-lowlatency                                - Linux kernel image for version 3.11.0 on x86/x86_64                       
    p   linux-image-3.11.0-14-lowlatency:i386                           - Linux kernel image for version 3.11.0 on x86/x86_64                       
    p   linux-image-3.11.0-15-generic                                   - Linux kernel image for version 3.11.0 on 64 bit x86 SMP                   
    p   linux-image-3.11.0-15-generic:i386                              - Linux kernel image for version 3.11.0 on 32 bit x86 SMP                   
    p   linux-image-3.11.0-15-lowlatency                                - Linux kernel image for version 3.11.0 on x86/x86_64                       
    p   linux-image-3.11.0-15-lowlatency:i386                           - Linux kernel image for version 3.11.0 on x86/x86_64                       
    p   linux-image-3.4.0-1-goldfish:i386                               - Linux kernel image for version 3.4.0 on Android touch emulation           
    i A linux-image-extra-3.11.0-12-generic                             - Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP           
    p   linux-image-extra-3.11.0-12-generic:i386                        - Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP           
    p   linux-image-extra-3.11.0-13-generic                             - Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP           
    p   linux-image-extra-3.11.0-13-generic:i386                        - Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP           
    p   linux-image-extra-3.11.0-14-generic                             - Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP           
    p   linux-image-extra-3.11.0-14-generic:i386                        - Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP           
    p   linux-image-extra-3.11.0-15-generic                             - Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP           
    p   linux-image-extra-3.11.0-15-generic:i386                        - Linux kernel extra modules for version 3.11.0 on 32 bit x86 SMP           
    p   linux-image-extra-virtual                                       - Transitional package.                                                     
    p   linux-image-extra-virtual:i386                                  - Transitional package.                                                     
    i A linux-image-generic                                             - Generic Linux kernel image                                                
    p   linux-image-generic:i386                                        - Generic Linux kernel image                                                
    p   linux-image-generic-pae:i386                                    - Transitional package                                                      
    p   linux-image-goldfish:i386                                       - Linux kernel image for the goldfish kernel.                               
    p   linux-image-lowlatency                                          - lowlatency Linux kernel image                                             
    p   linux-image-lowlatency:i386                                     - lowlatency Linux kernel image                                             
    p   linux-image-lowlatency-pae:i386                                 - Transitional package                                                      
    p   linux-image-server                                              - Transitional package.                                                     
    p   linux-image-server:i386                                         - Transitional package.                                                     
    p   linux-image-virtual                                             - This package will always depend on the latest minimal generic kernel image
    p   linux-image-virtual:i386                                        - This package will always depend on the latest minimal generic kernel image
    

    apt-cache search linux-image

    alsa-base - ALSA driver configuration files
    linux-image - Generic Linux kernel image.
    linux-image-3.11.0-12-generic - Linux kernel image for version 3.11.0 on 64 bit x86 SMP
    linux-image-extra-3.11.0-12-generic - Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
    linux-image-extra-virtual - Transitional package.
    linux-image-generic - Generic Linux kernel image
    linux-image-server - Transitional package.
    linux-image-virtual - This package will always depend on the latest minimal generic kernel image.
    linux-virtual - Minimal Generic Linux kernel and headers
    linux-image-generic-pae - Transitional package
    linux-image-3.11.0-11-lowlatency - Linux kernel image for version 3.11.0 on x86/x86_64
    linux-image-lowlatency - lowlatency Linux kernel image
    linux-image-3.4.0-1-goldfish - Linux kernel image for version 3.4.0 on Android touch emulation
    linux-image-goldfish - Linux kernel image for the goldfish kernel.
    linux-image-lowlatency-pae - Transitional package
    linux-image-3.11.0-13-generic - Linux kernel image for version 3.11.0 on 64 bit x86 SMP
    linux-image-3.11.0-14-generic - Linux kernel image for version 3.11.0 on 64 bit x86 SMP
    linux-image-3.11.0-15-generic - Linux kernel image for version 3.11.0 on 64 bit x86 SMP
    linux-image-extra-3.11.0-13-generic - Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
    linux-image-extra-3.11.0-14-generic - Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
    linux-image-extra-3.11.0-15-generic - Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
    linux-image-3.11.0-13-lowlatency - Linux kernel image for version 3.11.0 on x86/x86_64
    linux-image-3.11.0-14-lowlatency - Linux kernel image for version 3.11.0 on x86/x86_64
    linux-image-3.11.0-15-lowlatency - Linux kernel image for version 3.11.0 on x86/x86_64
    

    dpkg -l | grep linux

    ii  libselinux1:amd64                   2.1.13-2                            amd64        SELinux runtime shared libraries
    ii  libv4l-0:amd64                      0.8.9-4                             amd64        Collection of video4linux support libraries
    ii  libv4lconvert0:amd64                0.8.9-4                             amd64        Video4linux frame format conversion library
    ii  linux-firmware                      1.116                               all          Firmware for Linux kernel drivers
    ii  linux-generic                       3.11.0.12.13                        amd64        Complete Generic Linux kernel and headers
    ii  linux-headers-3.11.0-12             3.11.0-12.19                        all          Header files related to Linux kernel version 3.11.0
    ii  linux-headers-3.11.0-12-generic     3.11.0-12.19                        amd64        Linux kernel headers for version 3.11.0 on 64 bit x86 SMP
    ii  linux-headers-generic               3.11.0.12.13                        amd64        Generic Linux kernel headers
    ii  linux-image-3.11.0-12-generic       3.11.0-12.19                        amd64        Linux kernel image for version 3.11.0 on 64 bit x86 SMP
    ii  linux-image-extra-3.11.0-12-generic 3.11.0-12.19                        amd64        Linux kernel extra modules for version 3.11.0 on 64 bit x86 SMP
    ii  linux-image-generic                 3.11.0.12.13                        amd64        Generic Linux kernel image
    ii  linux-libc-dev:amd64                3.11.0-15.23                        amd64        Linux Kernel Headers for development
    ii  util-linux                          2.20.1-5.1ubuntu9                   amd64        Miscellaneous system utilities
    

    UPDATE

    tried to install the kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/

    but ubuntu hangs at " Loading Initial Ramdisk"

    UPDATE 2

    looks like my system crashes are related to this bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=734172 apparently fixed in 3.12.6, but again ubuntu hangs at " Loading Initial Ramdisk"

  • Answers
  • Garrett

    You probably need to downgrade your version of Ubuntu, as those kernels are what's available in 13.10. Try this guide.

    Otherwise, you could try grabbing an older kernel version from a stable LTS version: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/

    Ubuntu kernel information: https://wiki.ubuntu.com/Kernel/MainlineBuilds

  • Unix

    Take a look here: http://askubuntu.com/questions/49869/how-to-roll-back-ubuntu-to-a-previous-version

    could find some usefull information here.


  • Related Question

    linux - Where is vmlinux on my Ubuntu installation?
  • Jason Baker

    I'm trying to work with starting up oprofile, and I'm running into a problem at this step:

    opcontrol --vmlinux=/path/to/vmlinux
    

    Ubuntu has no package called vmlinux, and when I do a locate vmlinux, I get a lot of files:

    /usr/src/linux-headers-2.6.28-14/arch/h8300/boot/compressed/vmlinux.lds
    /usr/src/linux-headers-2.6.28-14/arch/m68k/kernel/vmlinux-std.lds
    /usr/src/linux-headers-2.6.28-14/arch/m68k/kernel/vmlinux-sun3.lds
    /usr/src/linux-headers-2.6.28-14/arch/mn10300/boot/compressed/vmlinux.lds
    /usr/src/linux-headers-2.6.28-14/arch/sh/boot/compressed/vmlinux_64.lds
    /usr/src/linux-headers-2.6.28-14/arch/x86/boot/compressed/vmlinux_32.lds
    /usr/src/linux-headers-2.6.28-14/arch/x86/boot/compressed/vmlinux_64.lds
    /usr/src/linux-headers-2.6.28-14/include/asm-generic/vmlinux.lds.h
    /usr/src/linux-headers-2.6.28-15/arch/h8300/boot/compressed/vmlinux.lds
    /usr/src/linux-headers-2.6.28-15/arch/m68k/kernel/vmlinux-std.lds
    /usr/src/linux-headers-2.6.28-15/arch/m68k/kernel/vmlinux-sun3.lds
    /usr/src/linux-headers-2.6.28-15/arch/mn10300/boot/compressed/vmlinux.lds
    /usr/src/linux-headers-2.6.28-15/arch/sh/boot/compressed/vmlinux_64.lds
    /usr/src/linux-headers-2.6.28-15/arch/x86/boot/compressed/vmlinux_32.lds
    /usr/src/linux-headers-2.6.28-15/arch/x86/boot/compressed/vmlinux_64.lds
    /usr/src/linux-headers-2.6.28-15/include/asm-generic/vmlinux.lds.h
    /usr/src/linux-headers-2.6.28-16/arch/h8300/boot/compressed/vmlinux.lds
    /usr/src/linux-headers-2.6.28-16/arch/m68k/kernel/vmlinux-std.lds
    /usr/src/linux-headers-2.6.28-16/arch/m68k/kernel/vmlinux-sun3.lds
    /usr/src/linux-headers-2.6.28-16/arch/mn10300/boot/compressed/vmlinux.lds
    /usr/src/linux-headers-2.6.28-16/arch/sh/boot/compressed/vmlinux_64.lds
    /usr/src/linux-headers-2.6.28-16/arch/x86/boot/compressed/vmlinux_32.lds
    /usr/src/linux-headers-2.6.28-16/arch/x86/boot/compressed/vmlinux_64.lds
    /usr/src/linux-headers-2.6.28-16/include/asm-generic/vmlinux.lds.h
    

    Which one of these is the one I'm looking for?


  • Related Answers
  • random

    It should be in your /boot directory - mu Ubuntu actually has compressed versions along the lines of vmlinuz-2.6.28-16-generic.

    Whether oprofile can work with those is not a question I can answer.

  • SaveTheRbtz

    The easiest(and non-hacky) way to obtain vmlinux under Ubuntu is to add ddebs repository:

    echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse
    deb http://ddebs.ubuntu.com $(lsb_release -cs)-security main restricted universe multiverse
    deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | \
    sudo tee -a /etc/apt/sources.list.d/ddebs.list
    
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 428D7C01
    

    and install kernel debug symbols:

    sudo apt-get update
    sudo apt-get install linux-image-$(uname -r)-dbgsym
    

    vmlinux then can be found here:

    /usr/lib/debug/boot/vmlinux-$(uname -r)
    
  • sdaau

    Hm, just wanted to put this as a comment to the above answer by @paxdiablo, but cannot find the comment button? Anyways..

    The thing is that the vmlinuz file is compressed - and for debugging purposes, you need an uncompressed vmlinux one (and preferably one built with debugging symbols - which the default vmlinuz-es coming with Ubuntu do not have, as they are stripped of symbols).

    Now, it is possible to unpack a vmlinuz into a vmlinux file - however, that is not trivial; first you have to find a byte offset in vmlinuz where the compressed file starts, and then use dd and zcat to unpack only the necessary part. In detail, this is explained in: "[ubuntu] How to trace this bug? - Ubuntu Forums - post #4"; in brief, below is my example terminal command log, based on that post:

    $ od -A d -t x1 /boot/vmlinuz-$(uname -r) | grep '1f 8b 08 00' --colour
    0013920 f3 a5 fc 5e 8d 83 70 23 3d 00 ff e0 *1f 8b 08 00*
    
    $ wcalc 13920+12
     = 13932
    
    $ dd if=/boot/vmlinuz-$(uname -r) bs=1 skip=13932 | zcat > vmlinux-$(uname -r)
    4022132+0 records in
    4022132+0 records out
    4022132 bytes (4,0 MB) copied, 42,1695 s, 95,4 kB/s
    
    gzip: stdin: decompression OK, trailing garbage ignored
    
    
    $ file vmlinux-2.6.32-25-generic 
    vmlinux-2.6.32-25-generic: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
    

    Well, hope this helps,

    Cheers!

  • deostroll

    it should be in your root ( / ). In ubuntu 8.10 it is a link pointing to /boot/vmlinuz-2.6.28-16-generic

    do an

    ls / -l | grep '^l'
    

    you should find it

    PS: not sure of the exact path name.