Skip to main content

Reinstall Grub after installing windows

  1. Boot from a Live Linux USB drive. You can use any Live Linux distribution for this, such as Ubuntu, Fedora, or Debian.
  2. Once you have booted into the Live Linux environment, open a terminal. For example; Ctrl+Alt+T
  3. Type the following command to list all the partitions on your system:
    sudo fdisk -l
  4. Identify the partition where your Linux operating system is installed. Note the partition name, for example, /dev/sda1>/code>.
  5. Mount the partition with the Linux operating system:
    sudo mount /dev/sdx1 /mnt

    Replace /dev/sdx1 with the actual partition name.

  6. Mount other necessary partitions:
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
  7. Chroot into the mounted Linux partition:
    sudo chroot /mnt
  8. Install the Grub bootloader:
    sudo grub-install /dev/sdx

    Again, replacing /dev/sdx with the actual device name of your hard drive. If you have more than one hard drive, make sure to select the one where the Linux operating system is installed.

  9. Update the Grub configuration:
    sudo update-grub
  10. Exit the chroot environment:
    exit
  11. Unmount the partitions:
    sudo umount /mnt/dev
    sudo umount /mnt/proc
    sudo umount /mnt/sys
    sudo umount /mnt
  12. Reboot your computer from the terminal.
    sudo reboot