▷ Repair grub after grub rescue error when removing linux
Table of contents:
- Repair grub with grub rescue if we have not uninstalled Linux
- Repair grub with Windows 10 USB
- Repair MBR to boot Windows 10 or any other version of Windows
- Repair MBR with diskpart (recommended option)
When we do dual boot on our computer with the Windows system and another Linux system, it happens that, when deleting the partition of the latter system, the error of “ No such partition ” or another “ unknown filesystem ” problem appears and a command line appears With grub, make sure that we recover the grub and we can continue working with the system that remains on our hard drive. But how can we recover the grub or the mbr ? Deleting is very easy, but to recover it we must know how to perform certain tasks in command mode in order to reinstall it.
Index of contents
That is why in this article we will see how to repair the grub or mbr of our computer using grub rescue and other methods of Windows. This is the small disadvantage of having a dual boot and then removing one of the operating systems.
Repair grub with grub rescue if we have not uninstalled Linux
This solution is applicable if the message that we will find on the screen when starting the computer will be the following: " Error: unknown filesystem entering rescue mode..."
If the case at hand is having obtained this error after reinstalling the Windows operating system, and we still have Linux installed on our computer, it will be possible to repair the grub using grub rescue
To do this we must write the following commands in the grub rescue promt:
ls
It shows us the hard drives and partitions of our computer. We must identify the hard drive as (hd0) and each of the partitions as (hd0, msdos1), (hd0, msdos2), etc.
It is possible that depending on the version of the grub this representation changes, for example, we could see (hd0, 1).
So we should write the following command:
ls (hd0, msdos We will repeat this process until we identify Linux's own file system. In the case a message will appear like “ Filesystem is ext4 ” When we have identified it, we will write the following command: Set root = (hd0, msdos Then: set prefix = (hd0, msdos Now: normal insmod
And finally: normal
Now we will have recovered the Linux grub to boot our operating systems. But this is not all, now we will have to boot our Linux system and enter a command terminal to write the following: sudo update-grub
And then: I upload grub-install / dev / sda
We put our users password to reinstall the grub and it does not give us any problems again When we directly format the partition where our Linux operating system was, when booting from our computer we will get a nice message on a black screen that says the following: " error: no such partition entering rescue mode grub rescue ". This will normally be accompanied by a countdown and an explosion of our computer… or perhaps not. The case is that this has a solution without the need to completely format our hard drive and therefore also eliminate the Windows operating system. We could try to follow the previous section on how to fix it directly from the grub rescue promt, but we have an important detail, and that is that when formatting the Linux partition we have also deleted the grub files, so using grub rescue is not going to serve for nothing. This is why what we will have to do is create a bootable Windows 10 DVD or USB and be able to boot it on our computer. We already have tutorials that explain these two actions very well. As is logical, the USB will have to be done from another friend's computer or another one we have. Once this is done we can correctly boot our USB and we will get the following screen: We are going to use a USB with Windows 10, but in the DVDs of previous versions like Windows 8 or Windows 7 we will also have a repair mode where we can do the same. Already inside the command console we will have to write a series of commands and press Enter to execute each one of them bootrec / fixmbr
Now: bootrec / fixboot
Now we will restart the computer and check if the boot has been restored. It is possible that this was not the case, or that when placing the last command, the notice "Access denied" appears. In which case we will have to do the following. Once again we will start our Windows 10 USB and enter the command prompt, access the command prompt from the Windows recovery menu diskpart
list disk
sel disk list vol
select volume assign letter = R
exit
A:
Bcdboot In this way we will have managed to repair the boot of our computer and we will be able to boot our Windows operating system as normal. These are the possible scenarios that we can find when our grub broke. Obviously not everyone will be here. You might also be interested in these tutorials: Have you managed to fix the error? If not, write us and tell us what problem you have, we will try to help you in everythingRepair grub with Windows 10 USB
Repair MBR to boot Windows 10 or any other version of Windows
Repair MBR with diskpart (recommended option)
How to recover my grub after updating windows 10
Our new trick in Windows 10 to fix the problems with the boot loader and linux.
▷ Repair inaccessible boot device error windows 10 and similar
Learn how to fix Windows 10 boot inaccessible boot device error and similar errors yourself. Reinstalling the MBR is an easy task
▷ Repair sihost.exe unknown hard error in windows 10
If you have the error “sihost.exe unknown hard error” on your computer ⛔ we teach you all possible solutions to reset your computer