How to replace GRUB boot loader, from within Windows?
I have dual boot (Debian and Windows XP), and the boot is from GRUB. I want to remove Linux and grub, and restore the Windows boot. However, I cannot use installation CD to restore the MBR. Thus, I want to restore Windows boot from inside the Windows. There is a software called EasyBCD
, but it works for Windows Vista/7 bootloader, and does not work with Windows XP standalone.
Is there a similar program for Windows XP or a method to do so safely from within the Windows environment?
NOTE: My problem is that this is an old computer which does not boot from USB and has a broken CD drive. Thus, if corrupting boot loader, there should be a long way to recover the computer.
Solution 1:
As far as you can boot Windows use the following command at the Windows command prompt:
fdisk /mbr
then don't forget to set the active partition
Solution 2:
The most simple way would be to use a Windows PE (Preinstalled Environment). It doesn't matter which version, as it is standalone like a Linux-Live-environment.
While you can do it by hand it would require at least Windows 7 which you do not have.
You have two options to get a recovery-environment:
A. Try to use Macrium Reflect Free - it has an option to create a Windows PE-based Recovery on an USB-flash-drive. Be aware that you have to register to download it, as the download link will be send to the given email-address. Make sure to search for information if the application does at all run on Windows XP. Make sure you have at least 2GB free space on your hard drive to download the Windows-PE-image.
Note: IF the application is supported to run under Windows XP you may utilize the built-in Boot-Repair-tool directly from inside Windows XP.
B. Burn a Windows-PE or a Windows-Installer .iso
onto a USB-flash-drive. You can do this for example with Rufus, which is a standalone tool to write disk-images to USB flash drives under Windows.
An example for a customized Rescue-Live-system based on Windows PE is Hiren's Boot-CD - the actual version is based on the latest stable Windows release and it is created according to the legal guidelines of Microsoft for use of Windows PE.
If you wish to use a full Windows-Installer ISO you should use the Windows 10 32-bit Installer. You can find german, as well as english versions, either original or with applied updates on DeskModder. The provided files do not have any modifications - asides from the official patches applied in the patched versions.
Once you have such a USB-Flash-drive created and booted into it you can follow procedure to either use the built-in Windows tools like diskpart, fdisk, fixmbr, fixboot, bcdboot, bcdedit or by utilizing the automatic system-boot-repair contained in the Windows-Installer. Hiren's Boot CD offers a palette of utilities to perform boot repairs assisted/automagically. Macrium Reflect Free's custom Windows PE also contains a Boot-repair.
If you make use of the Windows-internal tools, namely bcdboot/bcdedit, you have the option to write a classic NT-Boot-Loader instead of the BCD-based bootmgr
as is standard since NT 6 (Longhorn/Vista and up). But it does not affect performance if you choose to use the modern variant, as it will simply chainload the classic NTLDR
, while allowing you to create other boot options similar to GRUB.
There are other options as well, but to stay on the SuperUser-side of things this is surely the sane approach.
If you give more specifics it may be possible to direct you to a precise solution.