Skip to content

Instantly share code, notes, and snippets.

@dodycode
Last active March 14, 2026 15:04
Show Gist options
  • Select an option

  • Save dodycode/d53ded211d49b6d63a9e350547934818 to your computer and use it in GitHub Desktop.

Select an option

Save dodycode/d53ded211d49b6d63a9e350547934818 to your computer and use it in GitHub Desktop.
Dual Boot CachyOS + Windows LTSC Guide

Dual Boot CachyOS + Windows LTSC Guide

Step 1: Clean Up Gaming Stuff from CachyOS

Free up space by removing Steam, Proton, and gaming-related packages.

# 1. Remove meta packages first (to avoid dependency errors)
sudo pacman -Rns cachyos-gaming-meta cachyos-gaming-applications

# 2. Remove Steam and all gaming packages
sudo pacman -Rns steam mangohud lib32-mangohud gamemode lib32-gamemode \
  gamescope protontricks protonup-qt proton-cachyos-slr umu-launcher steam-devices

# 3. Remove ALL Steam data (games, Proton prefixes, configs, symlinks)
rm -rf ~/.local/share/Steam
rm -rf ~/.steam

# 4. Remove Mesa shader caches
rm -rf ~/.cache/mesa_shader_cache
rm -rf ~/.cache/mesa_shader_cache_db

Note: pacman -Rns may warn about packages not being installed — that's fine, skip those.

Step 2: Current Disk Layout and Bootloader

Detected:

Partition Size Type Mount
/dev/nvme0n1p1 300 MB vfat (EFI) /boot/efi
/dev/nvme0n1p2 476.6 GB btrfs / (subvol @)
  • Drive: Samsung MZVLB512HBJQ (476.9 GB NVMe)
  • Bootloader: GRUB (/EFI/cachyos/grubx64.efi)
  • Btrfs subvolumes: @ (root), @home, @root, @srv, @cache, @tmp, @log

Step 3: Shrink Linux Partition (from Live USB)

Boot from a CachyOS or Arch live USB — you cannot resize a mounted filesystem.

Option A: GParted (GUI)

GParted supports btrfs shrink and handles both filesystem + partition resize in one operation.

  1. Boot into live USB
  2. Install GParted if not available: sudo pacman -S gparted
  3. Open GParted, select /dev/nvme0n1
  4. Right-click /dev/nvme0n1p2Resize/Move
  5. Shrink it by ~100 GiB (drag the handle or type the new size)
  6. Click Apply

Warning: There are reported cases of btrfs corruption after GParted resize. Do NOT combine move + resize in a single operation — only resize. Back up important data before proceeding.

Option B: Command Line (safer)

# 1. Mount the filesystem (any subvolume works for resize)
sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt

# 2. Check available space — you need at least 100 GiB free
sudo btrfs filesystem usage /mnt

# 3. Shrink filesystem with safety margin (110G instead of 100G)
sudo btrfs filesystem resize -110G /mnt

# 4. Verify new size
sudo btrfs filesystem usage /mnt

# 5. Unmount
sudo umount /mnt

# 6. Note the exact start sector of partition 2
sudo fdisk -l /dev/nvme0n1

# 7. Shrink partition by 100G using fdisk
#    - Delete partition 2
#    - Recreate with SAME start sector, but 100G less size
#    - Do NOT remove the btrfs signature when prompted
sudo fdisk /dev/nvme0n1

# 8. Remount and expand filesystem to fill new partition
sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt
sudo btrfs filesystem resize max /mnt

# 9. Final verification
sudo btrfs filesystem usage /mnt
sudo umount /mnt

The safety margin (shrink filesystem by 110G, partition by 100G, then resize max) ensures the partition boundary never cuts into the filesystem.

Step 4: Create Windows LTSC Bootable USB

  • Get the Windows LTSC ISO
  • Flash with Ventoy — just copy the ISO to the Ventoy USB drive
  • Create TPM/Secure Boot bypass config on the Ventoy USB:
// ventoy/ventoy.json
{
  "control": [
    { "VTOY_WIN11_BYPASS_CHECK": "1" }
  ]
}

This bypasses TPM, Secure Boot, CPU, and RAM checks during Windows 11 installation.

Step 5: Verify Boot Mode

Confirmed: UEFI (/sys/firmware/efi exists). Windows must be installed in UEFI mode (not Legacy/CSM).

Step 6: Install Windows

  1. Boot from the Windows USB
  2. Choose Custom install
  3. Select the unallocated space — do NOT touch Linux partitions
  4. Windows will automatically create MSR (~16 MB) + Recovery (~500 MB) + Primary (C:) partitions in that space — this is normal
  5. Complete the installation

Your existing 300 MB EFI partition will be reused by Windows. It will add EFI/Microsoft/ alongside the existing EFI/cachyos/ — GRUB files are NOT deleted. Windows will change the UEFI boot order to boot itself first.

Step 7: Post-Install Windows Tweaks

Run all from an elevated (admin) command prompt:

# Disable hibernation + fast startup (saves 6-13 GB)
powercfg /h off

# Fix clock skew between Windows and Linux
# (Windows uses local time, Linux uses UTC — causes clock jump on OS switch)
reg add "HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /t REG_DWORD /d 1 /f

# Disable automatic repair (can interfere with dual-boot)
bcdedit /set {current} recoveryenabled no

Step 8: Restore GRUB

Windows will set itself as the default boot entry, bypassing GRUB. Boot back into CachyOS via live USB, then:

# Mount all btrfs subvolumes
sudo mount -o subvol=/@,noatime,compress=zstd /dev/nvme0n1p2 /mnt
sudo mount -o subvol=/@home,noatime,compress=zstd /dev/nvme0n1p2 /mnt/home
sudo mount -o subvol=/@root,noatime,compress=zstd /dev/nvme0n1p2 /mnt/root
sudo mount -o subvol=/@srv,noatime,compress=zstd /dev/nvme0n1p2 /mnt/srv
sudo mount -o subvol=/@cache,noatime,compress=zstd /dev/nvme0n1p2 /mnt/var/cache
sudo mount -o subvol=/@tmp,noatime,compress=zstd /dev/nvme0n1p2 /mnt/var/tmp
sudo mount -o subvol=/@log,noatime,compress=zstd /dev/nvme0n1p2 /mnt/var/log
sudo mount /dev/nvme0n1p1 /mnt/boot/efi

sudo arch-chroot /mnt

# Install ntfs-3g so os-prober can detect Windows
pacman -S ntfs-3g

# Uncomment os-prober in GRUB config
sed -i 's/#GRUB_DISABLE_OS_PROBER=false/GRUB_DISABLE_OS_PROBER=false/' /etc/default/grub

# Reinstall GRUB
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=cachyos

# Regenerate GRUB config (should now detect Windows)
grub-mkconfig -o /boot/grub/grub.cfg

# Verify boot entries
efibootmgr

exit
sudo umount -R /mnt
sudo reboot

Alternative: CachyOS live ISO includes cachy-chroot which auto-mounts everything from fstab. Run sudo cachy-chroot instead of the manual mount steps above.

Step 9: Verify

After reboot, GRUB should show both CachyOS and Windows. Pick either at boot.

Known Issues

Windows 11 24H2 deletes GRUB boot entry

Windows 11 LTSC is based on 24H2, which has been reported to delete the GRUB EFI boot entry on every boot. If this happens:

  • Use BIOS boot menu (F12/F2) to select CachyOS manually
  • Re-run efibootmgr from CachyOS to re-add the entry
  • Consider switching to systemd-boot (CachyOS supports it) — reported to survive 24H2 reboots better than GRUB

SBAT Secure Boot issue

A 2024 Windows security update broke Linux booting on some dual-boot systems with "Security Policy Violation" errors. This was fixed in May 2025 patches — make sure your LTSC install is up to date.

Storage Budget

Component Size
Windows 11 LTSC clean install ~30 GB
Pagefile ~4-8 GB
The Crew Motorfest ~42 GB
Total ~76 GB

100 GB partition gives comfortable room.

NVMe Partition Layout — Samsung 476.9 GB

Date: 2026-03-14 Device: /dev/nvme0n1 (512,110,190,592 bytes / 476.94 GiB)

Current Layout

# Partition Size Type Label Mount
p1 EFI 300 MiB vfat /boot/efi
p2 CachyOS 376.64 GiB btrfs /
p3 MSR 16 MiB Microsoft reserved partition
p4 Windows 99.22 GiB ntfs Basic data partition
p5 Recovery 775 MiB ntfs
[ EFI 300M ][ CachyOS btrfs 376.6G ][ MSR 16M ][ Windows 99.2G ][ Recovery 775M ]

The Plan — Create a D: Drive for Games

Goal: Shrink CachyOS by ~80 GiB and create a new NTFS partition for games. Windows handles the new drive creation via Disk Management.

No partition moving, no boot risk, no bootloader repair needed.

Before: [ EFI ][ CachyOS 376.6G ][ MSR ][ Windows C: 99.2G ][ Recovery ]
After:  [ EFI ][ CachyOS ~296G ][ Games D: ~80G ][ MSR ][ Windows C: 99.2G ][ Recovery ]

Step 1: Shrink btrfs filesystem (from running CachyOS)

btrfs supports online shrink — do this while still booted into CachyOS:

sudo btrfs filesystem resize -80G /

# Verify (~116 GiB free remaining)
btrfs filesystem usage /

Step 2: Boot CachyOS live USB

Reboot into the live USB (Ventoy: ~/Games/cachyos-desktop-linux-260308.iso). The btrfs partition must be unmounted to resize it.

sudo umount -R /mnt 2>/dev/null
lsblk /dev/nvme0n1  # verify no mountpoints

Step 3: Backup partition table

sudo sfdisk --dump /dev/nvme0n1 > ~/partitions-backup.dump

To restore if anything goes wrong: sudo sfdisk /dev/nvme0n1 < ~/partitions-backup.dump

Step 4: Shrink btrfs partition (p2)

# Note the start sector of partition 2
sudo fdisk -l /dev/nvme0n1

# Shrink partition — delete and recreate with same start sector, smaller size
sudo fdisk /dev/nvme0n1
# d → 2          (delete partition 2)
# n → 2          (new partition)
# Enter           (same start sector — MUST match the original)
# +296G           (new size, ~80 GiB smaller than original 376.6G)
# N               (do NOT remove the btrfs signature)
# w               (write and exit)

# Expand filesystem to fill the new smaller partition (closes any gap from rounding)
sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt
sudo btrfs filesystem resize max /mnt
sudo umount /mnt

Step 5: Boot Windows — Create D: drive via Disk Management

  1. Boot into Windows
  2. Win + Rdiskmgmt.msc
  3. You'll see ~80 GB of Unallocated space on the disk
  4. Right-click the unallocated space → New Simple Volume
  5. Follow the wizard: use full size → assign drive letter D: → format as NTFS
  6. Install The Crew Motorfest to D:

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment