May 052019
 
Ubuntu Orange Logo

After upgrading a computer from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS, during boot the screen goes blank (turns black), all HD disk activity halts, and the system becomes frozen. This event can also occur on a fresh installation or when updates are installed.

This is due to a video mode issue that causes the system to halt or freeze. It’s much like the issue I described here on a Fedora Linux system.

Temporary Fix

To get the system to boot:

  1. After turning on your PC, hold the right SHIFT key to get to the GRUB bootloader.
  2. Once GRUB is open, press the “e” key to edit the first highlighted entry “Ubuntu”.
  3. Move your cursor down to the line that starts with “linux”, and use the right arrow key to find the section with the words “ro quiet splash”.
  4. Add “nomodeset” after these words.
    nomodeset
  5. Feel free to remove “quiet” and “splash” for more verbosity to troubleshoot the boot process.
  6. Press “CTRL + X” or “F10” to boot.
  7. The system should now boot.

Permanent Fix

To permanently resolve the issue:

  1. Once the system has booted using the temporary fix, log in.
  2. Open a terminal window (Applications -> Terminal, or press the “Start” button and type terminal).
  3. Either “su” in to root, or use “sudo” to open your favorite text editor and edit the file “/etc/default/grub” (I use nano which can be install by running “dnf install nano”):
    nano /etc/default/grub
  4. Locate the line with the variable “GRUB_CMDLINE_LINUX_DEFAULT”, and add “nomodeset” to the variables. Feel free to remove “splash” and “quiet” if you’d like text boot. Here’s an example of my line after editing (yours will look different):
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
  5. Save the file and exit the text editor (CTRL+X to quit, the press “y” and enter to save).
  6. At the bash prompt, execute the following command to regenerate the grub.conf file on the /boot partition from your new default file:
    update-grub
  7. Restart your system, it should now boot!

Please Note: Always make sure you have a full system backup before modifying any system files!

May 042019
 
Ubuntu Orange Logo

You’re trying to install Ubuntu on your computer, but it freezes due to lack of resources, specifically memory. This can happen when you’re trying to re-purpose old laptops, netbooks, etc.

This recently happened to met as I tried to install Ubuntu on an old HP Netbook. Originally I used Fedora, but had to switch to Ubuntu due to library issues (I wanted to use the VMware Horizon Client on it).

Unfortunately, when I’d kick off the USB installer, the OS would completely freeze (mouse either unresponsive, or extremely glitchy).

The Fix – External SWAP File

In the ~5 minutes where the system is operable, I used the key sequence “CTRL + ALT + F2” to get to a text tty console session. From here I noticed the system eventually uses all the RAM and maxes out the memory. When this occurs, this is when the system becomes unresponsive.

Since this is a Live CD installer, there is no swap file for the system to use once the RAM has filled up.

To fix this and workaround the problem, I grabbed a second blank USB stick and used it as an external swap file. Using this allowed me to run the installer, complete the installer, and successfully install Ubuntu.

Please make sure you are choosing the right device names in the instructions below. Choosing the wrong device name can cause your to write to the wrong USB stick, or worse the hard drive of your system.

Instructions:

  1. Attached USB Installer, boot system.
  2. Once system has booted, press “CTRL + ALT + F2” to open a tty console session.
  3. Login using user: “Ubuntu” with a blank password.
  4. Type “sudo su” to get a root shell.
  5. Type in “tail -f /var/log/kern.log” and connect your spare blank USB stick that you want to use for SWAP space. Note the device name, in my case it was “/dev/sdd”.
  6. Press “CTRL + C” to stop tailing the log file, then run “fdisk /dev/sdd” and replace “/dev/sdd” with whatever your device was. PLEASE MAKE SURE YOU ARE CHOOSING THE RIGHT USB DEVICE NAME.
  7. Use “n” to create a new partition, follow the prompts, when it asks for size I randomly chose “+2G” for a 2GB swap file. Use “w” to write the partition table and then quit the fdisk application.
  8. Run “mkswap /dev/sdd1” and replace “sdd1” with the device and partition number of your USB Swap stick. This will format the partition and mark it as a SWAP filesystem.
  9. Run “swapon /dev/sdd1” and replace “sdd1” with your swap partition you created. This will activate the external swap file on the USB stick.
  10. Press “CTRL + ALT + F1” to return to the Ubuntu installation guide. Continue the install as normal.

This should also work for other Linux distributions, as I have also used this in the past with Fedora (on a Single Board Computer with almost no RAM).

During the install process where the Ubuntu installer formats your hard drive, the install will actually mount the hard drive swap file as well (it’ll use both). Once the installer is complete, shut down the system and remove the USB SWAP stick.

May 032019
 
Ubuntu Enterprise Logo

So here we’re going to talk about Installing the VMware Horizon Agent for Linux on an Ubuntu 18.04 Guest VM for use with VDI. Ultimately you’ll be setting up Horizon 7 for Linux Desktops.

This will allow you to add Linux VMs to your VDI environment.

Ubuntu 18.04 LTS running on VMware Hoirzon Client using Horizon for Linux
Horizon for Linux on Ubuntu 18.04 LTS

VMware has the documentation here, but I’ve condensed this down for your to get up and running quickly, as well as deal with a few bugs I noticed.

Requirements

You’ll need the following to get started

  • VMware Horizon View 7 (I’m, using 7.8)
  • Horizon Enterprise or Horizon for Linux Valid Licensing
  • Horizon VDI environment that’s functioning and working
  • Ubuntu 18.04 LTS Installer ISO (download here)
  • Horizon Agent for Linux (download here)
  • Functioning internal DNS

Once you have the above, we can get going!

Instructions

  1. Create a static DHCP reservation, or note the IP you will set statically to the Ubuntu VM
  2. Create a host entry on your internal DNS Server so that the IP of your Ubuntu VM will have a functioning internal FQDN
  3. Create a VM and Install Ubuntu 18.04 TLS using the ISO you downloaded above
  4. If you’re using a static IP, set this now. If you’re using a DHCP reservation, make sure it’s working
  5. Install any Root CA’s or modifications you need for network access (usually not needed unless you’re on an enterprise network)
  6. Open a terminal, and type “sudo su” to get a root console
  7. Run the following command
    apt install open-vm-tools-desktop openssh-server python python-dbus python-gobject lightdm
    You can skip the “openssh-server” package if you don’t want to enable SSH. A display manager configuration prompt will present itself, choose “gdm”
  8. Now we need to add the internal FQDN to the hosts file. Run “nano /etc/hosts” to open the hosts file. Create a new line at the top and enter
    127.0.0.1 compname.domain.com compname
    Modify “compname.domain.com” and “compname” to reflect your FQDN and computer name.
  9. Restart the Guest VM
  10. Open terminal, “sudo su” to get a root console
  11. Extract the Horizon Agent tarball with
    tar zxvf VMware-horizonagent-linux-x86_64-7.8.0-12610615.tar.gz
    Please note that if your version is different, your file name may be different. Please adjust accordingly.
  12. Change directory in to the VMware Horizon Agent that we just extracted.
  13. Run the installer for the horizon agent with
    ./install_viewagent.sh
  14. Follow the prompts, restart the host
  15. Log on to your View Connection Server
  16. Create a manual pool, and configure it accordingly
  17. Add the Ubuntu Linux VM to the pool
  18. Entitle the users to the pool, and assign the users to the host under inventory

Final Notes

In the VMware documentation, it states to select “lightdm” on the Display MAnager configuration window that presents itself in step 7. However if you choose this, the VMware Horizon Agent for Linux will not install. Choosing “gdm” allows it to install and function.

I have noticed audio issues when using the Spotify snapd. I believe this is caused by timer-based audio scheduling in PulseAudio. I have tried using the “tsched=0” flag in the PulseAudio config, however this has no effect and I haven’t been able to resolve this yet. Audio in Chrome and other audio players works fine. A workaround is to install “pavucontrol” and have it open while using Spotify and the audio issues will temporarily be resolved. I also tried using the VMware Tools (deprecated) instead of OpenVM Tools to see if this helped with the audio issues, but it did not.

If you have 3D Acceleration with a GRID card, the Linux VDI VM will be able to utilize 3D accelerated vSGA as long as you have it configured on the ESXi host.