B
B
Bogdan1002021-04-14 20:40:41
linux
Bogdan100, 2021-04-14 20:40:41

How to restore windows through grub?

Hello, I divided the hard drive into volumes: one is windows 7, and the other is linux. As a result, I accidentally deleted a partition in linux, namely the partition on which this linux stands ... After rebooting, I got this "heresy":

error: no such partition. 
grub rescue>

what to do ? I changed my mind about using Linux, I want to go back to windows... can I somehow remove this grub and load windows? I have one laptop, but you can’t hope for a bootable USB flash drive - it’s empty)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
mobich, 2021-04-15
@Bogdan100

I'm even embarrassed to ask HOW you can accidentally delete a partition?!! :O
After grub rescue> start typing commands:
ls
Shows disk partitions like this: (hd0) (hd0,msdos5) (hd0,msdos2)...
You need to find the bootloader partition. Since you deleted the partition, first try typing: set after ls . If after that you see something like: cmdpath=(hd0) prefix=(hd0,msdos3)/boot/grub root=hd0,msdos3 , you're in luck... Next, instead of msdos3 , you substitute in the commands what will show you. I will write ... , replace it with your own. set boot=(hd0,msdos...) set prefix=(hd0,msdos...)/boot/grub



insmod normal
normal

And after each command, do not forget to press Enter, otherwise you never know what ... :)
Now GRUB should load , and you will get into Windu.
In Windows, type cmd and then in the console (or whatever you call it):
bootrec /fixmbr
bootrec /fixboot

If bootrec.exe is not installed "by default" in Windows, download and install it. So when you reboot, you will immediately get into Windows.
Dare! Good luck...

N
Nadim Zakirov, 2021-04-14
@zkrvndm

I'm afraid you can't restore anything without a bootable flash drive.
https://remontka.pro/vosstanovlenie-zagruzchika-wi...

O
Oleg Volkov, 2021-04-16
@voleg4u

Grub rescue means that all other rough modules were on the erased partition.
Only booting from the Windows installation disk and selecting "repair boot" will help. Better read about it before zapuak - you need to run 3 commands, and Windows will be restored.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question