This guide describes how to install Fedora 30/31 next to Windows 10 on a Dell XPS 13 9380 series in dual boot.
- Keep the stock Windows 10 installation that came with the laptop.
- Install Fedora 30 alongside Windows on the hard disk.
- Install GRUB as the bootloader allowing you to choose which OS to boot from.
Authored: September 2019
The Web is teeming with tutorials, guides, articles,... describing the process of installing Fedora on a Dell XPS series laptop. Unfortunately, mostm if not all, of them are terse at best, and skim through the process. While it seems easy enough to install Fedora, essential steps are inadvertently skipped, leaving those who follow these guides with broken installations, chasing Google and old comments on forums and blogs in hopes of solving a wide variety of cryptic error messages.
I just received a fresh Dell XPS 13 and I decided to install Fedora 30 alongside the stock Windows 10 installation in a dual-boot configuration. I took this opportunity to document the steps as exhaustively as possible. My main source of information is that same variety of guides, tutorials and forum topics I found as I go through the different hoops and challenges.
This guide will have you dig deep inside your laptop. You will be touching some critical settings and configuration. This guide worked for my particular situation. Your Mileage May Vary! I don't guarantee that these steps will work in any situation.
Please back up any critical data and/or programs before you start.
You are following these instructions at your own risk.
Windows 10 features a Backup and Restore functionality. It allows you to create a restorable image of the entire operating system on a portable drive:
- https://support.microsoft.com/en-us/help/4027408/windows-10-backup-and-restore
- https://support.microsoft.com/en-us/help/12415
This is the most straightforward way of creating a quick backup of your current setup.
Alternatively, you could simply store your data manually on a wide variety of storage solutions: Dropbox, One Drive, Google Drive, Synology,... You could use a separate hard drive or a portable drive. Or you could store your data on a self-hosted solution such as NextCloud.
If you want to install Fedora on a laptop, you will need a bootable device. This could be a USB pendrive, a hard disk, a CD/DVD,... which contains a bootable image of an operating system. We will create such a bootable device which allows you to boot Fedora Live USB on your laptop. Fedora Live won't wipe your laptop's hard disk, it simply allows you to boot Fedora from the USB drive and give it spin before installing it on your laptop. You will be presented with the option to install Fedora on your hard disk though.
We will use a USB pendrive and turn it into a bootable device allowing you to boot Fedora 30 on your laptop. You will need a USB pendrive with at a minimun 2GB of space. Your pendrive will be completely wiped, backup any data you have stored on the pendrive!
Important caveat:
- You will need a USB-A to USB-C adapter, as the laptop doesn't feature USB-A ports anymore.
- Alternatively, buy a USB-C pendrive
Creating a pendrive consists of downloading an image from the Fedora website and writing it on the pendrive. You could do this manually with Rufus. But it's easier to simply use the Fedora Media Writer.
- Start your laptop, log into Windows 10.
- Download and install the Fedora Media Writer application.
- Insert your USB pendrive.
- Open the application and follow the instructions.
This might take 10 to 15 minutes. The application will automatically download the latest version of Fedora, write it to your pendrive. When the process is finished, close the application and remove the pendrive.
The first milestone we want to complete is booting Fedora Live USB on your laptop, instead of the Windows 10 installation on your hard drive. Simply inserting the USB drive and rebooting your laptop doesn't work. You will need to make changes to settings in Windows 10 and the BIOS of your laptop.
If you haven't backed up your data, this is your last chance to do so. The changes we'll make, might brick your laptop if you're not careful.
The operating system on your computer - Windows or Linux - isn't able to start by itself when you press the start button on your laptop. Historically, between the hardware and the operating system sits an intermediate layer of firmware called the BIOS or Basic Input/Output System. The BIOS is responsible for handling the bare metal and silicon: hardware initialization and several sanity checks, before handing off control to the Operating System. The BIOS used to be etched on a ROM chip on your motherboard. These days, it's loaded from flash memory allowing users to upgrade and modify the firmware.
UEFI or Unified Extensible Firmware Interface is the successor of the BIOS specification and software:
The Unified Extensible Firmware Interface (UEFI) is a specification that defines a software interface between an operating system and platform firmware. UEFI replaces the legacy Basic Input/Output System (BIOS) firmware interface originally present in all IBM PC-compatible personal computers, with most UEFI firmware implementations providing support for legacy BIOS services. UEFI can support remote diagnostics and repair of computers, even with no operating system installed.
When your Dell XPS 13 starts, it will boot into your operating system according to the UEFI specification/framework.
Here's where there rise confusion about several terms you might encounter on the web. It's important to understand these terms to follow along.
- BIOS: The user interface we'll use to configure the UEFI firmware is often - and confusingly - refered to as BIOS i.e. "Press F2 to enter the BIOS"
- UEFI: This is a specification. Vendors of various motherboards all provide their own specific firmware. The industry does follow the same specification in how this firmware needs to work: the UEFI specification.*
- Legacy BIOS firmware interface: The UEFI specification does provide backward compatibility. Meaning that you can configure the firmware that adheres to the UEFI specification, to emulate the boot up process as if it was running as historic BIOS firmware. In other words, without all the bells and whistles provided by UEFI.
- UEFI mode: This means the firmware is configured to go through the process of booting into your operating system according to the modern UEFI specification, making full use of all the features offered by the UEFI specification.
Historically, your OS and the BIOS didn't have much overlap. Today, it's possible to interact with the UEFI firmware through your operating system. This is a good thing since it allows you to upgrade to newer versions of the UEFI firmware. This wasn't possible in earlier times when the BIOS was etched onto a dedicated ROM chip.
How Windows 10 was installed matters!
So far, we've learned that it's possible to configure your computer to boot either in UEFI mode, or in Legacy BIOS mode. It matters in which mode your machine was booted when Windows 10 was installed. It's not possible to boot into Windows 10 in UEFI mode, if the OS was installed while in Legacy BIOS mode. You're machine will halt with an error stating that the OS can't be booted.
If you want to know more: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/boot-to-uefi-mode-or-legacy-bios-mode
Out-of-the-box your Dell XPS 13 series will have Windows 10 pre-installed in UEFI mode. So, this shouldn't be an issue. However, if you installed Windows 10 yourself, and tampered with BIOS settings in the past, you may need to check in which mode you're running:
If you want to know more: https://itsfoss.com/check-uefi-or-bios/
Let's go ahead and make the necessary changes.
If you haven't done so, boot your laptop normally. Don't just insert the USB pendrive yet. First, we need to disable Fastboot in Windows 10.
What is fastboot? Your computer comes with a range of power on/off/sleep/hibernation states called ACPI states. This technology allows your computer on shut down to save the state of your Operating System - logged in, several apps open - as a file on your disk, restoring from that file as soon as possible when you boot your computer, instead of powering up your OS from zero.
Fastboot literally means booting your PC as fast as possible. However, this hybrid sleep/off/hibernate state still means that your computer might still be drawing power.
Windows 10 supports a fastboot option, but sadly, this feature causes compatibility issues when running your laptop in dual-boot with linux, or when you want to enable virtualisation (i.e through Virtualbox or VMWare).
More information: https://www.windowscentral.com/how-disable-windows-10-fast-startup
How to disable fastboot
- Right click on the start button
- Click Search
- Type Control Panel and hit enter
- Click Power options
- Click Choose what the power buttons do.
- Click Change settings that are currently unavailable.
- Click Turn on fast startup (recommended) so that the checkmark disappears.
- Click Save changes.
Windows 10 will now boot without fastboot enabled.
First we need to enter into the BIOS interface of the UEFI firmware.
- Reboot your laptop
- When the Dell Logo appears, press the F2 button.
- You will now enter the BIOS application wich is a gray interface with navigation on the left, and input controls on the right.
Using the Fn + up/down keys, you can set the brightness of the screen if things are a bit dark.
Enable booting from Thunderbolt
Out of the box, your laptop won't boot from any bootable USB device. We need to enable this feature explicitely:
- Click the System Configuration item open.
- Click the Thunderbolt Adapter Configuration item open
- Check the Enable Thunderbolt Boot Support checkbox
- Click the Apply button on the bottom to save the change.
Disabling Secure Boot
UEFI Secure Boot is a feature that prevents malicious code from taking over your computer at boot time:
Secure boot is designed to protect a system against malicious code being loaded and executed early in the boot process, before the operating system has been loaded. This is to prevent malicious software from installing a "bootkit" and maintaining control over a computer to mask its presence. If an invalid binary is loaded while secure boot is enabled, the user is alerted, and the system will refuse to boot the tampered binary.
More information: https://www.linuxjournal.com/content/take-control-your-pc-uefi-secure-boot
Secure Boot doesn't allow the computer to be booted in Legacy BIOS mode. The latter we'll need to be able to install Fedora 30. So, we need to disable Secure Boot.
- Click the Secure Boot item open
- Uncheck the Secure Boot Enable option
- Click the Apply button on the bottom to save the change.
Enabling Legacy Options ROMs
This setting will set your laptop to run in Legacy BIOS mode.
- Click the General item open.
- Click the Advanced Boot Options open.
- Check the Enable Legacy Options Roms option.
- Click the Apply button the bottom to save the change.
Setting the Fastboot behaviour of the UEFI firmware
Remember the Fastboot option we changed in Windows? Well, the UEFI Firmware also supports a Fastboot feature. It's not the same feature though, even though they carry the same name. The Fastboot feature let's you control to do a full initialization of the hardware before the OS gets loaded - which takes more time - or to skip a ton of optional stuff, just loading the strict minimum, in order to get the OS running as fast as possible.
You will need to change this setting to do a thorough full initalization - thus disabling fastboot - in order to get all the hardware you need enabled to make Linux happy.
- Click on the POST behaviour item.
- Tick the Thorough option.
- Click on Apply and save the change.
You should now have everything configured in order to boot from a Fedora Life USB pendrive. Also, your Windows 10 still should be able to boot just fine if you don't use the pendrive at this point.
- Click on Exit.
- Your laptop will now reboot.
- You should now boot again into Windows 10 as per normal.
So, did we make the right changes? Time to test them out. Let's connect the USB Pendrive and reboot the machine.
Important caveat: Use the right hand side USB-C port. NOT the left hand side USB port. The left hand side isn't designed to accept bootable media.
- Reboot your computer.
- When the Dell Logo appears hit F12
You should now enter a boot loader manager. You should see a few options, among listed UEFI compatible bootable devices
- Pick the USB storage device under the UEFI compatible boot devices. Hit enter to boot.
Your laptop will now reboot again and show the Dell Logo. Just let it do it's thing. It will load up Fedora 30 from the USB Pendrive. It might do a check of the OS, you can skip this by hitting the ESC key.
If all goes well, you will be greeted by the Fedora 30 welcome screen with a big box asking you to either boot the live version, or install Fedora 30 on your hard drive.
Choose "Try Fedora" to take it for a test drive and see how you like it. Do not choose Install to Hard Drive yet. We need to do some final tweaks in the BIOS first before we can proceed.
Out of the box, Dell ships it's laptops with the RAID mode enabled on your SATA controller for accessing your disk storage. There's a reason for this:
Many SATA controllers offer selectable modes of operation: legacy Parallel ATA emulation (more commonly called IDE Mode), standard AHCI mode (also known as Native Mode), or vendor-specific RAID (which generally enables AHCI in order to take advantage of its capabilities). Intel recommends choosing RAID mode on their motherboards (which also enables AHCI) rather than AHCI/SATA mode for maximum flexibility.[1] Legacy mode is a software backward-compatibility mechanism intended to allow the SATA controller to run in legacy operating systems which are not SATA-aware or where a driver does not exist to make the operating system SATA-aware.
Standardization and interests of motherboard vendors have caused conflict and confusion. Arguably, RAID isn't the most suitable way of managing a single disk in a consumer device. And so, it's preferable to set the operation mode to AHCI in your BIOS. However, we can't easily do this. If you simply flip the setting in your BIOS, your operating system will fail to boot and your laptop, apparently, will look like it's fatally bricked This problem is easy to solve.
Before you flip the setting in your BIOS, you will need to manually enable the AHCI driver in Windows 10. If you do not do this, Windows cannot load the storage controller driver needed to access the boot volume. This driver is loaded before the Plug and Play manager. Windows can't otherwise search for the correct driver automatically.
Here's how you enable the AHCI driver in Windows and switch to AHCI in your BIOS:
- Remove the pendrive and reboot your laptop into Windows 10.
- Run cmd as administrator (not PowerShell, you would have to escape {...})
- Copy-paste this command, which will start Windows in Safe Mode the next time you reboot:
bcdedit /set {current} safeboot minimal
- Restart the computer and enter UEFI/BIOS setup.
- Click the System Configuration panel open.
- Click the SATA Operation option open.
- Set the operation mode to AHCI.
- Save changes and exit Setup and Windows will automatically boot to Safe Mode.
- Launch cmd again, as in step #1.
- Copy-paste this command, which will start Windows in Normal Mode the next time you reboot:
bcdedit /deletevalue {current} safeboot
- Reboot and Windows will automatically start with AHCI drivers enabled.
The crux here is that Windows 10 won't boot in normal mode with the SATA operation mode set to AHCI. But it WILL boot in Safe Mode. Moreover, when you switch back to normal mode after flipping to AHCI, Windows 10 will pick up the change and autmatically start with the AHCI drivers enabled.
At this point, all available hard disk storage is allocated towards Windows 10. Since Fedora requires a separate hard disk partition. When you boot your laptop, you will see a boot menu which will ask you to either boot from the Windows 10 partition, or from the Fedora partition. We need to shrink the Windows 10 partition to create the required room for a separate Fedora partition.
Warning: This is a non-trivial operation. If you have made it to this point without backups, now is the time to really make backups of any important data you have stored in Windows.
Disclaimer: Manipulating your hard drive carries an inherent risk of data loss. These next steps worked for me but I do not guarantee that they will work for you. Worst case scenario is that you end up putting your Windows installation in an unbootable state which can not be recovered. Do this at your own risk.
Windows 10 Pro users
Before you can shrink your partition, you will need to disable Bitlocker. This program is a part of Windows 10 Pro and allows you to encrypt your Windows partition. Encrypting your data is a security measure to counter attempts to read your data by hooking up your drive to an external device. However, Bitlocker and encryption make it harder to resize your Windows partition.
Bitlocker is enabled out of the box for Windows 10 pro but isn't fully activated. You need to disable it entirely.
If you haven't activated Bitlocker yet, follow these steps in Windows 10:
- Open up System and Security
- Open up Bitlocker Drive Encryption. You will see that it says "Windows (C:) BitLocker waiting for activation"
- If you go to Settings > Device encryption, click the "Turn off" option.
It might take a few minutes, but in the end, you will see that Bitlocker will be entirely disabled. You can/should enable it after resizing your Windows 10 partition.
Windows 10 Home edition doesn't come with Bitlocker, so you can skip this step if you are a Home edition user.
More information:
- http://www.edugeek.net/forums/windows-10/193228-handy-bitlocker-tip-if-you-waiting-activation.html
- https://superuser.com/questions/1299600/is-a-volume-with-bitlocker-waiting-for-activation-encrypted-or-not
- https://www.reddit.com/r/Dell/comments/5vaai6/can_not_shrink_partition_for_dual_boot_new_win10/
Shrinking your partition with the Disk Management Tool
Shrink using disk management tool
UEFI Boot Manager and Windows 10 Pressing F2 to bring up BIOS during Dell logo Pressing F12 to bring up boot from device during Dell logo https://superuser.com/questions/1280141/switch-raid-to-ahci-without-reinstalling-windows-10 https://www.appgeeker.com/recovery/disable-uefi-secure-boot-in-windows-10.html
- Setting the timezone and location
- Setting the keyboard
- Create a SWAP file on /swap. If you have 16GB ram, you set it to 24 GB for hibernation to work.
- Point the /boot/efi directory to the existing EFI partition on your system. DO NOT CREATE NEW OR SEPARATE EFI PARTITION.
- Create a / partition claiming all remaining space. You could alternatively create a separate /home and/or /var partitions.
- Choose the Fedora 30 option from the GRUB boot manager
- Set the username and password of your system
- Set the WiFi settings (if any)
- Add any cloud accounts you might have
Congratulations, you have now added Fedora 30 in dual boot mode to your laptop. Let's customize Fedora 30 a bit.
Well, by know you've noticed that right click doesn't work well. Let's change that.
sudo dnf install gnome-tweaks
- search for 'tweaks' in the activities search
- Open the mouse/keyboard tab
- Set the mouse settnig to "areas" to enable right click under Mouse click emulation
By default, the touchscreen is enabled. Unless you actually use the touchscreen, it's just going to cause input conflicts with your mouse or touchpad. Fedora 30 comes with Wayland/GNOME. There are three methods of disabling the touchscreen:
- Disable the
hid-touchpad
which will also disable the touchpad (not what you want) - Use the
xinput
command. Which only works on Xorg while Fedora 30 comes with Wayland. So, that doesn't work. - Create a new
udev
rule that disables touchscreen on boot.
The last option is what we want.
- Find the touchscreen device as registered with the kernel. We are looking for the "ELAN" keyword with the "name" attribute:
$ libinput list-devices | grep -C "ELAN"
- Note the "name" & kernel attributes of the device. In my case: "ELAN2933:00 04F3:2933" and "/sys/class/input/event9"
- Create a new
udev
rule:
$ sudo touch /etc/udev/rules.d/80-touchscreen.rules
- Add this line to the file, and save (subsitute the identifier for yours if it differs!)
KERNEL=="event*", ATTRS{name}=="ELAN2933:00 04F3:2933", ENV{LIBINPUT_IGNORE_DEVICE}="1"
- Test if it device is actually ignored by the rules:
$ udevadm test /sys/class/input/event9
- Reboot your entire laptop (no, just restarting the udev daemon won't work!)
More information: https://wiki.archlinux.org/index.php/Dell_XPS_13_(9343)#Disable_the_touchscreen
The dotfiles or rc file - i.e. .bashrc - are what you'd use to manage your terminal / bash shell's behaviour and appearance. It's recommended to keep a clean version of your bash files somewhere else. Let's use the rcm tool with github:
https://fedoramagazine.org/managing-dotfiles-rcm/
https://www.cyberciti.biz/faq/install-and-enable-bash-auto-completion-in-fedora-linux/ https://echorand.me/posts/linux_shell_autocompletion/
The annoying bell sound when tab completion in terminal:
touch ~/.inputrc
echo "set bell-style none" > ~/.inputrc
Restart your terminal```
https://www.itzgeek.com/tips-and-tricks/disable-beep-sound-in-the-gnome-terminal-centosredhat.html
- Use the store feature
$ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-30.noarch.rpm -y
$ sudo dnf install telegram-desktop
https://www.addictivetips.com/ubuntu-linux-tips/install-telegram-on-linux/
sudo dnf -y install wget
wget https://downloads.slack-edge.com/linux_releases/slack-3.4.0-0.1.fc21.x86_64.rpm
sudo dnf localinstall slack-3.4.0-0.1.fc21.x86_64.rpm
https://computingforgeeks.com/install-slack-on-fedora/
NFS Issues:
- Enable nfs-server
- Add rule to the firewall to enable NFS shares
- Enable UDP in nfs-server configuration /etc/nfsd.conf
hashicorp/vagrant#9666 https://computingforgeeks.com/how-to-install-vagrant-and-virtualbox-on-fedora-29-fedora-28/ https://developer.fedoraproject.org/tools/vagrant/vagrant-nfs.html
This guide absolutely saved my bacon. However, I would like to add the following about BitLocker, for those who are interested in keeping it enabled while still disabling secure boot:
BitLocker will STILL allow you to disable secure boot without freaking out, AS LONG AS You set a PIN. You go into Control Panel -> BitLocker -> Set a PIN for startup. If you do this, bitlocker can still be enabled on your machine and work and you can have nice things.
THANK YOU AGAIN for this AMAZING guide, without which I would not be on a linux laptop at work. :)
EDIT: The above totally doesn't work, the recovery key is still asked for. I have a business requirement to keep the drive encrypted, though. I'm going to try turning off bitlocker and use VeraCrypt instead. We'll see what happens.