You are not logged in.

#1 2017-09-21 10:45:54

cluxter
Member
Registered: 2015-08-10
Posts: 11

[SOLVED] 'arch-chroot /mnt/testchroot' fails on non live ArchLinux sys

Hello,

I followed the wiki about the usage of arch-chroot: https://wiki.archlinux.org/index.php/ch … rch-chroot
I'm doing this on a regular ArchLinux installation (no live system at all).

Here is what I've done:

1) I made sure the `arch-install-scripts` package was installed on my system
2) as root, I created a simple test folder in which I would like to have my chroot, like this: `# mkdir /mnt/testchroot`
3) as root, I simply ran the command suggested in the wiki: `# arch-chroot /mnt/testchroot`

And here is the result of the last command:

# arch-chroot /mnt/testchroot
mount: /mnt/testchroot/proc: mount point does not exist.
==> ERROR: failed to setup chroot /mnt/testchroot

From what I understood, this command (which is a script apparently) was supposed to mount `/proc` automatically.
Any clue about why it's not the case ?

Thanks!

Last edited by cluxter (2017-09-21 12:18:22)

Offline

#2 2017-09-21 10:57:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: [SOLVED] 'arch-chroot /mnt/testchroot' fails on non live ArchLinux sys

Change root changes your root to an existing root filesystem, using the kernel you are currently running on. An empty directory doesn't contain a root filesystem structure.

This looks like a XY problem what is it that you actually want to solve? Just a learning experience, or do you have any further plans with the chroot?

Last edited by V1del (2017-09-21 11:03:14)

Online

#3 2017-09-21 11:00:31

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] 'arch-chroot /mnt/testchroot' fails on non live ArchLinux sys

You need to actually install Arch into the directory before you can arch-chroot into it...

pacstrap /mnt/testchroot base

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2017-09-21 11:14:59

cluxter
Member
Registered: 2015-08-10
Posts: 11

Re: [SOLVED] 'arch-chroot /mnt/testchroot' fails on non live ArchLinux sys

Thanks a lot for you fast answers. It really clarifies things!

@V1del: my goal is to run Firefox in a chroot because it has kept crashing again and again for months (!!) and I tried to trace the origin of these crashes and I came to the conclusion that it might come from a shared library issue (maybe something related to 32/64 bits or something). Same problem is happening with Chromium. I really tried many things to solve this issue but nothing successful so far.
EDIT: so isolating Firefox would at least help me to reduce the scope of the research.


@slithery: running this command returns:

# pacstrap /mnt/testchroot base
==> ERROR: /mnt/testchroot is not a mountpoint!

So my understanding is that I should mount "/" in this folder? But I doubt that running `# mount / /mnt/testarchroot` is a good idea, right?


I'm really trying to understand how this chroot thing works but it's not that easy hmm

Last edited by cluxter (2017-09-21 11:16:38)

Offline

#5 2017-09-21 11:17:57

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] 'arch-chroot /mnt/testchroot' fails on non live ArchLinux sys

Sorry, I missed an option...

pacstrap -d /mnt/testchroot base

This will install a separate copy of Arch into your /mnt/testchroot folder.

Although the correct solution would be to post the error messages that Firefox is producing and fix it, a chroot is just a workaround.

Last edited by Slithery (2017-09-21 11:20:22)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2017-09-21 11:40:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,410

Re: [SOLVED] 'arch-chroot /mnt/testchroot' fails on non live ArchLinux sys

Yeah just setting up a chroot is at best a workaround and depending on what the actual issue is, likely to be completely irrelevant.

You should open up a new thread containing information on your system (hardware, software versions involved etc), your environment (WM/DE maybe even the output of

printenv

) terminal output that firefox is producing when it crashes. Maybe you even get a coredump

man coredumpctl

will give you info on how you can examine these.

I'm going to leave this thread open if you want to further pursue anything related to the chroot, however the firefox issue should really be dealt with in a seperate manner.

Mod note: Not an installation issue, moving to NC

Online

#7 2017-09-21 11:59:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: [SOLVED] 'arch-chroot /mnt/testchroot' fails on non live ArchLinux sys

First, you probably want systemd-nspawn not chroot.

There is even a heading for running firefox in an nspawn container which links to the firefox page with details on precisely how to do so:
https://wiki.archlinux.org/index.php/Fi … _container

I'm not sure how you didn't find the firefox page when looking for a solution for a firefox problem.

Secondly, you probably don't want systemd-nspawn.

Last edited by Trilby (2017-09-21 12:07:41)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2017-09-21 12:16:38

cluxter
Member
Registered: 2015-08-10
Posts: 11

Re: [SOLVED] 'arch-chroot /mnt/testchroot' fails on non live ArchLinux sys

Thank you for all your answers. I was able to make it work. Marking this issue as solved now.

I totally agree that it's at best a workaround, even kind of a hack. But you've got to understand that having a browser that crashes ~25-30 times a day is a pain in the ass, especially when you're a front-end web developer.
So yes I do want to debug this the proper way and I'm going to do it. Meanwhile I needed a solution to avoid reinstalling Archlinux from scratch, for 3 reasons:

- I don't want to reinstall my whole system just because of that
- reinstalling the whole system is not a fix
- I want to debug it to increase my skills and maybe to patch something if necessary (pretty unlikely though).

This temporary hack will help me to avoid throwing my laptop through the window while keeping my system up and running. Plus it's easier to look for some info on the web when the browser remains open for more than 20 minutes!

@V1del: thank you for these 2 commands. I've never done any real deep debugging so I will start with these and dig further.

@Trilby: I did read the Firefox wiki page and I would have used systemd-nspawn if only I would have known what it was. Now that I know what systemd-nspawn is I will gladly use it. Thanks!

Offline

Board footer

Powered by FluxBB