While it's good to stay up to date on your host PC's operating system, the act of performing these updates does not come without risk (particularly for us Linux users). Personally, I've noticed that it seems to be the drivers specific to the Desktop GUI interface of a Linux distribution that seem to be the most vulnerable to getting messed up while running updates.
For those of you not familiar with my setup, I personally like to run Linux in virtual machines (VMs) using Parallels on my Intel-base MacBook Pro. I found that the ability to simply delete a VM and reinstall it no matter how badly I screwed up the Linux image inside of it removed my own metal barrier of being too afraid to try anything in Linux to really learn it.... because the only way to learn Linux is through trial and error!
While I don't claim to be a Linux guru by any means, based on my search results of forums, I found that this particular issue was worth a write-up.
Troubleshoot the CauseIf you're unfamiliar with Parallels on Mac, there is a tool set called Parallels Tools that supports communication between the host OS and the guest OS such as a shared clipboard and shared directories. Periodically, an update is release for Parallels tools that pops up as a prompt when you boot into the guest Linux OS.
Every time Parallels Tools updates, a reboot is required (which makes sense given these are changes affecting the hypervisor). Unfortunately, when my Ubuntu 18.04 VM attempted to reboot this time it hung in a black screen and just started printing what it's attempting to do.
In my panic, I forgot to grab a screenshot but I found the screenshot below on Reddit that was almost the exact same terminal output I had - specifically where it hung at the starting of Gnome Display Manager.
Now I could tell that the root filesystem had clearly mounted without issue and was running which was a relief since it meant the root filesystem itself was probably OK and I didn't have a corrupt disk.
But something was hanging with the launch of the actual Desktop GUI of Ubuntu. This is an easy enough theory to test by seeing if I can simply drop into the text terminal without messing with trying to boot into recovery mode.
Drop into Text TerminalTo test my theory that the root filesystem was actually up and running without issue, I used the following keyboard shortcut to drop into the text terminal from the terminal printout as shown above:
Control
+Alt/Option
+F2
Thankfully, my theory was correct and I was given a terminal prompt to log into my user. I now had access to the guest Linux OS via a terminal.
Fix Broken Driver(s)Since the update of Parallels Tools seems to be correlated with the hanging of the Gnome Desktop in the boot process, the first thing to try is to uninstall/remove it and reboot Ubuntu to see if the Desktop is then able to boot as expected.
While I'm sure there is a way to manually remove the Parallels Tools using a package manager command like dpkg
, the easiest way is to mount the image file Parallels provides and run the configuration GUI for it. Given that it's a typical ASCII GUI, I had hope that whatever broken driver that was blocking Gnome won't block the configuration GUI from launching. Mount the Parallels Tools image to the VM by selecting Devices > CD/DVD 2 > prl-tools-lin.iso
Note: The image file for an x86 Linux VM is prl-tools-lin.iso and the image file for an ARM Linux VM is prl-tools-arm.iso.
Create mount point directory in /media if it doesn't already exist:
~$ sudo mkdir -p /media/cdrom
Mount the CD Rom device to the mount point directory in /media
:
~$ sudo mount -o exec /dev/cdrom /media/cdrom
If the Parallels Tools image does not mount automatically in /media/cdrom
, manually mount it (I'm not sure what causes it to not mount automatically at times).
~$ sudo mount /media/cdrom/prl-tools-lin.iso /media/cdrom/
Don't worry if the above command gives an output about mounting as read-only.
Change directories into the mounted Parallels Tools directory and launch the installer GUI with root privileges:
~$ cd /media/cdrom/
/media/cdrom$ sudo ./install
Once the GUI appears for the Parallels Tools installer, follow the prompts and select the option to remove it. A prompt to reboot the machine will then appear:
This is where I put my theory to the test that the Parallels Tools drivers were the culprit in causing the Gnome drivers to hang in the boot process of the Ubuntu desktop.
Luckily, I was right! Ubuntu Desktop booted right up with no delays or hangs.
At this point, I did take a risk by manually reinstalling the Parallels Tools because there are some features with them that I've come to rely on (ie - shared clipboard between the host Mac OS and Linux OS in the VM, and the ability to route my home directory in Linux to my iCloud account for constant backup of my design source files). Because one of two things happened originally: some hiccup happened during the installation of the update causing the broken drivers, or the Parallels Tools update is not compatible with Ubuntu 18.04.
If the latter had been true, then I would had to have just to removed the Parallels Tools again in the same manner I just did and live without them in my Ubuntu 18.04 from here on out. Luckily the former was the case and the re-installation of Parallels Tools was just fine (which I did by launching that configuration GUI from a terminal in the Desktop and followed the prompts to install instead of remove).
Hopefully, this is helpful to a poor soul similar to myself. While the Parallels Tools driver is specific to using a VM with Parallels, the overall process of evaluating where the boot is hanging and utilizing the text terminal is relevant to any Linux OS regardless of whether it's running as a VM or natively.
Comments