Provide auto repair script

Today I interupted the update process which results in a not booting system. I’m advanced user so I was able to resolve this issue by myself. I needed to chroot into my system, reinstall the Kernel and do a update-grub. Broken updates are often the reason why a Linux system does not boot. This makes me wonder: Why did no Distro provid a auto repair script? This is something that would be really nice to have in Manjaro.

It should be included in the Live ISO. When you boot the Live ISO, you currebtly haave a Icon to install Manjaro. Why not add a Icon to repair a broken Manjaro instalation? This will run a script that do some basic stuff. Through my years in Linux forums I leraned that a not booting system is often cauused by the same problems.

So what the script should do is basicly to chroot into the not owrking system, reinstall all Kernels and Grub, install missing updates, check if all packages are installed correctly and do a grup-update.

Of course, this will not solve all problems, but it will the repairs the sytem in 60%-80% of all cases from waht I know from support forums. Is something not covered by this, the User can still ask here. But having a script in the Live ISO that does all common steps to repair aa broken install would be really nice to have for unexperiend users.

One can use manjaro-chroot for that. See GRUB/Restore the GRUB Bootloader - Manjaro

What would that accomplish for what situation?

To install or remove kernels, one can use mhwd-kernel. See Manjaro Kernels - Manjaro

There’s no magic wand for that. If a package is broken, pacman will tell you about it. It also has the capability to fix most issues using it’s own built-in options. Any third-party tool like pacutils is just a fancy pacman wrapper.

There are many tools already available to repair a GNU/Linux installation no matter what distro one uses. For example, this is what I keep on my Ventoy USB:


Tip: Please check your spelling before submitting a post anywhere on the internet. It’s common courtesy and shows respect for those reading.


That’s exactly what I used.

I don’t know why, but I update-grub did not find the Kernels until I reinstalled them.

I used that tool.

To answer the rest of your post: I know that these things exists. But we are both advanced users. What I suggest is a script on the Live ISO that will do the common things to fix a broken Manjaro installation. So if the System of a unexperienced User breaks e.g. interrupting a Update, he can boot from the Live ISO, click repair broken installation on the Desktop and have working System again. The things I said above will fix a broken Installation in most cases a unexperienced User will run into. The User don’t need to know how to reinstall the Kernel from cli, what chmod is or what Grub is.

Sorry for that

Indeed. Your idea has potential. However, it would require someone to dedicate time to create and maintain it.

@pux likes to do fancy scripts like toolbox (aka bmenu). Take a look at what he has already done. Perhaps create an issue or pull request if you have an idea for it. :wink:

It’s actually a good idea, and would add an extra layer of polish on top of the “desktop Linux paradigm”, akin to Windows’ “Startup Repair” tool.

However, such a tool for Manjaro (or any end-user oriented desktop distro) cannot be “half” implemented. It would have to be a straightforward point-and-click GUI tool that also considers different types of problems and setups.[1] Otherwise, if it’s going to run in a terminal and require a handful of manual user-interventions, then you might as well just do it yourself via the manjaro-chroot method.

[1] Another way to phrase this: It should reflect and resemble the Calamares installer. When a user installs Manjaro from the live USB, they are guided through a point-and-click GUI installer; not a “script” or terminal-based application.

I wholeheartedly disagree with this. How much dumbing down do we need? Linux is not Windows. It’s encouraged to know how things work under the hood in Linux, at least basics.

And this is already showing since usage of Pamac GUI has been encouraged. When inadvertently someone has to do something in a terminal, they are already clueless to what’s going on. And will copy/paste and run anything you tell them, even if there are most stupid typos in said command.

And don’t get me wrong. Nothing wrong with pressing buttons instead of typing, but with condition that you at least know how to do it the alternative way.

Anyway, proper solution for this exact problem is pressing the issue upstream - to leave old kernels, modules and whatnot until the upgrade finishes or something. But this issue has already been raised few times AFAIK, but didn’t go anywhere. I don’t see a point in scripting 3 commands.


My idea was two Manjaro OS in the same device

  • Manjaro OS as your system
  • Small Manjaro OS as “recovery/rescue OS” (20 - 30 GB small) including manjaro-tools-base-git which has manjaro-chroot + writing your own script or note “How to fix your system” that always stays in this recovery OS.

Of course both Grubs should be separated. If a Grub of system is broken, there is a good chance another Grub can boot to recovery OS, then fix this broken Grub.

There are Btrfs snapshots in Grub menu, so you can choose a snapshot for restoring root system, but it does not restore Grub.


  • No need to use Live USB and flashing an OS onto USB-stick
  • Fix quickly, because your own made script exists there in recovery OS.

There’s already how-to guide how to add live iso into grub: [HowTo] Boot Manjaro ISO directly with GRUB

Well in theory you can create a separate Unified Kernel Image which will be accessible from the UEFI Bootloader even if grub is broken. This image can be modified and do the needed tasks… It would stay on the RAM and just chroot into the local installation und repair common things.

However… someone have write such a script and test it properly. I did this already customized for my system, but It is a really tedious task if you want this “automated”, because there are really a lot of conditions.