September 2, 2021
Restoring GRUB After Installing Windows
September 2, 2021
GRUB stands for GRand Unified Bootloader and is a default bootloader used in Linux distributions. It is responsible for packing itself at boot time from BIOS and loading the Linux kernel into the memory. It then transfers the control to the operating system kernel.
Today we will share three ways to restore the GRUB bootloader after losing it while dual-booting Windows with Linux. This problem is that Windows doesn't recognize neighboring systems, and it's a common problem. So here are the methods:
- A live CD or live USB
1st METHOD: By using a live CD or live USB
- We start by burning the distribution on CD or Flash storage(USB).
- Now boot it in test (try without install).
- Open a terminal and type in this command to see the Disk:
sudo fdisk -l
- We will see the installed Linux partitions. Often we'll find it next to "EXT."
- Replace "sda3" with what is appropriate with the condition on the system:
sudo mount /dev/sda3 /mnt
- Then type in this command to do mount:
sudo mount --bind /dev /mnt/dev
- Now run:
sudo chroot /mnt
- Write This command to install GRUB:
- Finally, update GRUB:
- GRUB has been installed successfully.
2nd METHOD: By Using EasyBCD on Windows
- Download it from this link.
- Run the program and go for these steps:
a. Add new entry Linux/BSD b. From Type choose Linux(GRUB) or (GRUB 2) c. Think of a suitable name for the system. d. Select the partition where Linux is installed e. Lastly, click on "Add Entry."
And this program has many features like using the METRO screen or choosing the time for booting, etc. But our problem here is solved. So let's move on to the last method.
3rd METHOD: By using Boot-Repair
This is the easiest way to repair your boot screen.
- For windows, one has to download the program and run it.
- For Linux open terminal. Run the following commands:
sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install boot-repair
- Now from the screen, take "recommended repair." Problem solved.
I hope this article was helpful.