ComputersLinux

Installing Linux is getting harder but it’s not Linux at fault

I’ve recently bought myself a new computer. It’s a high spec laptop, a Dell Inspiron 5580 (Inspiron 5000 series), with Intel i7 processor, SSD and 1TB hard disk, and a Nvidia graphics card.

The laptop comes pre-installed with Windows but I really intend to use it running Linux. I don’t want to remove Windows completely as there are a couple of things that I do occassionally run in Windows. So one of the first things I did was to shrink down Windows and install Linux.

Dell Inspiron 15 5000 5580 running Ubuntu Linux

There have been times in the past where installing Linux and Windows side-by-side using a dual boot was almost child’s play. That’s no longer the case but it’s not Linux that is difficult, the difficulty is in not breaking Windows in the process as Windows gets upset whenever you try to make changes to the computer. With a little perseverence I’ve now got Windows and Ubuntu Linux (19.04) able to dual boot. This is an explanation of some of the hoops I needed to Jump through.

I’ve listed the steps below, they don’t neccessarily need to be carried out in this order, but some steps do need to be run before others.

Buying the laptop

I ordered the laptop directly through Dell.

Which Linux Distribution

My first decision was which Linux distribution to install. There are a lot of difference ones, but usually I stick to one of the variants of Ubuntu for my main laptop (I run other distributions elsewhere, including virtual machines on my laptop). For the last few years the particular Ubuntu variant I have been using is Kubuntu, but before then I used to run the standard Ubuntu. As there has been a new release within the last month (19.04) I thought it may be worth looking at both.

I tried both using a live USB distribution and chose Ubuntu because it worked better on the new laptop. The Kubuntu distro had problems with the graphics card drivers, and whilst it may have been possible to fix them by booting in a safe mode and installing the proprietary drivers it would have made the install a bit more complicated.

Once you have decided on a distribution you can download it from the appropriate site and then install it onto the USB stick using Rufus (Windows) or USB disk creator (Linux).

Setting up Windows 10

The first stage is to setup and configure Windows 10, which means logging in with a Microsoft Outlook account, which is available for free registration. In this past this is something I have avoided preferring to use a local login, but I don’t think that’s an option anymore and without registering then you won’t be able to update the bitlocker, although it may be possible if you remove encryption first.

Create a Windows backup recovery USB

The first thing I always do before trying to install Linux on a new computer is make sure that I have a backup of the original Windows installation. That way if anything does go wrong then I can reset the laptop back to the factory settings.

That is created using the Windows built in Recovery Drive tool, which can be found by clicking on the Windows application menu and typing recovery.

It will then tell you the minimum size USB drive which you can insert to make a backup. Or at least that’s the theory, mine said that I needed a 16GB usb drive, so I inserted a 32GB usb thumb drive. The application then gave an error message and crashed. It turns out that this is due to an unusual partition format from a previous use. There is a Windows partition manager application “Disk Management”, but that was unable to deal with the drive, so I had to use the command line application diskpart. There is a guide available at: Command Windows website, but USB drives are so cheap now that it may be easier to just buy a new one and then reset the USB drive in Linux after sorting out the dual boot.

Make windows shutdown properly, disable secure boot and override bitlocker key

You may want to read the next section on disabling encryption first.

The next thing is to set windows to perform a proper shutdown instead of the Hybrid hybernation it does by default and to disable secure boot in the UEFI setup. This did through up a problem with bitlocker, which I’ll explain below.

The reason I need Windows to disable the hybrid hybernation is so that I am able to access the NTFS partition when booted into Linux. It also reduces the risk of corruption on the drive. This is a feature that is well hidden in the system settings and even when you find it it’s set so you can’t change it until you enable the disable checkboxes (who on earth thinks up these things?).

From the Windows menu type “power & sleep settings” to access the power options in the system settings. Then find the section “Related settings” and click on “Additional power settings”. In the new Power Options window, click on “Choose what the power buttons do” on the left hand side. Then click on “Change settings that are currently unavailable” which will then allow you to unselect “Turn on fast startup”.

Windows 10 option to disable fast startup - allows access to NTFS drives from dual boot Linux

If you think that finding that option is difficult if you try and get help by click the link to “learn more” then you just get a link to a web search which doesn’t provide information on that particular setting. Really! What is the point in that link?

Next to disable secure boot. It’s probably possible to install Ubuntu without doing this, but as far as I can see secure boot is more about locking out other operating systems than it is protecting a computer from viruses and hacking attempts (which seldom target the initial boot code). To this you need to access the UEFI setup. First type “startup options” from the Windows menu and open “Change advanced startup options”. Then click on the “Restart now” button under Advanced Startup.

Windows 10 Advanced Startup options - boot to UEFI firmware settings

Then click troubleshoot, advanced options and UEFI Firmware Settings, which will then reboot to the settings. This is similar to the BIOS of legacy computers. From there you can find secureboot and disable it.

I then rebooted, which came up with another problem, that the bitlocker keys were now wrong. Bitlocker is a way of encrypting the disk drives to protect data. Previously it was only included in the professional or business editions of Windows, but it now appears to be included in the Home edition (or at least in the version that Dell includes on this laptop”. This can be a useful feature to protect your data, but it prevents other operating systems from accessing the data on the hard drive, so it’s a feature I don’t want. The problem is that whenever you make changes to the system then the security keys don’t work and you cannot boot the computer or access any information on the drive.

The boot screen tells you to enter the bitlocker key which (assuming you setup with a outlook account) can be found on the address provided by logging in with your username and password. If you do want to completely remove bitlocker then you may be better off just disabling the encryption first instead.

Disabling bitlocker encyrption

I wasn’t aware that bitlocker encryption was included in a Windows 10 home setup (it was previously a feature only in the professional or enterprise versions), but the Windows 10 drives were encrypted.

As I want to be able to access the data on the Windows partitions from Linux I disabled the encryption. I did that by going into the control panel security settings and disabling encryption on the drives. I believe this may have prevented me having to do a “key recovery” on the previous step if I had done this first.

Reducing the Windows Partition to make space

By default all the space on the SSD (Solid State Disk) and the hard disk drive is allocated to Windows. I would have liked to have installed Ubuntu onto the Solid State Disk rather than Windows as Linux will be my primary operating, but I didn’t want to risk breaking the Windows setup, so instead installed Linux on the normal hard drive. To do this I first reduced the size of the Windows partition using the Windows Disk Management tool.

Windows 10 disk management partitioning tool, after installing Linux in a dual boot setup

Right click on the partition in question and choose shrink. In this case I reduced the Windows data partition to approximately 250GB (in addition to the operating system partition on the solid state disk) giving approximately 750GB for Ubuntu to use.

Setting the SSD to non RAID

At this point I thought I had done everything ready to install. I shutdown the PC, inserted the USB memory stick and powered on hidding F12 to be able to boot from the USB stick. I however noticed that I was not able to see the solid state disk. Whilst I was planning to install into the real hard disk and not the SSD I still needed to be able to install the UEFI boot details on the SSD.

This is something that would normally require a reinstall of Windows, but fortunately I found the following forum post which gave an alernative AskUbuntu – SSD not detected during install.

The basic summary of steps I followed to change the SSD to AHCI are:

  • Make sure you have a backup (see earlier earlier)
  • Run command prompt as administrator (cmd)
  • Run command “bcdedit /set {current} safeboot minimal”
  • Using Windows recover boot into the UEFI setup (see earlier in this post)
  • Change the SATA Operation mode from RAID to AHCI
  • Save changes and exit Setup and Windows will automatically boot to Safe Mode
  • Run command prompt as administrator (cmd)
  • Run command “bcdedit /deletevalue {current} safeboot”
  • Reboot and make sure Windows is now working correctly

Installing Ubuntu

Finally your ready to start installing Ubuntu. The good news is that it was all plain sailing from this point onwards. There are a few points that the installer is quite slow as it detects various components so a little patience is needed.

First reboot using the prepared Ubuntu USB disk by pressing F12 during the Dell splash screen. I chose to “Try Ubuntu” first rather than going straight into the installer, and then launched the installer from inside Ubuntu.

I chose to install “alongside Windows” (which was not avialable prior to the changes made to use the SSD as AHCI instead of RAID). I accepted the default setting of letting the installer choose how to partition up the available space. There are advantages to creating a separate home partition (Using a separate home partition can make reinstalling Ubuntu / Kubuntu Linux easier) but by this stage I decided to go for the easy option.

Then it’s a case of a few simple questions and then rebooting, which gives a boot loader allowing you to choose between Ubuntu and Windows boot loader (ie. Windows).

Summary

Now it’s done I’m happy with the setup, but it was a very long process to install Ubuntu. As I say from the title it’s not the fault of Ubuntu, but of the way that the laptop is setup and the way Windows doesn’t like to share the computer.

The benefits of Linux are well worth it, including a stable and fast operating system, with tons of free good quality software and no nagging warnings about license keys, expiries or trying to sell you upgrades.

All in all a much better experience from Linux than it is in Windows.