How to reinstall GRUB on Ubuntu

reinstall grub

If you need reinstall GRUB on Ubuntu for whatever reason, don't panic, it's not too complicated. On the contrary, it is quite simple if you follow these steps. Remember that the reinstallation of GRUB may be necessary for various reasons (for example when you have made certain changes, you have installed another operating system in multiboot, etc.), and you should keep in mind how to do it step by step in case it ever comes up. the need to do it and you don't know how. Well, here is another one in this series of simple and brief tutorials that we are launching and that are sure to be the most practical. As they say, a picture is worth a thousand words, and in this case some snippets with the commands are worth a thousand words...

To reinstall or repair GRUB 2 from an Ubuntu Live CD, the steps to follow They are quite simple, you just have to:

  1. Insert the Ubuntu Live DVD or USB into your computer and boot from it.
  2. Once inside, use the terminal of this distro to execute the following command, substituting /dev/sdxy (note, if it is an SSD it will be a different nomenclature) with the boot installation partition in your case:

sudo mount -t ext4 /dev/sdXY /mnt

  1. Now do the same for other directories that GRUB needs to access to see other installed operating systems:

sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys

  1. Now you should jump using the following command:

sudo chroot /mnt

  1. Now it's time to install, check and upgrade GRUB, to do this, run these three simple commands:

grub-install /dev/sdX

grub-install --recheck /dev/sdX

update-grub

  1. Now GRUB is installed, you just have to unmount what you had mounted and then reboot:

exit && sudo umount /mnt/sys && sudo umount /mnt/proc && sudo umount /mnt/dev/pts && sudo umount /mnt/dev &&  sudo umount /mnt>/code>

sudo reboot

I hope it has been helpful for you…


A comment, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   luix said

    Or you can use SuperGrub2..