How to revert from grub-vanilla to grub safely (old Manjaro installs)

I am using grub-vanilla on all my Manjaro installs, both real metal and VMs. I’m not a grub-customiser user (have in fact made quite a few posts against its use in the old manjaro forums). But I was a longtime follower of old forum member gohlip’s grub/bootloader advice and the custom grub entries in my custom.cfg file are all based on his work. So I moved to grub-vanilla to get a “purer” grub package on his advice.

Just did an upgrade of one of my Manjaro VMs (this is an OLD mabox install from its first iteration that I converted to only Manjaro repos), noted the error as set out here:

/usr/bin/grub-probe: error while loading shared libraries: libzfs.so.2: cannot open shared object file: No such file or directory

Same error as found here:

and

Forum research indicates that grub-vanilla is not likely to be maintained by Manjaro. My question is what is the safest way to revert/reinstall grub on all my systems, considering:

  1. my installs are all from around 2015-2017, and my oldest 2015 install controls grub on my PC (not sure if more recent Manjaro releases have some changes affecting grub, the usage of custom.cfg, the scripts in the grub.d folder, etc)
  2. this was before Manjaro came up with a customised grub theme, so it was the basic grub menu and I just set a different background for the menu
  3. my installs came with plymouth which I have since removed
  4. I disabled the os_prober in /etc/default/grub because it took too long to update grub with so many distros and I was already using the custom.cfg entries to boot into my other distros (but no worries, I can sort this out)
  5. all my custom entries in 2015 Manjaro read the grub.cfg file of the various other distros on the machine, including the other real metal Manjaro install (2016).

Based on the instructions here: Call for testing: `grub-vanilla` - Projects - Manjaro Linux Forum , it would seem that I can just do the reverse of those instructions while installing the grub package.

However, for step 1,

  1. Remove all grubenv entries.
sudo grub-editenv /boot/grub/grubenv create

what do I do? just delete the grubenv file? Or do I edit it in some way?

Would appreciate some help and information, before I embark on the upgrades.

Disclaimer: I don’t use GRUB.

Yup. Delete the file first, then do :

sudo grub-editenv /boot/grub/grubenv create

Then just install the standard GRUB pkg, making sure you follow/do any post-install commands.

I’d probably steel myself for some chrooting, too.

Good luck.

1 Like

Thanks, but when I removed the grubenv file as my first action on my VM, the create command was no longer able to make a new grubenv file:

sudo grub-editenv /boot/grub/grubenv create

grub-editenv: error while loading shared libraries: libzfs.so.2: cannot open shared object file: No such file or directory

After installing grub package, the create command worked, which is what I did. So it looks like when you revert from grub-vanilla to grub, you need to install grub first, before you remove the grubenv file.

Anyway, the VM was fine, so I proceeded to upgrade and sort out my main PC install of Manjaro.

Because my previous installation of grub-vanilla over the old manjaro grub led to my old /etc/default/grub file being saved as a pacsave, once grub was reinstalled, it restored the pacsave file as my current /etc/default/grub file , complete with all my previous configurations. So I didn’t even need to reconfigure a clean /etc/default/grub file . Excellent.

After that, I just renamed the fresh 41_custom script to 09_custom, so that my custom.cfg entries will once again come before the entries in grub.cfg.

A reboot, and all is fine.

2 Likes