Issue


My Debian-based virtual server does not boot after running an apt-get upgrade.


Environment


All OnApp versions

Debian/Ubuntu virtual servers


Cause


When running an apt-get upgrade on a Debian-based virtual server, the /boot/grub/menu.lst file is modified. Sometimes this can point to a kernel that is not recognized or not able to boot.


Resolution


  1. Boot the virtual server in recovery mode.
  2. Go to the VS console.
  3. Log in as a root. The password is recovery.
  4. Once logged in, run:

    fdisk -l
    CODE
  5. Find a disk for the virtual server. For example, /dev/sdb1 20 GB.
  6. Mount the disk:

    mount /dev/sdb1 /mnt 
    CODE
  7. Edit the bootloader file:

    vi /mnt/boot/grub/menu.lst
    CODE
  8. The file should should contain as provided below at its top:

    				default 0              
    				timeout 5              
    				title           Debian GNU/Linux, kernel 2.6.32-5-xen-amd64              
    				root            (hd0,0)              
    				kernel          /boot/vmlinuz-2.6.32-5-xen-amd64 root=/dev/xvda1 ro quiet              
    				initrd          /boot/initrd.img-2.6.32-5-xen-amd64              
    				title           Debian GNU/Linux, kernel 2.6.32-5-xen-amd64 (single-user mode)              
    				root            (hd0,0)              
    				kernel          /boot/vmlinuz-2.6.32-5-xen-amd64 root=/dev/xvda1 ro single              
    				initrd          /boot/initrd.img-2.6.32-5-xen-amd64
    CODE

    If the above is followed by:

    ### BEGIN AUTOMAGIC KERNELS LIST 
     ## lines between the AUTOMAGIC KERNELS LIST markers will be modified 
     ## by the debian update-grub script except for the default options below
    CODE

    delete every line in the automagic kernels list section starting with the line:

    ###BEGIN AUTOMAGIC KERNELS LIST
    CODE

    and ending with:

    ### END DEBIAN AUTOMAGIC KERNELS LIST
    CODE
  9. The automagic kernels list may be the reason which causes the boot failure. Otherwise, change the default value to point to the old kernel.
  10. Unmount the disk:

    umount /mnt
    CODE
  11. Disconnect from the console.
  12. Shut down the virtual server.
  13. Boot the server.