1

I had installed an Ubuntu 16.04 on my VM VirtualBox (itself on a Windows 10). And I had been working as the owner of the program rather than guest. It was working all fine until now.

I believe I have removed an important package but don't know exactly what and I can figure that out once logged in. However, after you wait long enough for the program to starts up, the logging page appears and I enter my password correctly but it says, "Faild to start session." I have googled and I have reached the following related posts (even though not exactly on a VirtualBox):

Failed to start session after upgrade to 14.04

Fix “Failed To Start Session” At Login In Ubuntu 14.04

failed-to-start-session-after-interrupted-upgrade-to-14-04

My screen looks exactly the same as the ones shown in the second source above except that it is inside a Virtual Environment. I know that I must bring up the command line interface as Ubuntu starts up (e.g. Ctrl+Alt+F1 doesn't do the job for me on VB). Once I am there, I can continue with those recommendation. But to begin with, how to stop the restart process and log into the system directly from the interface when that all takes place on VirtualBox?

PS: pressing F12 during reboot brings up the window in which you see some options like "Ubuntu", "Advanced Ubuntu", etc... but I don't know how to make use of it. I thought maybe this would help people to answer the question accordingly.

Rebel
  • 113

1 Answers1

0

Depending on how much the Ubuntu system was broken in your virtual machine you may still be able to start a terminal session in a TTY. This can be reached by pressing Host+F1. If that fails we may still be able to boot into a root shell.

From there we can inspect our virtual Ubuntu and check data integrity. We may even be able to revert those changes that broke our virtual machine. If we had installed or removed packages we may e.g. search the apt history for recent actions.

We may however not be able to find the root cause of a broken system that easily. Therefore a clean re-installation will be a much faster way to retrieve a running system.

As it is a virtual machine we may just intall Ubuntu to another virtual drive an then attach and mount the old drive to this new virtual machine. We then can just copy our data over.

enter image description here
Two virtual drives attached to a VM

Of course we could also re-install Ubuntu without formatting the drive and without deleting data in the HOME directory (chose "upgrade" option from the installer) but above procedure may be safer.

Takkat
  • 144,580