Monday, July 26, 2021

How to dual-boot Windows 11 and Linux on your PC

Microsoft is preparing to release Windows 11 later this year, and so far, it looks like a major improvement over Windows 10. It has a brand-new visual design that’s more consistent and attractive, and it includes some big new features like support for Android apps. As good as it may be though, it doesn’t necessarily fit every workload or preference. What if you prefer Linux or need it for certain tasks? In this guide, we’ll show how you to set up your PC so you can dual-boot into either Linux or Windows 11 whenever you want.

For this guide, we’re assuming you already have Windows installed on your PC, since that’s the case for most people. We’ll go through the necessary steps to create a partition and install Linux on it to dual-boot. So to follow along, you’ll need a Windows 10 (or Windows 11) PC, a USB flash drive (8GB or more) for installation media, and another external storage method to back up your data in case anything goes wrong.

The first thing you’ll want to do, if you’re running Windows 10, is upgrade to Windows 11. It’s best to do this before installing Linux, just in case the upgrade causes any issues with your Linux installation. We already have a guide on how you can join the Windows Insider program to get Windows 11, and one focused on installing Windows 11 if you prefer other methods. You can follow either of those, although the former should be a lot easier.

As a reminder, Windows 11 is still under development and can be unstable. You can follow the latest Windows 11 updates on our update tracker. Also, make sure your PC is compatible with Windows 11 first. Once that’s done, we can focus on installing Linux for dual-booting.

Creating Linux installation media

First things first, you’ll need to have a USB drive that you can install Linux from. To turn your flash drive into installation media, everything on it will be erased, so make sure you’ve backed up anything you might need. Here’s what you need to do:

  • Find and download the Linux distribution (distro) you want to use. There are a lot of them out there, but for this guide, we’ll be using Ubuntu 21.04. Most of the steps should be the same or similar if you use other distros, so there’s no need to worry. Once you’ve completed the download, you should have a file with the ISO file extension.
  • Next, you’ll need a tool that creates bootable USB drives from ISO files. You can download Rufus for this purpose.
  • Run Rufus and insert the flash drive you want to use as installation media. Then, click SELECT and choose the ISO file you downloaded. All the options will be filled in automatically.

using Rufus to create installation media for Linux

  • Click START, then click OK in the prompt that shows up. Let the process run its course and you’ll have created installation media for Linux.

Creating a partition to dual-boot Linux

Next, you’ll need to create a second partition on your drive for Linux. Partitions are like virtual divisions of a hard drive that are marked as different disks. For general use, partitions don’t have much of a purpose, but you do need them for dual-booting. Here’s how to create one.

  • Right-click your Start menu icon (or press Windows key + X on your keyboard) and choose Disk Management. You’ll see a list of your drives and partitions that should look something like this. Ignore the small partitions that are only a few MB in size. Those are system partitions required for Windows to work, and they’re not meant to be tampered with. You’ll want to focus on the largest partition.

List of disks and partitions in Disk Management on WIndows

  • To create a new partition, you’ll need to shrink the one you already have. Right-click your primary partition and choose Shrink Volume….
  • Specify the amount of space you want to remove from the partition. This will be limited by the files you already have stored on it, and the amount you enter will be the space you have for your Linux installation. You’ll want at least a couple dozen gigabytes (multiply by 1024 for MB) for it to function properly, but you can go as high as you see fit. Just make sure you have enough space on both Windows and Linux partitions.
  • The space you chose will be deducted from your partition and it will be listed as unallocated space in the Disk Management window. You can leave it as is and close the window.

Disk Management in Windows showing unallocated space after shrinking a partition

Installing Linux to dual-boot with Windows 11

Now you have the two main pieces of the puzzle, you’re ready to install Linux on your empty partition. If you removed the USB installation media from your PC, insert it again (remove other flash drives), then follow these steps:

  • Open the Start menu and then click the power button and – while holding Shift on your keyboard. Click Restart.
    • Alternatively, open the Settings app and go to System (in Windows 11) or Update & Security (in Windows 10), then choose Recovery, and then Restart Now next to Advanced startup.
  • You’ll be given a series of boot options. Click Use a device, then choose the USB flash drive you have inserted and your PC will boot from it.

Choosing a USB device to boot from

  • You’ll now be in the Ubuntu boot menu. Press Enter to boot into Ubuntu.
  • Ubuntu and other Linux operating systems let you try it out by booting from the USB drive and without installing it. To install Linux on your empty partition, click Install Ubuntu.

Options to install or try Ubuntu during the setup process

  • Follow the setup experience by choosing your keyboard layout and connecting to Wi-Fi (optionally). Choose your preferred options until you get to this page.

Choosing to install Ubuntu alongside Windows to dual-boot

  • Here, you’ll want to choose the first option that’s chosen by default, at least if you want the easiest way to do things. This will install Ubuntu on the unallocated space you created before, leaving your Windows installation intact.
  • From here, it’s mostly trivial stuff. Choose your region and set up your Ubuntu profile and the installation will begin. Once it’s done, you’ll be able to boot into Ubuntu without your USB flash drive.

Switching between Windows 11 and Linux

Once Linux is installed on your PC, you should be given the option to boot into it right away, but that might not happen. If your Windows partition is set as the priority in your BIOS settings, you’ll constantly boot into Windows instead. The behavior will vary depending on your computer, so you may not need to do anything.

If you do find yourself stuck in Windows 11 though, here’s what you can do:

  • Open the Settings app then click Recovery and then Restart now next to Advanced startup.
  • Click Troubleshoot and then Advanced options. Here, choose UEFI Firmware settings.
  • This will take you to your computer’s UEFI/BIOS settings. You may need to press one of the function keys to open the BIOS setup. Once you’re there, the process will vary depending on what PC you have. However, we’re looking for options related to booting. On the HP laptop we’re using here, you can find Boot options in the System Configuration tab.
  • Find an option related to boot order (UEFI Boot Order, in our example) and make sure the Linux drive is on top of the Windows drive. In our example, we have to select the OS boot Manager option, then use the F5/F6 keys to move Ubuntu to the top. Again, the process may vary by laptop, but the same principle should apply on any device.

Boot order in UEFI settings

  • Once that’s done, exit and save the changes. After a restart, you should see the Linux boot menu, which lets you continue into your Linux distribution or boot into Windows. You’ll see this menu every time you restart your computer so you can always choose your preferred boot option.

Ubuntu boot menu

That’s how you can dual-boot Windows 11 and Linux side-by-side. Dual-booting isn’t a perfectly elegant solution, but it’s the most viable way to have two operating systems that you plan on using regularly. Keep in mind you’ll need to find a way to transfer files between the two operating systems, such as by using a flash drive or cloud storage. Each OS can’t access the other’s boot drive, so you can’t just copy and paste files from one to the other.

If you ever want to go back to using just Windows 11, you can always use Disk Management to delete the partition you created and expand your main partition to take up the whole space. Otherwise, you can use GParted on Linux to delete the Windows partition instead. Either way, make sure to back up your data before doing that.

The post How to dual-boot Windows 11 and Linux on your PC appeared first on xda-developers.



from xda-developers https://ift.tt/2UJyptw
via IFTTT

No comments:

Post a Comment