Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SelynCatto/20834efa61ccfc5bcbfd1d8a1bb0fd71 to your computer and use it in GitHub Desktop.
Save SelynCatto/20834efa61ccfc5bcbfd1d8a1bb0fd71 to your computer and use it in GitHub Desktop.
Notes and guides on how to install arch and windows on the same partition.

Experimental Guide: Installing Arch Linux alongside Windows 10 while sharing a root partition.

Disclaimer: This guide is highly experimental and may encounter issues. Please proceed with caution and at your own risk. Once you've used ntfs2btrfs, the Microsoft Store may be broken as appx packages require NTFS. Unless you find a way to fool it or bypass the check, you can't install more appx packages.

There is also an issue where graphical components such as acrylic blur in Windows desktop apps won't work, GPU acceleration should still work properly in games etc.

By @ItsLynix

Recommendations

  • It is recommended that you use a tool such as Ventoy which you can get from here as it allows you to have multiple ISOs on the same USB drive with an easy to use boot menu for access, this allows you to quickly switch between utilities as we do in this guide.
  • It is also recommended that you put the following isos on the drive: Arch ISO, GParted Live, alongside the Windows 10 ISO.
  • The Quibble bootloader we will be using ONLY SUPPORTS WINDOWS 10 22H2 AT MOST AT THIS TIME. DO NOT ATTEMPT WINDOWS 11.

Guide Tree

Prerequisites

  1. Install Windows 10: Follow the instructions provided by Microsoft to install Windows 10 on your computer, make sure the drive is clean and when installing you can just click the unallocated space and click continue, no need to press "New", you can get the ISO here image
  2. Disable Hibernation: Open the command prompt as an administrator and type powercfg /h off to disable hibernation.

Windows Configuration

  1. Download Microsoft Store apps: Download all the Microsoft Store apps you need since you won't be able to install more when it's btrfs.

  2. Install winbtrfs driver: Install the winbtrfs driver to enable btrfs support on Windows. You can download it from here. image image image

  3. Shrink the NTFS partition: Use the Disk Management tool (Search for "Create and Format" in the start menu) to shrink the NTFS partition by 1 GB plus the desired size for the Linux swap. I've used 1 + 4 GB, 1 GB = 1024, 5x1024. image

Preparing for the dual boot and Linux

  1. Boot an Arch ISO: Boot the Arch Linux ISO you were recommended to download and wait till you get to the root@archiso $ prompt. As you can see, I got to the prompt and used loadkeys to set up the correct keyboard layout. image

  2. Mount Windows EFI partition: Mount the Windows EFI partition using the following command: mount /dev/sda1 /mnt/efi. (Remember to create the mountpoint first, and you can use fdisk -l to see what /dev you need instead of /dev/sda etc.) image

  3. Extract the quibble bootloader: Extract the quibble bootloader into the Windows EFI partition. Now, you need to download the Quibble bootloader zip, first use pacman to sync sources and install wget and unzip, pacman -Sy && pacman -S wget unzip, once installed, right click the zip file of Quibble from here and copy its link, then download it wget LINKTOFILE, cd into the mountpoint where the EFI partition is mounted, then run unzip PATH/TO/ZIP, it should look like this in the end: image

Btrfs Conversion

  1. Convert NTFS to btrfs: Use the ntfs2btrfs tool to convert the NTFS partition to btrfs. Please note that this will break the Microsoft Store as appx packages require NTFS. In order to get hold of ntfs2btrfs, we need to get access to the aur, we will use chaotic-aur. Follow the instructions here then do the following: pacman -Sy ntfs2btrfs and once installed, assuming Windows is on the third partition of /dev/sda, run ntfs2btrfs /dev/sda3. image

Configuring Bootloader

  1. Create a boot entry for quibble: Use efibootmgr to create a boot entry for quibble. If quibble is located in the first partition of the drive with an EFI file in /amd64/quibble.efi, you can use the following command: efibootmgr -c -d /dev/sda -p 1 -L "Quibble" -l /amd64/quibble.efi. image

  2. Enable CSM in BIOS: Enable/Disable CSM in BIOS to ensure GPU drivers continue working (optional but highly recommended). You can do this from your UEFI bios.

Setting up Windows

  1. Boot Windows using quibble: Boot Windows using quibble, simply reboot, open your boot menu, and use the "Quibble" entry. image

  2. Re-enable NTFS, fastfat, and exfat drivers: Re-enable NTFS, fastfat, and exfat drivers by opening an elevated command prompt, and running sc start NAMEHERE, replacing NAMEHERE with the respective name of the drivers. image

  3. Permanently re-enable drivers: Use regedit to permanently re-enable the drivers in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NAMEHERE by setting Start to 1. image image

  4. Verify Windows works: Verify that Windows works as expected.

  5. Partition the unused space: Use GParted Live ISO (recommended) to partition the unused space we left to make a 1GB FAT32 volume for the Linux bootloader and the desired swap space. First, I'm making a 4 GB swap partition, image image And with the rest, create a fat32 partition. image Click the green checkmark, and apply the changes. image

Arch Linux Installation

  1. Install Arch onto the same partition: Once again, boot the arch ISO and wait till you get to the command prompt. Then use loadkeys to set up your keyboard layout etc. Once done, we're ready to start installing Arch. First sync pacman's sources with pacman -Sy then mount the windows/root partition to mnt with mount /dev/sda3 /mnt, now it's time to install the base packages.

Run the following command, you can add any packages you want to the line as long as they can be built in chroot (most of them other than dkms drivers.) pacstrap /mnt base linux linux-firmware nano sudo and patiently wait for it to install, press y on any prompts.

Now it's time to generate an fstab for arch, simply run genfstab -U /mnt >> /mnt/etc/fstab, and finally enter the new system with arch-chroot /mnt.

Configure the system as shown below:

# Set the time zone
ln -sf /usr/share/zoneinfo/Europe/Stockholm /etc/localtime

# Set the Hardware Clock from the System Clock, and update the timestamps in /etc/adjtime.
hwclock --systohc

# Uncomment desired locales
nano /etc/locale.gen
# Generate the locales
locale-gen

# Create the hostname
echo arch > /etc/hostname

# Set the root password
passwd
  1. Install GRUB onto the FAT32 partition: It's time to install Linux's bootloader. Still in arch-chroot, run pacman -S grub efibootmgr and create the efi mountpoint mkdir /boot/efi.

Now find the fat32 partition we made earlier by using fdisk -l, most likely its /dev/sda6, mount it with mount /dev/sda6 /boot/efi.

Install grub to it with grub-install --target=x86_64-efi --efi-directory=/boot/efi and generate the config grub-mkconfig -o /boot/grub/grub.cfg

And there we go, arch is now bootable and you have two working boot entries to start either arch or windows. (Ignore Windows Boot Manager), simply run exit and reboot and then boot from Arch, but you may want some more things, here's some extra optional steps.

  1. (OPTIONAL) Make your own user and get sudo: Good for daily use. Run these commands in order to make a user:
useradd -m YOURNAME
passwd YOURNAME
usermod -aG wheel YOURNAME

Now you need to give yourself actual sudo privileges, run EDITOR=nano visudo find "# %wheel ALL=(ALL" and uncomment it. Save the changes and you're done.

  1. (OPTIONAL) Install a desktop environment: KDE for example. Install KDE Plasma, SDDM and its components with the following command. pacman -S xorg sddm plasma plasma-wayland-session kde-applications networkmanager now enable sddm and network manager! systemctl enable sddm.service systemctl enable NetworkManager.service Now reboot and you should find yourself booting up to the sddm display manager, have fun looking at the Windows files in your root dir in Dolphin! image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment