How to install Ubuntu on computer with UEFI

  • Unified Extensible Firmware Interface (UEFI) is a modern replacement over the BIOS for booting up operating systems. In most BIOS settings, you can choose whether you want UEFI enabled or disabled.

  • Ubuntu works best with BIOS, not UEFI. So, if you are only installing Ubuntu on a computer or you have Windows 7 or older on it then you can disable UEFI in the BIOS settings and proceed to install Ubuntu with a / partition and a swap partition.

  • However, if you already have Windows 8 or 10 installed on the computer, it will be using UEFI to boot and so UEFI cannot be disabled. Also, if you intend to install and dual boot with Windows in the future, it may be a good idea to keep UEFI enabled.

  • If you already have Windows 8 or 10 installed then you will notice an extra 100MB partition named EFI while installing Ubuntu. Do not touch it and proceed with creating a / and swap partition. Ubuntu will automatically install GRUB to use that EFI partition for booting.

  • If you do not have Windows, but want to keep UEFI enabled, then you will need to create a 100-200MB partition and pick its type as boot EFI while installing Ubuntu. The rest of the partitions for Ubuntu are the same. Just remember to create an EFI partition.

  • If you forgot to create an EFI partition on a UEFI enabled computer and installed Ubuntu, then the installer will fail at the end with this error:

The `grub-efi-amd64-signed` package failed to install into / target/.
Without the GRUB boot loader, the installed system will not boot.

Tried with: Ubuntu 16.04

Advertisements

How to make Intel Wireless-AC 3165 work in Ubuntu

Problem

I installed Ubuntu 16.04 on a new notebook that had Intel Wireless-AC 3165 hardware to provide wifi and Bluetooth connectivity. This hardware was working without any problems in Windows 10, without requiring any extra software installation. However, the wireless and Bluetooth features did not work in Ubuntu.

Solution

There are many solutions offered on the web to enable wireless connectivity. Copying the ucode files provided by Intel here to /lib/firmware definitely did not work.

I was using Ubuntu 16.04, which was using the Linux 4.4.x kernel. One of the suggestions online is that newer kernels have better support for Intel wireless hardware.

Ubuntu provides newer versions of Linux kernel and X in updated HWE stacks. I installed the latest available HWE stack for Ubuntu 16.04, as described here. This installed a 4.8.x kernel and my wireless and Bluetooth worked like magic without requiring any configuration after a reboot.

I have also tried to manually install a newer Linux kernel. Ubuntu developers provide installers of all newer Linux kernels. So I decided to try my luck with the latest 4.9.x series and installed it as described here. This also enabled me to use this Intel wireless adapter without any problem!

How to update Linux kernel in Ubuntu

Every version of Ubuntu LTS sticks to a particular version of the Linux kernel. For example, Ubuntu 16.04 sticks to the 4.4.x series of kernels. Over the months and years you use and update this version of Ubuntu, only newer minor versions of the kernel are updated to maintain stability.

However, there might be reasons you might want to upgrade to a major new Linux kernel version. For example, to get support for newer hardware and firmware. The first option you can try is to install the latest HWE stack for your LTS release, as described here. That should upgrade your Linux kernel and X to recent versions.

If a HWE stack is not available or the versions it provides is not recent enough for you, then Ubuntu developers maintain a series of the Linux mainline kernel which can be downloaded and installed.

  • Go to http://kernel.ubuntu.com/~kernel-ppa/mainline/ and decide which version of kernel you want. For example, I decided to upgrade from 4.4.x to 4.9.x.

  • You need to download 3 deb files for a full kernel installation. These will be named in this format: linux-headers-XXX_amd64.deb, linux-headers-XXX_all.deb and linux-image-XXX-generic_XXX_amd64.deb.

  • Install them:

$ sudo dpkg -i *.deb
  • Restart the computer and check if you are using the new kernel:
$ uname -r
  • Do not delete the kernel provided by Ubuntu even if apt keeps reminding you that you do not need it! If something goes wrong with the new kernel, you might want to keep the older one, so you can boot using that in the GRUB boot screen.

Blank display on installing Kubuntu

Problem

I had a computer with Ubuntu 16.04 running the Unity desktop. I wanted to switch to Kubuntu, so I installed it using this command:

$ sudo apt install kubuntu-desktop

Everything installed fine, except this error at the end:

kde-telepathy-minimal : Depends: kde-config-telepathy-accounts (>= 0.9.0) but it is not installed

After this, there is an error about kaccounts-provider whenever I login into Unity. If I try to login into the KDE desktop, I get a blank display!

Solution

This error seems to be hitting lots of people as seen here. This seems to be caused by a conflict between packages required by Unity and KDE. Apparently, Unity (Ubuntu) and KDE (Kubuntu) cannot be installed on the same computer!

Following some clues given by other users, I forcefully removed Telepathy since I did not need it anyway:

$ sudo dpkg --remove kde-telepathy
$ sudo apt update
$ sudo apt dist-upgrade

After this the Unity error on login and the black display in KDE went away. I was able to switch to using KDE as my primary desktop.

So, if you intend to use Kubuntu, you are better off installing a Kubuntu ISO directly instead of installing it from inside Ubuntu.

How to upgrade to new version of Ubuntu

When a new version of Ubuntu rolls out, you might want to upgrade your older Ubuntu to that version. There are many ways to do this.

Upgrade

If your current Ubuntu is not too old, then Ubuntu might support an upgrade to the latest version. There are two types of upgrade possible: to any latest version or to only the latest long-term support (LTS) version.

  • To do this, open Software Updater or run update-manager at the shell. In the dialog, enable Updates → Notify me of a new Ubuntu version.

  • It will check the Ubuntu repositories and if your Ubuntu can be upgraded you will be notified in a while.

  • Note that this upgrade will take a long time, it took 6 hours on my system. It will try to upgrade all your applications and libraries and finally the OS. So, if you want to speed up the process, just remove all applications and libraries that you can beforehand. You can reinstall them after the upgrade.

Fresh install

An upgrade actually takes a very long time to finish. Since Ubuntu installs in as little as 15 minutes on current computers, I do not think an upgrade is always worth the time. Instead make sure that your / and /home are on different partitions. In such a setup, you can just do a fresh install of the new Ubuntu version by wiping out the / partition and by requesting it to use the existing /home partition. This is one of the useful features of Linux installations and I highly recommend keeping these partitions separate for this reason on all computers.

How to create Windows installer USB stick using WinUSB

A USB thumb drive with Windows ISO on it can be used to install Windows newly or repair an existing installation of Windows. Such a bootable USB stick can be created easily on Ubuntu:

  • Prepare the ISO of the version of Windows you want to install or use. For example, the Windows 10 ISO can be obtained here. If you are upgrading from a Windows 7 or 8, you can find out which version you are allowed to upgrade to here (check the Upgrade Editions section).

  • Note that common tools like Startup Disk Creator or UNetBootIn can only create installer USB sticks for Linux operating systems. They cannot be used for installing Windows.

  • An easy tool to create an installer USB thumb drive for booting Windows is WinUSB. It can be installed from a PPA:

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update  
$ sudo apt-get install winusb
  • Plug in your USB stick and use this command to make it a Windows installer:
$ sudo winusb --format /path/to/windows.iso /dev/sdc

Use the path to your ISO file and the device name of your USB drive instead of /dev/sdc in the above command.

You should be able to boot up and install Windows using this USB stick.

Tried with: Ubuntu 16.04

How to update Ubuntu LTS Enablement Stack

Ubuntu LTS releases, like 14.04 are supported for many years. However, the kernel and X server that ship with them are only updated for minor changes or revisions during this period. Every six months Ubuntu puts out a new point release for its recent LTS, like 14.04.2. This has the kernel and X server from the most recent Ubuntu non-LTS release.

The Ubuntu LTS Enablement Stack provides these updated Linux kernels and X server releases for users running older LTS releases. For computers with NVIDIA graphics cards, I have found that switching to newer kernel and X server has always improved the driver errors I face.

The LTS Enablement Stack webpage has the charts of what kernel and X server versions are available for your LTS release. You can also find the command to update your LTS from there.

For example, I updated my 14.04 system using this command:

$ sudo apt-get install --install-recommends linux-generic-lts-vivid xserver-xorg-core-lts-vivid xserver-xorg-lts-vivid xserver-xorg-video-all-lts-vivid xserver-xorg-input-all-lts-vivid libwayland-egl1-mesa-lts-vivid

My kernel was updated from 3.13 to 3.19 after this. Remember to reboot after this command! 😄

Tried with: Ubuntu 14.04

How to make startup disk from ISO using Startup Disk Creator

You need a startup disk or USB flash drive loaded with Ubuntu to install it on a new computer. Ubuntu can be downloaded as an ISO file. The Startup Disk Creator tool can be used to create such a startup disk from a ISO file.

Install

Startup Disk Creator will be present on a Ubuntu computer. If by chance you do not have it, it can be installed easily:

$ sudo apt install usb-creator-gtk

Use

  1. Download the Ubuntu (or any other) ISO file you need to make a startup disk from.

  2. Insert the USB stick or drive that you want to use as the startup disk. Note that it needs to be in FAT or FAT32 format! (Otherwise Startup Disk Creator will not show this drive.)

  3. Start the Startup Disk Creator from the Dash or usb-creator-gtk from the shell.

  4. Choose the source disk image (the downloaded ISO file) and the disk to use and click Make Startup Disk.

Once it is done, you can use this USB flash drive to install Ubuntu on other computers by booting from this drive! 😃

Note: An alternative to Startup Disk Creator is UNetBootIn, which can be used as described here. I have faced problems using it for making startup USB flash drives of Ubuntu 14.10.

Tried with: Startup Disk Creator 0.2.56 and Ubuntu 14.04

The disappearing clock in the Panel

Problem

I restarted Ubuntu. After the restart and logging in I discover that the Clock in the Panel is missing! I check and see that the package indicator-datetime is still installed. I open System Settings and go to Time and Date and see that everything in the Clock tab is disabled, so I cannot change it.

Solution

This is a bug in Unity as described here. It is supposedly happening due to a configuration value being reset after packages are upgraded.

Anyway, the only solution that works right now is to kill and restart the Panel service:

$ killall unity-panel-service

This worked for me and my clock was back in the Panel! 🙂

Tried with: Ubuntu 14.04