Installing Ubuntu 16.04

If you've installed Ubuntu in the past, you might notice that, earlier versions up to 12.04, Ubuntu 16.04 (Xenial Xerus) does not fit on one CD. As from 12.10 onwards, developers also improved the installer, which now provides full encryption and Logical Volume Manager (LVM). The step in 13.10 that allowed access to or set up of an UbuntuOne account was removed in 14.04. Other than these updates, not much has changed with the Ubuntu installation process.

You can Install Ubuntu 16.04 on your computer or virtual machine in several ways. Although Ubuntu is geared toward novice Linux users, installing the system is different from a Windows installation. We'll explain your options and walk you through the steps.

Figure 1: Choose Try Ubuntu to run a Live instance on your computer without installing anything.

What's New, Wily?

If you're running Ubuntu 15.10, you can update to version 16.04 directly. However, if you're upgrading from a version of Ubuntu earlier than 15.10, you will have to update in steps to 15.10 first and then to 16.04. If you decide to go with a clean install, try the Live version first to test the programs and get used to the Unity desktop. Then, you can load the distribution via the integrated installer on your computer. Regardless of what you decide, back up all your important files first so nothing gets lost in the process.

Insert Media

The double-sided DVD that comes with this issue provides two versions of Ubuntu: one for 32-bit and another for 64-bit computers. To boot from the DVD, first have your computer recognize it as bootable. Often computers do this automatically; starting the PC with a bootable CD or DVD in the drive invokes the corresponding bootloader. If the computer can't find the DVD, change the boot order via the BIOS.

To get to the BIOS, start up the computer and immediately press Esc , Del , F2 , or F12 , depending on your computer. Then, look for the appropriate option to change the boot order and move the CD/DVD drive to the top of the list. If you're starting Ubuntu from a USB stick, move the USB device to the top of the boot order. In both cases, save the setting and restart the computer.

If your computer is missing a DVD drive, use a USB stick. We will assume that you already have Ubuntu installed. Create the stick by downloading the ISO image for Ubuntu 16.04 for the 32-bit or 64-bit architecture [1] that your installed Ubuntu uses, then load it to the USB stick using the Startup Disk Creator app in Ubuntu (Figure 2). First, delete all previous files on the stick, leaving at least 4GB of free space. At the top of the Make Startup Disk window, select the downloaded ISO image; and, at the bottom, select the USB device to use, then click Make Startup Disk . Booting from the USB stick requires the BIOS setting previously mentioned.

Figure 2: The Startup Disk Creator in Ubuntu 15.10 copies the Ubuntu 16.04 image onto a USB stick with the required free space. Both Ubuntu versions have to be for the same 32-bit or 64-bit architecture.

Fresh Install

To do a new installation, insert the DVD included in this issue into the drive with the label facing up for 64-bit architecture and down for 32-bit architecture, and then turn off the computer. Turn it back on and immediately hold down the Shift key, and you will get to the Ubuntu boot menu. Here, you can make a language selection using the F keys to set language, keymap, and boot parameters.

Press F6 (Other Options ) on the Ubuntu boot menu so that you do not land on the Ubuntu desktop. The window has a Boot Options line at the bottom (Figure 3). Enter the boot options mentioned here instead of the default one quiet splash . The nomodest , radeon.modeset , nvidia.modeset=0 , or nouveau.modeset=0 options help if you have graphics problems and the screen stays black. The acpi=off boot option fixes power management problems on older computers.

Figure 3: If booting doesn't work, adjust the boot option in the Ubuntu boot menu.

Ubuntu on Trial

If you do not want to Install Ubuntu right away, you can Try Ubuntu without installing . In Live mode, Ubuntu copies only the necessary programs into memory and executes them from there. Booting takes noticeably longer than with the installed version, and the system as a whole is a bit slower, but you can test Ubuntu 16.04 with little risk. Also look at the bundled applications to see whether Ubuntu supports your hardware (printers, scanners, wireless, and graphics cards). Ubuntu 16.04 loads only the 3D version of the Unity desktop and uses LLVMpipe for slower machines, creating sluggish responses on some older computers (cause for a recommended desktop replacement).

Installer

The Ubuntu installer opens in a window, as shown in Figure 4. First, choose a language . The next window checks whether your computer meets the installation requirements. The computer must have at least 5.9GB available drive space, plugged in (important for laptop and netbook installations), and, preferably, be connected to the Internet.

Figure 4: The installer provides options, for MP3 support and downloading updates.

In this window, you can set two checkmarks. If you mark Download updates while installing , Ubuntu uses the idle time during installation to download patches and security updates from the Internet but doesn't install them yet.

Marking Install this third-party software loads causes Ubuntu to load a few important codecs and plugins for your system. These codecs and plugins will allow you to play MP3 files on your player and see flash content in your browser. These two options can always be set later, so, for now, Next takes you to the next window.

If a wired network connection exists to the network and Ubuntu recognizes your wireless card, the next window displays the discovered access points. Using the correct password, you can connect to the access point. If no choices are available, you may have a problem with your wireless hardware. For now, use a wired connection instead.

Choices, Choices

A new window then appears that was introduced in Ubuntu 12.10. If Ubuntu doesn't find another operating system installed, it provides the options, as before, to Erase disk and install Ubuntu or to do Something else (Figure 5).

Figure 5: Choose to erase the entire disk for the Ubuntu install or make a different selection.

Version 12.10, added two additional options: Encrypt the new Ubuntu installation for security and Use LVM with the new Ubuntu installation . If you encrypt Ubuntu, the performance is a bit less than optimal, although encryption secures data against theft. Note that you can always encrypt your home directory later.

If you have another resident operating system, such as Windows 8, the option Install Ubuntu alongside Windows 8 appears on the screen, which you can invoke using Continue . In this case, the options for encryption and LVM are grayed out and not available. If you have an older Ubuntu version, additional options appear in the installer window.

Ubuntu Flying Solo

Installing Ubuntu by itself takes up the entire hard disk and writes all files into the /dev/sda1 primary partition. Also, the Ubuntu install creates the break /dev/sda2 extended partition and, within it, the /dev/sda5 logical partition that houses the swap area (see the "Hard Drives in Ubuntu" box). The swap area includes the swap file that takes over when working memory is overloaded, although writing to the swap area is noticeably slower than direct access to main memory.

Hard Drives in Ubuntu

Ubuntu names device files on hard drives according to a particular schema: /dev/sda is the first detected hard drive, with /dev/sda1 its primary partition (/dev/sda2 through /dev/sda4 are the three other primary partitions). The /dev/sda5 device is the first logical partition located in the (/dev/sda2 extended partition. Windows should always be located in the first primary partition (/dev/sda1 ), and generally also in /dev/sda2 . If you plug a USB stick or external hard drive in the USB slot, these external storage devices are listed as /dev/sdb , with everything else following the same schema. Using the sudo fdisk -l command, you can get an overview of the available hard disk and USB memory, as well as the available partitions and filesystems.

Ubuntu Neighbors

Windows often takes up the entire hard drive. If you want to install Ubuntu alongside Windows, you must shrink the Windows partition and completely defrag it, as described in the "Windows and Ubuntu" box. Ubuntu 16.04 then invokes the GRUB 2 bootloader, which boots both systems and can handle new computers supporting Secure Boot.

Windows and Ubuntu

Windows likes to save its files across the entire hard disk. By defragging the Windows partition, you arrange the scattered file fragments in a contiguous region. You can then shrink the partition without destroying any installed programs. In Windows 7, you can start the defragging with Start | Programs | Accessories | System Tools . In Windows 8, use the search option to look for the defrag program. If you freshly installed Windows, a program called chkdisk routinely looks for damage to the partition, and then Windows can boot normally.

After defragging, you can begin shrinking the Windows partition. At the bottom of the Start menu, type hard and click Create and format hard drive partition . Window XP and Vista have similar functions.

Next, select the Windows partition you want to shrink. Right-click and choose Shrink Volume , enter a desired value in the Total size after shrink in MB field, click Shrink , and restart Windows.

In any case, after you install Ubuntu and restart Windows, Windows resorts to chkdisk to check for possible damage. The system then restarts the computer again before starting up normally. Wubi [2], the tool to install Ubuntu on Windows, is included with Ubuntu 16.04, and you will be able to use it up to Windows 7. Wubi only works with Windows 8 and 10 if the machine uses the old BIOS firmware and the hybrid sleep option is disabled.

Installing Windows after Ubuntu is so complicated that we don't recommend you do it. But, if you do plan to do so, choose to create a manual partition in the Ubuntu installer (as described in the "DIY Ubuntu" box) while reserving an empty /dev/sda1 partition for Windows.

DIY Ubuntu

If you want to maintain some control over the installation, select the Something else option, although this option requires some knowledge of the Ubuntu hard drive structure (see the "Hard Drives in Ubuntu" box). Ideally, you would place at least two logical partitions for Ubuntu on an empty hard drive: a swap partition (/dev/sda5 ) and a partition for the root directory that is at least 4.9GB (/dev/sda6 ).

Optionally, add an extra partition for the /home directory (/dev/sda7 ) that gives you enough space for all your files. This partitioning has the advantage that you can install Ubuntu again later without losing your user data. Add the new partitions using Add . For the / and /home directories, selecting the Ext4 filesystem is best.

Install Now

If you opted for self-partitioning, click Install Now . To set up complete encryption, Ubuntu asks for a security key. Select the most secure one possible (Figure 6). Ubuntu then asks about your location (Where are you? , to get the time zone), Keyboard layout , name, username, and password (Who are you? ). The latter dialog also asks whether you want to Require my password to log in or Log in automatically , with an additional option to Encrypt my home folder . Ubuntu uses EcryptFS for encryption.

Figure 6: If you use the complete encryption that Ubuntu provides as an option, be sure to use a secure password (security key) and keep it in a safe place.

The following screens are for selecting your timezone, selecting your keyboard, and setting your username and password. If you have one of the supported Ubuntu webcams, the installer also suggests that you take an image of yourself to complement your profile. Ubuntu 16.04 can also import profiles from other installed operating systems, including not only browser and email files, but also screen backgrounds and documents.

During the install process, you can view a slideshow that presents the new features in Ubuntu. Installation can take a while, depending on your system, and it ends with a prompt to Restart Now . Remove the CD/DVD and press Enter so that the computer reboots. If you activated system encryption, enter the password before booting up.

Revival

To revive an installed Ubuntu, boot up Live mode on the DVD in this issue by choosing the Try Ubuntu without installing option. Be sure that the Live and installed versions are the same architecture. Then, invoke a terminal and execute the following commands. Substitute for /dev/sda6 entry the specific partition in which the root directory (/ ) of the installed Ubuntu is located.

$ sudo mount /dev/sda6 /mnt
$ sudo mount -o bind /dev /mnt/dev
$ sudo mount -o bind /sys /mnt/sys
$ sudo mount -t proc /proc /mnt/proc
$ sudo chroot /mnt
$ grub-mkconfig -o /boot/grub/grub.cfg
$ update-grub2
$ grub-install /dev/sda
$ exit
$ sudo reboot

Use the chroot command (change root) to mount the installed system into your Live system and work with it as if you had booted it. Now you can set up a new GRUB2.

Updating Ubuntu

If you have Ubuntu 14.04 installed, you may want to upgrade to 16.04. Both versions are LTS versions, so 14.04 will be supported until 2019 and 16.04 until 2021. If you have an earlier version of Ubuntu, you will have to upgrade to the intermediate versions first. Before beginning, turning off the external repositories and PPAs makes sense. On earlier versions, prior to 16.04, use the Software Center Edit | Software Sources function and remove the check marks on the Other Software tab.

Next press Alt+F2 and enter update-manager -d . In the empty window of the update manager, an Upgrade button shows at the top. During the upgrade, the installer asks whether you want to keep or replace a specific configuration file; choose to replace if you haven't made any changes. Because Ubuntu is downloading many packages and replacing them, make sure your computer is plugged in to stay charged.

Figure 7: Installation can take a while, but it is painless and can generally be left to its own devices.

Bootloader Failures

Occasionally, the bootloader doesn't appear after an Ubuntu installation, or sometimes you can boot only one system. Loading Windows after installing Ubuntu often leads to a bootloader failure. Refer to the "Revival" box for commands you will want to enter in a terminal window. These commands install the GRUB2 bootloader with help from a Live system so that GRUB correctly identifies all systems.