Recovering a Windows User's Deleted Linux Partition
If you've accidentally deleted your Linux partition on a dual-boot system, but haven't reset the Master Boot Record (MBR), you can still recover your data and restore your system to its original state. This article will guide you through the process, using a Ventoy Win64 ISO as an example.
1. Identifying the Problem
When you delete a Linux partition, the MBR is not automatically reset, and your system may enter GRUB rescue mode instead of booting into Windows. In this case, you'll see a command prompt with a "grub>" symbol.
2. Preparing a Recovery Tool
One way to recover your deleted Linux partition is by using a bootable USB drive with a recovery tool. In this example, we'll use the Ventoy Win64 ISO, which can be downloaded from the official website. After downloading, extract the ISO file and use a tool like Rufus to create a bootable USB drive.
3. Booting from the USB Drive
Restart your computer and boot from the USB drive. You may need to change the boot order in your BIOS settings to do this. Once you've booted from the USB drive, you'll see the Ventoy menu.
4. Recovering the Deleted Partition
From the Ventoy menu, select the option to run a Linux distribution. In this example, we'll use Ubuntu. Once Ubuntu has booted, open a terminal window and use the fdisk -l command to list the available partitions.
sudo fdisk -l
Identify the partition that corresponds to your deleted Linux partition. In this example, we'll assume it's /dev/sda5.
Next, use the fsck command to check the partition for errors:
sudo fsck /dev/sda5
After checking the partition, you can mount it using the mount command:
sudo mount /dev/sda5 /mnt
Finally, use the chroot command to change the root directory to the mounted partition:
sudo chroot /mnt
At this point, you can use the grub-install command to reinstall GRUB:
sudo grub-install /dev/sda
Replace /dev/sda with the name of your hard drive. You can find this by running the fdisk -l command again.
5. Rebooting the System
After reinstalling GRUB, you can exit the chroot environment and unmount the partition:
exit
sudo umount /mnt
Finally, restart your computer and remove the USB drive. Your system should now boot into Windows as usual, and you should be able to access your Linux partition from the Windows file explorer.
- Identify the problem: If you've accidentally deleted your Linux partition but haven't reset the MBR, your system may enter GRUB rescue mode.
- Prepare a recovery tool: Use a bootable USB drive with a recovery tool, such as the Ventoy Win64 ISO.
- Boot from the USB drive: Change the boot order in your BIOS settings to boot from the USB drive.
- Recover the deleted partition: Use the
fdisk,fsck,mount, andchrootcommands to check and mount the partition, and reinstall GRUB. - Reboot the system: After reinstalling GRUB, restart your computer and remove the USB drive.