Bobcares

OnApp: VM won’t boot after running apt-get upgrade – How to fix

by | Jun 27, 2021

Wondering how to fix “OnApp: VM won’t boot after running apt-get upgrade”? We can help you!

At times Ubuntu users report to us that their VM does not boot after running apt-get upgrade.

Here at Bobcares, we handle requests from our customers to fix similar errors as a part of our Server Management Services.

Today we will see how our Support Engineers fix this for our customers.

How to fix “OnApp: VM won’t boot after running apt-get upgrade”

Before going into the steps for fixing this error we will see what causes this error.

Cause:

While performing an apt-get upgrade on a Debian VM, the /boot/grub/menu.lst file gets modified, and at times this can point to a kernel that is not recognized or able to boot.

Steps to fix the error:

1. First, we need to boot the VM in the recovery mode using the OnApp UI.

2. For this we have to go to the VM console as root.

3. After logging in we can run the following command:

fdisk -l

4. Next we need to find the disk for the VM, for example ( /dev/sdb1 20GB ).

5. Once we find the disk, we can mount it using the following:

mount /dev/sdb1 /mnt

6. After mounting successfully, we can edit the bootloader file with the following step:

vi /mnt/boot/grub/menu.lst

The file will have something like the following at the 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

Towards the end of the file if we find the following lines:

### 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

We must delete the section 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 might be the one that is causing the boot to fail, or we may also need to change the ‘default’ value to point to the old Kernel.

7. Now, we can unmount the disk:

umount /mnt

8. Then disconnect from the console and shut down the VM from the OnApp UI.

9. Finally we can try booting the VM to see if it boots up normally.

[Need assistance? We can help you]

Conclusion

To conclude, we saw the steps that our Support Techs follow to fix this error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.