Skip to content

Windows dual boot

Dual Booting NixOS and Windows - NixOS Wiki

Switch from RAID to AHCI

  • BIOS 可能默认启用 RAID。该模式下,其它系统无法识别被 Windows 绑定的硬盘。
  • 首先启用 Windows 安全模式,之后在 BIOS 内修改为 AHCI,一种热插拔的硬盘模式。
# - enable Safe Mode
bcdedit /set safeboot minimal
# - restart and enter BIOS 
# - change SATA Operation mode to AHCI
# - boot to Safe Mode
# - disable Safe Mode
bcdedit /deletevalue safeboot
# - reboot once more, AHCI automatically enabled

Remove other boot entries

  • Linux and Windows share a common /boot directory, which is of fat32 format
  • 如果需要移除 Linux 系统,则在 Windows 下修改 /boot 目录
# diskpart commands
# select disk partition containing boot
list disk
select disk 0
list partition
select partition 1
# assign a disk letter for the partition
assign letter=x
remove letter=x
# diskpart commands end

Mount Linux filesystem on WSL2

Access Windows filesystem on Linux

udisks - ArchWiki Steam under Linux - Valve Developer Community

  • /etc/fstab stores the file system configurations
  • display block devices and check device type - lsblk -f -fdisk -l`
  • display device uuid - blkid
  • if dmesg warns dirty, then clear dirty by - ntfsfix --clear-dirty /path/to/dev
  • temporarily mount - udisksctl mount -b /dev/somedevice - then it will be mounted at /run/media/USER/LABEL
  • Share steamapps from Windows with Linux - mount the respective disk - enable Proton on Steam and add the mounted disk
  • Enable NTFS support in NixOS, and also persistently mount to file system
boot.supportedFilesystems = ["ntfs"];

fileSystems."/path/to/mount/to" = {
    device = "/path/to/the/device";
    fsType = "ntfs3";
    options = ["rw" "uid=theUidOfYourUser"];
}

[!NOTE] Wine 和 Proton - 不建议在 wine 搭载 Windows 的系统盘,会导致潜在的 breaking change - 用户映射(权限) - 映射盘标 - 使用 ProtonUp-Qt 安装 Proton GE,比原版更好的兼容性 - 使用 ProtonTricks 安装依赖项