删除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:
Method 1: Use Windows Installation Media to Repair the Bootloader (Recommended)
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 Grubbootrec /fixboot— Repairs the boot sector of your Windows partitionbootrec /scanos— Scans your drive for all Windows installationsbootrec /rebuildbcd— Reconstructs the boot configuration data file. When prompted to add the found Windows installation to the boot list, typeYand 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 runlsto 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)/(replaceXwith the number from the list). Keep trying until you see output that includes theWindowsfolder—this is your target partition. - Once you’ve found the correct partition, run these commands (replace
Xwith your partition number):set root=(hd0,X)set prefix=(hd0,X)/boot/grub(If this throws an error, tryset prefix=(hd0,X)/gruborset prefix=(hd0,X)/boot/grub2—this varies by system)insmod normalnormal
- 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
相关产品推荐
相关产品推荐

