Skip to content

Instantly share code, notes, and snippets.

@dianjuar
Last active September 21, 2024 19:30
Show Gist options
  • Save dianjuar/a6e0d801a9f71f8edc06321178390320 to your computer and use it in GitHub Desktop.
Save dianjuar/a6e0d801a9f71f8edc06321178390320 to your computer and use it in GitHub Desktop.
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
@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

@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

@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

@thamudi
Copy link

thamudi commented Nov 17, 2022

for me all i had to do was update grub and it worked again like a charm.

@Pitbull6571
Copy link

All I did was update-grub from and it worked. Ubuntu has a bad habit of breaking Manjaro bootloader. Sibling rivalry I suppose!

@taitep
Copy link

taitep commented Sep 15, 2023

@y6nH Your solution did NOT work for me. When attempting to boot i was previously thrown into a grub shell, also grub does not show up on the correct disk when choosing what to boot from. Selecting the disk also put me in a grub shell, and the behaviour persisted after following your instructions.

@y6nH
Copy link

y6nH commented Sep 17, 2023

I'm sorry I can't help any more; like the OP, I gave up on Manjaro after spending too much time troubleshooting it.

@michimussato
Copy link

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

Still works as a solution. Thanks!

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