[info] How to install Windows and preserve GRUB

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
782
Reaction score
638
Credits
4,964
For whatever reason you might have to have a dual boot with Windows (just like I have to - because of the gaming keyboard whose keys can be reprogrammed only in Windows) but there's always the problem with GRUB being wiped out by the Windows installer. Until now! I found a way to install Windows and preserve GRUB, so you won't have to run a Linux live environment to fix it.

But before start following the instruction, make sure you have backed up all the files from the disk on which you're going to install Windows bc the following operations are done to the whole device, not to a single partition!

Boot Windows Setup from a DVD disk or a USB stick and when asked what you wanna do, click on "Advanced". This will lead you to a screen listing all the storage devices you have in your computer. On this screen press SHIFT+F10 to bring up Command Prompt and type the commands inside the red rectangles in this image:

windows-setup-error.png


Note 1: before you type "select disk X" make sure that this is the disk on which you want to install Windows. There's no going back if you select the wrong disk.
Note 2: once xcopy has finished copying the files, remove the DVD/the USB stick and reboot. From the BIOS/UEFI boot menu choose the device on which you have just copied the files. This will start the windows installer and just like in the beginning choose "Advanced" to get to the devices screen. Only this time do not touch anything but simply click "Next". Clicking "Next" will bring up the screen where it reads "preparing files for installation" or "expanding files" or something similar. During that process Windows will reboot twice and both times you'll have to choose a device to boot from the BIOS/UEFI boot menu. After the second time you should see the Windows desktop.

Once you can see the desktop, reboot and boot the device where GRUB is in order to see that GRUB is intact. The only change you'll have to do at this point is to run Grub Customizer and have it recheck for additional operating systems.
 

Staff online

Members online


Top