Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Restore the GRUB Bootloader on Manjaro Linux. Usefull when your fresh windows install eats your grub and can not boot into your linux installation, or for some how your grub is missing

Restore the GRUB Bootloader on Manjaro

  1. Chroot into your linux instalation
    1. The easiest way is with mhwd-chroot
      1. Install it yaourt -S mhwd-chroot
      2. Run it sudo mhwd-chroot
      3. DONE, you have chrooted into your linux installation (open a root console of your installed linux OS, is like just open a console with root access)
  2. Restore your GRUB
    1. Install a new GRUB bootloader with grub-install /dev/sda
    2. Recheck to ensure the that installation has completed without any errors grub-install --recheck /dev/sda
    3. Finally, configure the freshly installed GRUB bootloader typing update-grub

Ref Manjaro Wiki - Restore the GRUB Bootloader


Update Jul 2022

I dont use Manjaro distribution any more, the above step may been deprecated.

A solution posted in the comments that is receiving lots of positive feedback made by @y6nH seems to be the right steps to fix it:

These are the steps that worked for me, without having to install any new packages:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it's sda for me; make sure you choose the right drive!)
  • grub-install --recheck /dev/sda
  • update-grub
  • exit
  • reboot
@y6nH
Copy link

y6nH commented Oct 21, 2020

These are the steps that worked for me, without having to install any new packages:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it's sda for me; make sure you choose the right drive!)
  • grub-install --recheck /dev/sda
  • update-grub
  • exit
  • reboot

@ArashAfrabandpay
Copy link

ArashAfrabandpay commented Jan 20, 2021

These are the steps that worked for me, without having to install any new packages:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it's sda for me; make sure you choose the right drive!)
  • grub-install --recheck /dev/sda
  • update-grub
  • exit
  • reboot

Hey there @y6nH so I've taken those mentioned steps. but when i tried to boot back again into my Manjaro it just freezes on the preOs icon "Lenovo" (which is my laptop brand). by any chance do you have any idea how to fix it?

@kellergoech
Copy link

kellergoech commented Mar 4, 2021

These are the steps that worked for me, without having to install any new packages:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it's sda for me; make sure you choose the right drive!)
  • grub-install --recheck /dev/sda
  • update-grub
  • exit
  • reboot

Worked for me aswell!

@buragwitmo
Copy link

buragwitmo commented Sep 6, 2021

These are the steps that worked for me, without having to install any new packages:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it's sda for me; make sure you choose the right drive!)
  • grub-install --recheck /dev/sda
  • update-grub
  • exit
  • reboot

Thanks this works for me ,but there is no manjaro bootmanager,
i can boot to manjaro using f12 key but dont see the bootloader page manjaro

@KikiMcArron
Copy link

KikiMcArron commented Nov 7, 2021

These are the steps that worked for me, without having to install any new packages:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it's sda for me; make sure you choose the right drive!)
  • grub-install --recheck /dev/sda
  • update-grub
  • exit
  • reboot

I fight with grub all weekend, on friday i decide to uninstall Mint. After that grub was broken and I worked all day to delete it from boot and run win 10. When I done it and install Manjaro, The grub doesn't appear. I try almost everythink. Now I do this script, evrything goes ok, but there is no result, Bootloader is not apear, Win is runing immediatly after reboot. Is there any other way to fix this problem?

@KikiMcArron
Copy link

KikiMcArron commented Nov 7, 2021

These are the steps that worked for me, without having to install any new packages:

  • Boot into Manjaro installer
  • Open terminal
  • sudo manjaro-chroot -a (and select system to mount)
  • grub-install /dev/sda (it's sda for me; make sure you choose the right drive!)
  • grub-install --recheck /dev/sda
  • update-grub
  • exit
  • reboot

I fight with grub all weekend, on friday i decide to uninstall Mint. After that grub was broken and I worked all day to delete it from boot and run win 10. When I done it and install Manjaro, The grub doesn't appear. I try almost everythink. Now I do this script, evrything goes ok, but there is no result, Bootloader is not apear, Win is runing immediatly after reboot. Is there any other way to fix this problem?

@#&#&@# problem solved, I don't know how it happends but in bios my first boot drive was changed to other hd🤦

@alibozkurtkyrd
Copy link

alibozkurtkyrd commented Feb 8, 2022

These are the steps that worked for me, without having to install any new packages:

Boot into Manjaro installer
Open terminal
sudo manjaro-chroot -a (and select system to mount)
grub-install /dev/sda (it's sda for me; make sure you choose the right drive!)
grub-install --recheck /dev/sda
update-grub
exit

Thank you. This solved my problem too.

Look at screenshot

@dianjuar
Copy link
Author

dianjuar commented Feb 8, 2022

@y6nH seems that your solution is working correctly. You are receiving a lot of positive comments.
I don't use Linux anymore. I don't have an environment to test that out.

I will update the gist with your solution giving the proper credits.
Kudos for you 👍

@omerguzelelectronicguy
Copy link

omerguzelelectronicguy commented Mar 25, 2022

it seems @y6nH solution worked for me but when I boot my Manjaro it didn't open.
firstly there were black screen.
then it is again opened and written that
/dev/sda6 is clean
after that it wait till the watchdog time error occurred than it powered off.
did I installed but in wrong directory because before this solution there were not any Manjaro screen. It directly goes the bios to check the disk physically.
my efi directory is /dev/sda1
my OS directory is /dev/sda6

@kevinscottuk
Copy link

kevinscottuk commented Jun 29, 2022

@y6nH your solution worked for me too. Many thanks.

@dianjuar
Copy link
Author

dianjuar commented Jul 1, 2022

@y6nH I updated the gist to set your solution as the valid one. Thank you so much for providing your solution

@jossansone
Copy link

jossansone commented Aug 3, 2022

@y6nH Thank you! this worked perfectly for me after I had to reinstall Windows in my dual-boot setup. One other note, if anyone else has had to do this, you also need to check the flags on your partitions if both Windows and Manjaro are on the same disk - make sure the boot flag is set on your Manjaro partition and remove it from your Windows partition. After I ran the above steps it was still booting directly into Windows until I did that.

@VijoPlays
Copy link

VijoPlays commented Sep 9, 2022

For those of y'all that boot into Manjaro immediately:

  1. Boot into Manjaro
  2. sudo gedit /etc/default/grub

Change the following 2 lines:

GRUB_TIMEOUT_STYLE=hidden -> GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=0 -> GRUB_TIMEOUT=15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment