My Debian based VM won't boot after running apt-get upgrade.
All OnApp versions
Debian/Ubuntu virtual machines
When running an apt-get upgrade on a Debian based VM the /boot/grub/menu.lst file is modified, sometimes this can point to a kernel is not recognized or able to boot.
Boot the VM in recovery mode via the OnApp UI
Go the VM console, login as root and the password is recovery.
Once logged in run:
Find the disk for the VM for example ( /dev/sdb1 20GB )
Once you have found the disk we can now mount it.
mount /dev/sdb1 /mnt
Once the disk is mounted successfully you can then go in and edit the bootloader file.
The file should have something like the following at the top of the file:
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
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
Then delete every line in the automagic kernel list section starting with the line
###BEGIN AUTOMAGIC KERNELS LIST
and ending with
### END DEBIAN AUTOMAGIC KERNELS LIST
The automagic kernel list may be what is causing the boot to fail, or you may also need to change the 'default' value to point to the old Kernel.
Now unmount the disk:
Disconnect from console and shutdown the VM from the OnApp UI.
Then boot it up and all going well the VM will boot normally now.