Skip to content

Instantly share code, notes, and snippets.

@pslind69
Created October 25, 2025 12:16
Show Gist options
  • Save pslind69/f6241be6424a31e1927d54a18e902c44 to your computer and use it in GitHub Desktop.
Save pslind69/f6241be6424a31e1927d54a18e902c44 to your computer and use it in GitHub Desktop.
Dual-Boot + SEV/Virtualization-Ready Setup Guide

🧩 Dual-Boot + SEV/Virtualization-Ready Setup Guide (2025 Edition)

Goal:
Linux as your daily driver 🐧
Windows 11 isolated on its own NVMe βš”οΈ
Secure Encrypted Virtualization (SEV/VT-d) for encrypted VMs πŸ›‘οΈ

Works perfectly for systems with:

  • 2 Γ— NVMe drives
  • Modern AMD or Intel CPU (Ryzen 5000/7000 or Intel 12th–15th Gen)
  • Dedicated GPU (Radeon / RTX / Arc)

🟩 Phase 1 β€” Hardware / Firmware Prep

Step Action Purpose
1 Enter UEFI β†’ Advanced β†’ CPU Configuration β†’ enable SVM (AMD) or VT-x (Intel) + IOMMU/VT-d Turns on virtualization
2 (AMD only) Enable SEV, TSME, and SME if available Enables memory encryption
3 Plug in only the first NVMe (for Linux) Prevents Windows installer from seeing it later
4 Boot Linux installer (Fedora, Nobara, Pop!_OS, etc.) Start main OS install
5 Create partitions: EFI (512 MB), root (ext4/btrfs), swap Clean Linux layout
6 Finish install β†’ reboot to confirm boot works Linux EFI verified
7 Shut down PC and unplug the Linux NVMe Keeps Windows from overwriting GRUB

πŸ’‘ Why: This keeps both operating systems physically separated β€” Linux will get its own EFI and Windows will never know it exists.


🟦 Phase 2 β€” Windows Install on Isolated Drive

Step Action Purpose
8 Plug in second NVMe Dedicated drive for Windows 11
9 Boot Windows 11 installer β†’ delete all partitions Fresh layout
10 Let Windows create its own EFI/MSR/NTFS partitions Keeps boot records separate
11 Complete setup β†’ disable Fast Startup + Hibernation (powercfg /h off) Prevents NTFS corruption in dual-boot
12 In Disk Management, confirm only Windows partitions exist Ensures isolation
13 Shut down β†’ reconnect Linux NVMe Ready for dual-boot setup

πŸ’‘ Why: Windows has no shared EFI or boot partition, so updates can’t overwrite Linux boot files.


🟧 Phase 3 β€” Linux Bootloader Repair & Integration

Step Action Purpose
14 Boot into Linux (via BIOS boot menu, e.g., F8 on ASUS) Manual Linux boot
15 Run sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg (or distro equivalent) Detects Windows automatically
16 If Windows not detected β†’ sudo os-prober && sudo update-grub Adds Windows EFI entry
17 Reboot β†’ verify both Linux + Windows appear in GRUB menu Dual-boot ready
18 Set Linux drive as first boot device in UEFI Linux becomes default OS

πŸ’‘ Why: Linux’s GRUB will now boot both systems cleanly, without touching Windows EFI.


πŸŸͺ Phase 4 β€” SEV / SME Verification (AMD) or VT-d (Intel)

Step Action Purpose
19 sudo dnf/apt install qemu-kvm libvirt virt-manager edk2-ovmf git Install virtualization stack
20 git clone https://github.com/AMDESE/amd-sev-tool.git && cd amd-sev-tool && make Build SEV utility
21 sudo ./sevctl status Verify firmware SEV support
22 `lscpu grep "Encryption"anddmesg
23 Test VM: qemu-system-x86_64 --enable-kvm --machine q35,sev=on ... Confirm SEV active
24 Dump VM RAM β†’ should be ciphertext Confirms memory encryption working

πŸ’‘ Why: SEV/SME protect VM and swap memory from inspection, even by the host OS β€” perfect for secure sandboxed Windows or other VMs.


πŸŸ₯ Phase 5 β€” Sanity, Backup, and Security

Step Action Purpose
25 efibootmgr β†’ list boot entries Useful for troubleshooting
26 Backup EFI partitions with dd if=/dev/nvme0n1p1 of=linux_efi.img Quick recovery option
27 Disable β€œFast Boot” in UEFI Prevents EFI boot-order chaos
28 Optional: sudo chattr +i /boot/efi/EFI Makes GRUB immutable
29 Use timeshift or btrfs snapper for Linux snapshots Safe system rollback

πŸ’‘ Why: Small preventive steps make this setup nearly bulletproof β€” even a failed Windows update can’t touch Linux.


🧠 Why This Protects Against Windows Interference

1️⃣ Separate drives β†’ Windows EFI is on its own disk.
2️⃣ Linux boots first β†’ GRUB controls boot, not Windows.
3️⃣ Windows β€œblindness” β†’ It never sees Linux partitions.
4️⃣ SEV/SME encryption β†’ Even virtualized Windows memory stays private.
5️⃣ Immutable GRUB β†’ Windows updates can’t overwrite your bootloader.

πŸ’‘ In short: Windows can’t nuke your Linux β€” ever again.


πŸ”’ Optional: Windows Quarantine Mode

Keep Windows from even seeing Linux disks:

reg add "HKLM\SYSTEM\CurrentControlSet\Services\mountmgr" /v NoAutoMount /t REG_DWORD /d 1 /f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment