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
  • 10
  • It all ends up in the same place with the same issue. Could you please elaborate more? – Rebel Feb 07 '17 at 17:00
  • After being able to login, I noticed that lots of things are messed up. In particular, I can no longer install the packages I had removed complaining, "https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error/91585" Now, I don't know how to proceed and if there is a way to reinstall Ubuntu without losing my data in it. – Rebel Feb 07 '17 at 20:34

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
  • 142,284
  • I had installed my VB on OS(C:) while a huge .vdi file attached to it is in D drive. Could you please walk me through the processes I need to take? In particular this Data file is very huge and I don't know if I can create a copy of it just next to it because the remaining space on the D drive is not enough. But if I need to sacrifice that data, it's OK because I can reproduce most of in a day as I long as I know I will have a working Ubuntu. – Rebel Feb 07 '17 at 21:56
  • You can also attach and mount the huge VDI to a guest OS installed on a much smaller VDI similar to mounting HOME on another partition. – Takkat Feb 07 '17 at 22:09
  • I had to remove my old .dvi file and then install Ubuntu from scratch as I could not manage to follow successfully what Takkat said even though it does seem to be a good answer. – Rebel Feb 08 '17 at 19:53