Manjaro broke...? This is gonna be rough to fix

I’ll give it a shot and see what happens

is it normal to have no text output when running this script under bash??
or am I too impatient and cancel it early?

Yes.
The output will be directed to two files (files.list and pkglist.orig)

paclog --pkglist --logfile=/var/log/pacman.log | ./pacrecover >files.list 2>pkglist.orig

Why the screenshot again?
Just link to where you got it from:

pacman/Restore local database - ArchWiki

Screenshot location:

Welp this is gonna be ‘fun’

pkglist.orig contains:
bash: ./pacrecover: No such file or directory

Create the log filter script and make it executable:

The command assumes the script to be in the current directory (and it being executable).
You can adapt the command for the path where you put that script … or have it in the current directory

if I read it correctly this is the only command I need to make it executable

… enough with the screenshots already
Please!

The answer to your question is: yes

You copy/paste that text into an editor, save it under the name “pacrecover”
and then make that file executable.
Remember where you saved it to (which directory).
For the given example to work, it needs to be in the current directory.
Put it there - or change directory to where the file is saved.

ls -al ./

should list it - this lists every file in the current directory

I’m sorry, trying to keep myself and you on the same page. I’ll do text if thats better

How to copy this text code from Arch Wiki into your broken system:

  1. Use Live USB of Manjaro

  2. Open default browser Firefox

  3. Create a new script in the live USB.

  4. Copy the text code from Arch Wiki into the script.

  5. Make this script executable.

  6. Mount the partition of your broken system.

  7. Move the script into the broken system.

  8. then manjaro-chroot to fix your system…

Thanks for clear instructions. I did do these steps but I still get the result of:

I just expanded my previous post.

The packrecover script is in /root/ of the Manjaro installation in question

Why would you work as root?

… it’s your system … :man_shrugging:

Just copy the file where you want it to be.

the example calls it “pacrecover” - but that is just a name
You can call it whatever you like - but then the example is not copy/paste anymore.

it just needs to be on the right drive right?

with chroot of course running it with bash.

No.
The notion of drives is a Windows thing.

You need to know in which directory it is.

You said it is in /root/pacrecover

The command (example) needs to know the location of the script you want it to execute.

Normal users have no access to anything in /root

Put it somwhere else - in your $HOME directory


easy step by step:
as your normal user - no sudo, not as root

nano pacrecover

  • copy/paste the contents of the script (starts at below the very faint dotted line),
  • save the file
  • close the editor
    chmod +x pacrecover

then the example will work

1 Like

If you don’t want to make a lot of effort to fix the problem, I would suggest: Simply make backup including your private data and favorite configurations on other hard drive.

Reinstall OS and copy your private data and configuration back. That would be easy and quick for beginners. :man_shrugging:

In the future you should never use sudo pip and other non-Arch package manager e.g. snapd after your mistake.

3 Likes

Guys, don’t forget if he chroots, he becomes root on that system.

So after chroot, if you want to become your user, type su YOUR_USERNAME. THEN do the things in the wiki.
Make sure you are in your HOME by simply typing cd in terminal. If you want to make absolutely sure, type pwd and it shows you what directory you are currently in.
You should be in /home/YOUR_USERNAME aka ~/ for the CURRENT user.

The HOME of the root user (that you became when chrooting) is /root, probably why the script ended up there in the first place.

1 Like

Okay, I’m working under home now and there is suppose to be an output here in the same directory as the pacrecover script right?

correct

if you copy/pasted the example, the files will be named:
files.list
and
pkglist.orig

just as the text in the wiki says.