Confusing instructions on "Restore the GRUB Bootloader" wiki

I am not sure where this post should go but anyway.

I have install Windows 10 on a system which already as Manjaro and of course it rewrote the loader for only itself. No more Manjaro. I was looking to repair it but there is different methods on the web on how to do it, so I settle for the “official” Manjaro wiki page on the subject. Before attempting the recovery, I got confuse at the part it says : “There are 2 different ways to chroot into your existing …”
There is the mhwd-chroot way and the “manually identify and prepare the installed partitions” way. However I am not sure where the later end. Both are identical numbered sections.

Let say I use the mhwd-chroot method where does it continue in the instructions ? in number 3 “Mount your Manjaro system partition” or straight to the “Restore Grub” section ?

Imo it should have been A-B-C numbering to differentiate the two.

Tx

try with
manjaro-chroot -a

ok at what point in the instructions ? and after that what’s next ?

for restore grub in EFI

manjaro-chroot -a ( select 1 if only one line )
fdisk -l ( check for /boot/efi)
grub-install --target=x86_64-efi --efi-directory=/install/boot/efi --bootloader-id=manjaro --boot-directory=/install/boot --recheck --debug 
exit ( quit chroot )

for MBR or legacy or bios only

manjaro-chroot -a ( select 1 if only one line )
fdisk -l ( check for /boot/efi)
grub-install /dev/sdx  ( x for your boot disk linux )
exit ( quit chroot )
1 Like

Ok. It’s an old BIOS based system. I guess I have to do also “update-grub” BEFORE exiting ?

yes

not forget to exit

Ok thanks ! you’re ON. Let see if I destroy everything …:joy:

Or you can use this link, no need to chroot.

gohlip gave me an idea. I found a procedure similar to his link a while ago. It works for me.

press “c” with a Manjaro installation DVD first selections menu (or USB drive) to a console mode.

grub > search.file /boot/intel-ucode.img root (note : amd-ucode and manjaro-release didn’t work)
grub > configfile /boot/grub/grub.cfg
will get you back the Manjaro boot menu. Boot in it and in a terminal :
$ > sudo grub-install /dev/sda (or other boot drive)
$ > sudo update-grub

Tada !

Screw Microsoft incompetence.

The procedure you outlined was in my earlier edits (/boot/intel-ucode.img) in that link.
I changed to /etc/manjaro-release because some developers here instructed users to remove intel-ucode to resolve the kernel panic issue.

You don’t have /etc/manjaro-release?

  1. What DE do you have? Did you install using manjaro-architect?
  2. Try installing package lsb-release and see if you can get /etc/manjaro-release instated.

Cheers. Tada. :grinning:

ps: Important to me as I want to make sure the procedure works in all situations.
If m-a installations do not have /etc/manjaro-release, we need another ‘sub-section’.

Dont worry. Can confirm M-A creates /etc/manjaro-release
[at least in my experience … that has always been ‘minimals’ too, of xfce,cinnamon,kde IIRC]

1 Like

I had XFCE latest (not from architect). Yes the file “manjaro-release” is there (/etc) but search.file could not find it, unless I mistype it ? I even have an AMD system but it couldn’t find “amd-ucode.img” either. I sure don’t want to try it again …:thinking:

Yes, if you have a /etc/manjaro-release file, most likely.
Try this (from any grub)

grub> search.file /etc/manjaro-release 

If you have output, then
grub> search.file /etc/manjaro-release root
will set the ‘grub root’ to your manjaro OS partition.
But if you have /boot in a separate partition, then you will need to set ‘grub root’ to the /boot partition. Not to the Manjaro root partition. See sub-section on separate /boot partition in that link.
Hope this helps.

ps: I’ve edited that link where step 6 will also needed to be modified. Thanks for making me relook at the link. Yet again another edit to cater with the changing to the ‘new’ grub.
Ah… the trouble with ‘complicated’ systems. Maybe I’ll come up with a new Murphy’s law. Or the 2nd law of thermodynamics.

Ah, my first draft…

Putting energy into systems that are simple, working well and use little resources
will entropy into a state of mediocrity and chaos
and consume far more energy to get back into the initial stage of equilibrium.

:rofl:

1 Like

Yes it was my mistake. I use this from my notes :

search.file /boot/manjaro-release root

which doesn’t work. “/etc/manjaro-release root” is the correct path and works fine.

still

“search.file /boot/intel-ucode.img root” saved me a couple of time too. I have a bunch of computers with multiples OS flavors and Mint kernel update was always destroying the Manjaro loader.

NOTE :

As a side note, if you have an AMD system, shouldn’t it be the file “amd-ucode.img” in /boot/ instead of “intel-ucode.img” ? Is this file necessary ?

I have seen this post before :

  • Submit by Philm during a stable update (sept, 13 2018) :

AMD-Ucode introduction

Unless you’ve already done this previously, All users of AMD-APUs/CPUs should install this update like this:

sudo pacman -Syyu
sudo pacman -S amd-ucode
sudo pacman -R intel-ucode
sudo update-grub

Step 3 is optional.

Unless removed manually by the user, both intel-ucode and amd-ucode will be in the system, these do no harm if they are not needed and take very little space.

If not needed, it can be removed as you has pointed out and as I have pointed out, the removal has been suggested to users having kernel panics when booting from other OS grubs.

And hence the reason I amended the search line to use /etc/manjaro-release instead of intel-ucode. And Arch, where some manjaro users also have, has the same intel- ucode mechanism which manjaro copies from.

Arch based Antergos and manjaro based netrunner ( not kubuntu based netrunner) do not install intel- ucode or amd-ucode as they do not kniw how to work it out.

All other OS’s put these ucodes into the kernels and do not have this issue. And they boot ‘early’ (one reason wrongly and often cited why manjaro does not do that).

Cheers.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.