1

Alright, I'm totally stuck now. I'm complete newbie to Linux, but I tried to learn a bit. I made a bootable USB for CentOS 7 and made a dual-boot of CentOS with Windows 10. Soon I realized that I dont have enough space for my apps now, so I decided to remove CentOS. I read online that the easiest way to remove CentOS is to delete its partition, so I did that. For my storage problem, merged all my partitions into one (something I now regret). Now, when I start my computer, it says:

error: no such partition.

Entering rescue mode...

grub rescue>

I have no idea how to deal with this. I dont have a Windows recovery DVD since I installed Windows from bootable USB (which I used later to install CentOS). I still have the bootable CentOS USB. I tried a bit with the rescue mode, but nothing seems to work. I cant even install a fresh CentOS as I'll have to format my HDD for that. Is there, by some chance, any way I can get out of this?

PS: I dont have any other computer, so I cannot install anything on the USB.

2 Answers2

0

Since you don't have an ESP partition, I presume your computer is using the legacy BIOS boot and MBR partitioning scheme. When Linux is installed on MBR drives, most of the time its bootloader called GRUB is written into the Master Boot Record, or MBR for short (that's where this partitioning scheme's name comes from, more details about the boot process in this answer).

MBR is the first non-firmware piece of code executed when your computer boots up. GRUB looks for the Linux partition to load its configuration from a file located in the /boot directory. That file configures GRUB to let you choose between Linux and Windows.

Since the Linux partition is now gone, but GRUB is still installed in the MBR, it fails and enters the rescue mode. You may be able to boot into Windows by executing these commands in the rescue mode: (confirm each one with Enter and if you see any errors, let me know in the comments)

insmod chain
insmod ntfs
set root=(hd0,1)
chainloader +1
boot

(source)

Use these to boot into Windows. Next step is to restore Windows's MBR. Prepare a Windows install disk: you can download a handy tool from Microsoft that will download latest Windows 10 image and write it to a flash drive.

Use the Windows 10 flash drive to boot your computer. On the first screen (with a "Install Windows" button) press Shift+F10 to open Command Line. Type bootrec /fixmbr and press Enter. That should write original Windows MBR to your hard disk. Close all windows and remove the flash drive when PC reboots. Windows should boot correctly.

gronostaj
  • 58,482
-1

I've been used to it. The best thing to do is download BootRepairDisk. Boot your computer with it (on a bootable usb or dvd). It is easy like wizard in Windows (next, next, next) to recover your Windows system.