New laptop, new Ubuntu. This post shows step-by-step how I installed Ubuntu 20.04 LTS on a brand new Lenovo x1 Extreme Gen 2. I kept Windows on a smaller (250 GB) partition with the option to boot into either OS. This post will assume you are working from a Windows 10 OS. You should have an empty >4GB USB drive available for storing the Ubuntu image. For an older version, see my post on dual-booting Ubuntu 16.04 TLS on a Lenovo t470p.
1. Download Ubuntu
First, download Ubuntu Desktop from here. I am using Ubuntu 20.04 LTS, you may wish to use a different version if you are reading this in the future there may be a more recent LTS version, maybe you want to use a beta version or have some specific requirement for an older release. Either way, download it to your hard drive, not to the USB drive. Remember where it has been saved to, probably your “Downloads” folder.
2. Download Rufus
3. Create bootable USB drive
Open Rufus. Insert the USB drive into your laptop. You should see Rufus automatically detect your USB drive in the uppermost drop-down menu – if not select it manually. You will also see an option to define a boot selection – choose “FreeDOS” – this is the option for creating a bootable drive. The other selection options should be set to their defaults (MBR partition scheme, BIOS target system, FAT32 file system and default cluster size). To the right of the “boot selection” option there is a button labelled “select”. Click this and navigate to the Ubuntu ISO file you downloaded earlier, which is probably in your Downloads folder and is probably the only ISO file available (if you have downloaded other ISOs just be sure to select the correct one).
The “Volume label” should update to display the downloaded ISO file name. Leave all other options as their defaults and click START. There will be several warnings displayed about additional downloads required by Rufus to write the bootable drive, and that any data and existing partitions on the USB drive will be erased. There will also be a warning indicating that “ISOHybrid Image detected” which will provide the option to write to the USB in ISO mode or DD mode. Choose ISO mode.
Click through the remaining warnings to continue writing the ISO to the USB drive.
4. Partition hard disk
It is likely that your hard drive is already partitioned into several individual spaces, but the main bulk of your hard drive space will be allocated to the C: drive which is where Windows is installed. To dual boot Windows and Ubuntu we need to allocate some of this space to each operating system. I actually had a second hard drive installed specifically for Ubuntu so I loaded Ubuntu onto my existing D drive, but you may wish to create a new partition by shrinking your C: drive. This is done from Windows using the disk manager, which is accessible from the command line using the command >dskmgmt or by selecting “Create and format hard disk partitions” in the control panel.
5. Disable Windows secure-boot, Bitlocker and Fast-Start
Windows 10 comes with UEFI firmware that controls how the operating system boots. One of many functions associated with this firmware is “secure boot” – a security feature that prevents external changes being made to Windows. However, it also prevents other operating systems from booting on the machine, so to load Ubuntu we need to disable Windows’s secure boot function. However, before we do this, we have to disable another security feature that comes enabled on Windows 10 – BitLocker. BitLocker encrypts the hard drive, meaning it is not accessible to other operating systems that do not have access to the decryption key associated with your Microsoft account. It is easy to disable this feature – search for BitLocker, click on the option for “BitLocker Drive Encryption”, right click on the appropriate drive (D:// for me) and select “Turn off BitLocker”. The drive will then be decrypted, which can take some time. Once this is finished, we are ready to disable the SecureBoot.
To disable SecureBoot, start by searching for “Advanced startup” in the taskbar, then select “Change advanced startup options”. On the screen that appears, click restart – the computer will restart into a new set of options for configuring the startup.
Click “TroubleShoot”, which will bring up two options: “Reset your PC” or “Advanced options” – click on “Advanced Options”, then in the next screen choose “UEFI Firmware settings. This will restart the system again automatically, if not then click “restart”. When the machine starts up again it will do so straight into the BIOS menu. You can navigate this menu using the arrow keys. Navigate to “Security” then “secure boot”. Enter the secure boot menu and change “enabled” to “disabled”. Then save and exit by pressing F10.
Finally, we need to disable Windows fast start-up. The reason is that Windows does not fully shut down when this option is checked – it leaves some processes running and some memory allocated so that the start-up is faster next time the machine is turned on. This can disrupt booting into other operating systems. Disabling this function is straight-forward to do, simply navigate to the control panel > power options > control what the power buttons do, then click “change settings currently unavailable”. This will release a check-box at the bottom of the screen that toggles fast start-up on/off. Toggle it off.
Now fast start-up, BitLocker and SecureBoot have been disabled the machine should be able to boot into any operating system.
5. Boot Ubuntu from USB
Make sure the USB drive with the Ubuntu ISO is inserted into a USB port, then restart the computer. There is a startup screen that shows the Lenovo logo, below which there is an instruction to press F12 for more boot options. press F12. This will bring up the boot menu, where you will see various bootable drives that can be selected using the arrow keys. Find your USB drive and press Enter. This will bring up several options, the top two of which should be a) ubuntu, and b) ubuntu (safe graphics). The former should be ok, but if you have certain NVIDIA graphics cards you might be better choosing the latter. Either way, select an Ubuntu option. After some small amount of time doing system checks, the Ubuntu desktop will appear. This is Ubuntu operating system being run ‘live’ from the USB drive, so the next step is to install Ubuntu on the main machine rather than the external drive. This is achieved using the pre-installed wizard that is already available on the desktop.
6. Install Ubuntu onto the hard disk partition
The installer should automatically open to greet you on the first live boot – if not , there is an abvious desktop icon for the installer that can be double-clicked. The installer is fairly self-explanatory – choose your keyboard layout and language, then continue through the following options. Make sure you connect to a wifi network as this will make some of the following stages easier. I decided to go ahead with a minimal installation because I prefer to install software as I need it, and I would likely have deleted most of the pre-selected software that comes with a full install. The installation type options are critical – I chose to install alongside Windows.
The next menu offers the opportunity to choose a drive to boot into – for me this was the second 2TB hard disk. You can choose the appropriate drive – likely the C: drive, and drag the central slider to define how much space to allocate to each operating system. Clicking through begins the Ubuntu installation to the selected partition on the chosen drive.
What follows is a series of simple configuration options such as username, password and location settings, then Ubuntu starts installing automatically, which can take some time. Once this has finished, the computer needs to restart.
You now have a lovely fresh new Ubuntu OS to play with. My system now gives the various boot options automatically on powering up the computer, with Ubuntu as the primary option and Windows boot driver as the second option. This can be changed – see my last post for re-ordering the boot drivers. As far as I can tell, there is no need to faff around with blacklisting and replacing graphics card drivers like some previous releases as support for proprietary NVIDIA graphics cards is provided out-the-box on 20.04 (easily accessible via the app menu – “software and updates” > “additional drivers”, but I’m not a gamer and may have missed some information on this – I’d welcome any comments that can confirm or deny.
I have not yet had much of a chance to test this installation, but I have downloaded and installed my baseline development tools (Anaconda (Python), VSCode, PyCharm, KeePassXC, Git, GitKraken, Dropbox) and changed the desktop environment to xcfe, and used the machine for my normal software development tasks for a few days without any issues. The GNOME desktop that comes preinstalled is aesthetic but it feels a bit too app-centric (like Windows 10) for my tastes so I will probably stick with xcfe or similar. Everything feels very fast and intuitive and I have not experienced any hardware issues so far. I will update this post if I hit any hurdles.
UPDATE (May 2020): Automatic Ubuntu update on 26/05/20 removed the necessary drivers for the Intel AX600 Wifi adaptor. It was working fine before the update. Since the laptop does not have an ethernet port, I had to buy an ethernet to USB adaptor. That took 2 days to arrive, and as soon as I connected it I ran “sudo apt-get update” and the wifi has mysteriously begun working again, I assume because the new apt-get update installed the driver. Running “sudo lshw -C network” indicates that the wifi adaptor is using the driver “iwlwifi driverversion=5.4.0-33-generic”.
UPDATE (June 2020): Another issue I have come up against is that libgfortran3 is not available for Ubuntu 20.04, meaning my Fortran code that ran perfectly well on 16.04 no longer compiles. Ubuntu 20.04 only has libgfortran5 available. In some cases it is no problem to use the updated compiler to run code built using libgfotran3, but some of my code is fairly esoteric legacy Fortran wrapped quite densely in Python and I have not yet worked out quite where in the source code to make the necessary modifications (advice welcome!).
Disclaimer – I am just reporting my own experiences – I take no responsibility if you brick your computer trying to change the operating system. Any actions taken are entirely at your own risk.