You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

删除Linux分区后Grub rescue模式无法退出且无法启动系统求助

Fixing Grub Rescue Mode After Deleting Linux Partitions on Windows

Hey there, let's get you out of this frustrating Grub rescue loop and back into your Windows system. I’ve walked through this exact scenario with dozens of users who wiped their Linux partitions and got stuck here—here are the most reliable solutions:

This is the surest way to permanently fix the issue by overwriting the leftover Grub bootloader with Windows' native boot files:

  • Grab a Windows installation USB or DVD that matches your current Windows version (e.g., Windows 10/11). Plug it into your device and restart, booting from the installation media (you might need to press F2/F10/Del to access BIOS/UEFI boot menu and select the USB/DVD).
  • When you reach the "Install Windows" screen, don’t click "Install now"—instead, click "Repair your computer" in the bottom-left corner.
  • Navigate to Troubleshoot > Advanced options > Command Prompt.
  • In the command prompt window, run these commands one by one, pressing Enter after each:
    • bootrec /fixmbr — Overwrites the master boot record to remove Grub
    • bootrec /fixboot — Repairs the boot sector of your Windows partition
    • bootrec /scanos — Scans your drive for all Windows installations
    • bootrec /rebuildbcd — Reconstructs the boot configuration data file. When prompted to add the found Windows installation to the boot list, type Y and press Enter.
  • Once all commands finish, restart your computer and remove the installation media. Your system should boot directly into Windows now.

Method 2: Temporary Boot from Grub Rescue (If No Installation Media Is Available)

If you can’t get your hands on a Windows installation drive right away, you can try manually booting into Windows from the Grub rescue prompt. Note this is a temporary fix—you’ll still need to use Method 1 later to fully resolve the issue:

  • At the grub rescue> prompt, first run ls to list all available partitions. You’ll see entries like (hd0,1), (hd0,2), etc.
  • Test each partition to find your Windows system drive by running ls (hd0,X)/ (replace X with the number from the list). Keep trying until you see output that includes the Windows folder—this is your target partition.
  • Once you’ve found the correct partition, run these commands (replace X with your partition number):
    • set root=(hd0,X)
    • set prefix=(hd0,X)/boot/grub (If this throws an error, try set prefix=(hd0,X)/grub or set prefix=(hd0,X)/boot/grub2—this varies by system)
    • insmod normal
    • normal
  • If all goes well, you’ll load into the Grub menu. Select your Windows boot option to start the system. Remember to follow Method 1 later to avoid hitting Grub rescue again on reboot.

Quick Notes to Avoid Future Issues

  • Double-check your BIOS/UEFI boot order after fixing—make sure your Windows hard drive is set as the first boot device.
  • If your system uses UEFI mode, ensure you boot the Windows installation media in UEFI mode (not Legacy/BIOS) for the repair to work correctly.
  • Since you’ve had Grub rescue issues before, it’s worth verifying your hard drive partitions with Windows’ Disk Management tool to ensure no corrupted or unallocated partitions are causing boot conflicts.

内容的提问来源于stack exchange,提问作者ephemeral

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:43:18