Chroot not working "==> ERROR: YOU CANT MOUNT 0!"

After my last update, somehow systemd got deleted.
To reinstall it im trying to chroot on a liveboot in order to reinstall it. This is what ive done:
sudo manjaro-chroot -a
it gives me
==> detected systems:
--> 0) ManjaroLinux
==>Select system to mount [0-0]

When i reply with "0" it says
==>ERROR: You cant mount 0!

When i reply with
"0) ManjaroLinux"
it gives me
/usr/lib/manjaro-mount.sh: line 65: [0-0] syntax error: operand expected [error token is "[0-0]")
chroot: failed to run command '/bin/bash': No such file or directory

I also tried
sudo manjaro-chroot /mnt
which gave me
mount: mount point /mnt/proc does not exist
==> ERROR: failed to setup API filesystems in chroot /mnt

Am i doing something wrong or is this whole thing a lost cause? Any other way to add systemd to my broken system?

In order to run sudo manjaro-chroot /mnt you first need to mount the real system into your /mnt of the live system.
There are a couple of lines to to this, you just can't only mount, for example, sudo mount /dev/sda1 /mnt. That way you would miss a lot.
See here for more details how to do that.

ahh okay, thank you. If i did all of that, would "chroot" work? Or is it irrelevant to one another? I can still access my files on sda3/4/5 and stuff even when it isnt mounted, dunno if that matters.

With the help from the Arch wiki page you should be able to chroot into your real system.
Yes, you can access your files from the real system even when not chrooted, but then you are not inside that system. Then it's more like you access an external disk.

@Whatisthisrn. "chroot" literally means Change Root and is really handy for gaining permissions to change the system from outside it, while still appearing to be booted, or 'rooted' within the sytem.

It is one of the handiest, dandiest things around. :smiley:

1 Like

I ran into that issue a few months ago. I used choice 1 and then it worked. I reported the bug and thought it got fixed, but I called it an index problem. Part of the problem might be that both the liveUSB and the target are both Manjaro and option 0 is the USB??...

7 Likes

Any ideas on how to fix it if that is the problem? I feel the answer could be deciphered from this https://wiki.archlinux.org/index.php/change_root However honestly i am not very savvy with the terminal and such so i dont know which information to pull from it.

Wow im dumb for not correlating the words with chroot.

I'm sorry! Not everyone who installs Manjaro or posts here has your depth of understanding. I most certainly do not.

Nor do they understand the power of some commands, which I'm certain you do, so please forgive any of the information I've posted you deem unnecessary.

Believe-it-or-not, some people don't.

Oh no i wasnt being sarcastic haha. I actually did not correlate chroot with change root. Thanks for telling me that because it makes the whole process easier to understand!

2 Likes

OMFG! And here I thought I knew everything!

I sincerely apologize. Please accept. :smiley:

2 Likes

I literally entered "1" even though the only choice shown was "0". But that got me to the target system. If that works for you also, then we'd have to file another bug report against manjaro-chroot.

4 Likes

So manually mounting a partition and invoking manjaro-chroot no longer works?

sudo mount /dev/sdXX /mnt
sudo manjaro-chroot /mnt

Works for me.

Or is it just the auto option and subsequent selection of manjaro-chroot that is buggy?

sudo manjaro-chroot -a
1 Like

I had that a few months ago, it seems it could be happening again. Once I aliased the option, manjaro-chroot did work OK.

oh.. my.. dude..
It worked.
However when i try sudo pacman -Su systemd systemd-sysvcompat
I get a bunch of Error messages saying that they could not be retrieved.

2 Likes

The systemd reinstallation is solved:

But the issue of the hard drive Manjaro installation not being correctly listed by manjaro-chroot -a is not resolved. He booted from liveUSB and:

sudo manjaro-chroot -a
it gives me
==> detected systems:
--> 0) ManjaroLinux
==>Select system to mount [0-0]

When i reply with "0" it says
==>ERROR: You cant mount 0!

When "1" was entered, the hard drive installation was chrooted successfully. Is it just a "menu" error? There should just be the one option, the hard drive installation. Any idea what's the problem here?

And when I've tried manjaro-chroot -a before with only one option, it automatically chrooted the only option, without any menu.

2 Likes

Maybe @artoo can look at this ...

Maybe someone could look at the bugtracker. :persevere:

1 Like

That code listed in the bug tracker entry would explain that the 0 option might have been an efi partition, which would explain why it wouldn't chroot.

But the hard drive Manjaro installation wasn't even listed, even though it chrooted when 1 was selected. So there's something seriously amiss here. The bug tracker lists this as very low priority, but manjaro-chroot really isn't working correctly (which almost resulted in a failed recovery here and a reinstall).

You have try your solution ? If yes please open pr here


for our review

Forum kindly sponsored by