You are not logged in.

#1 2021-01-06 20:34:30

esuhl
Member
From: UK
Registered: 2009-09-16
Posts: 140

[SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

In the past, I have successfully used chroot to recover a non-working Arch installation.  But I'm struggling to understand how to create one on my functioning system.

The chroot wiki page says to enter a chroot with:

# arch-chroot /location/of/new/root

But... at that point I don't have a new root... that's what I'm trying to create. :-/

I saw from the DeveloperWiki:Building in a clean chroot that mkarchroot will create a new chroot.  This runs successfully, but when I enter the chroot, I see a warning:

# mkdir /mnt/chroot
# mkarchroot /mnt/chroot/root base-devel
...
...
Generation complete.
# arch-chroot /mnt/chroot/root/
==> WARNING: /mnt/chroot/root/ is not a mountpoint. This may have undesirable effects.

-----------

I don't understand what that means, or what "undesirable effects" may occur.  Or even if I'm using chroot correctly.

Is this warning to be expected?  Am I doing something wrong?

Thanks :-)

Last edited by esuhl (2021-01-07 19:34:04)

Offline

#2 2021-01-06 20:41:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

Why are you attempting to enter the chroot? Just use the tools as described on the wiki page to build packages there.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2021-01-06 21:36:34

esuhl
Member
From: UK
Registered: 2009-09-16
Posts: 140

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

jasonwryan wrote:

Why are you attempting to enter the chroot? Just use the tools as described on the wiki page to build packages there.

I'm trying to become the maintainer of a package that should build on both my (64-bit) Arch PC and (32-bit) Arch32 laptop.

Following the wiki, building in an Arch64 chroot is successful.  But in Arch32 it fails with gpg/sudo/PAM errors.  I posted on the Arch 32 forum and, to troubleshoot, it was suggested that I enter the chroot.

I am now trying to do this on my 64-bit Arch machine.  NOTHING I am trying to do in this thread relates directly to Arch32.  Once I know what I'm doing with 64-bit Arch, I can later apply that to Arch32. :-)  I also like to learn more about how Arch works, so... I think trying to enter a chroot... even if it's ultimately pointless will help me get more familiar and intimate with the Arch system...?

I think I almost understand chroot, but it seems like I'm missing something... :-/

Last edited by esuhl (2021-01-06 21:37:10)

Offline

#4 2021-01-06 22:11:06

loqs
Member
Registered: 2014-03-06
Posts: 17,304

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

It is warning you that you have probably not setup the directory you are chrooting into incorrectly.  It does not apply in the case of a clean chroot.
Although I agree with jasonwryan you should not enter the chroot.  It appears the account section of sudo stack in the arch32 chroot includes a module that is not present.

Offline

#5 2021-01-07 00:49:05

esuhl
Member
From: UK
Registered: 2009-09-16
Posts: 140

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

Thanks, logs. 

loqs wrote:

It appears the account section of sudo stack in the arch32 chroot includes a module that is not present.

I'm afraid I don't quite understand what the "account section of the sudo stack" refers to, or how I can troubleshoot further.

Could you elaborate? *blush*

(Sorry if I'm just being dumb -- I'm just... stumped...)

Offline

#6 2021-01-07 00:54:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

This isn't an Arch issue, it is an Arch32 one. You should either ask the original maintainer, or pursue it in the open thread on their boards.

Please mark this as solved as there is no issue with the chroot tooling Arch provides.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2021-01-07 02:05:03

esuhl
Member
From: UK
Registered: 2009-09-16
Posts: 140

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

jasonwryan wrote:

This isn't an Arch (Arch64) issue, it is an Arch32 one.

The issue is with Arch32, but nothing I'm asking here relates to Arch32.  My main OS is Arch64.

I'm not asking anyone on this forum to fix or investigate the issue I'm having on Arch32.  I just want to understand more about chroots and sudo, etc.,   Yes, I eventually want to apply that understanding to Arch32.  But equally, I'm always trying to learn more about how my 64-bit Arch system works.

So I'd love to know more about "account section of the sudo stack" on 64-bit Arch... even though it seems to be working correctly.

jasonwryan wrote:

Please mark this as solved as there is no issue with the chroot tooling Arch provides.

I hope you can understand that I'm trying to learn about 64-bit Arch here, and I will keep Arch32-specific questions on the appropriate forum.

However, if I have over-stepped the mark, then please accept my apologies, and I will graciously mark this thread "solved" as you wish.

Offline

#8 2021-01-07 02:14:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

The sudo stack/pam have nothing to do with the chroot tools (the topic of this thread), ergo we are done.

Your issue is just a simple misuderstanding of arch-chroot, a script used in the installation/recovery process, and the devtools chroot suit (arch-nspawn, makechrootpkg etc) which are used for building in a clean chroot. The wiki page makes that pretty clear, there is no mention of arch-chroot on that page, for that reason.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2021-01-07 13:11:56

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

esuhl , for clarity :

Are you trying to build a package for i686 architecture on an x86_64 archlinux installation ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2021-01-07 18:30:48

esuhl
Member
From: UK
Registered: 2009-09-16
Posts: 140

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

Lone_Wolf wrote:

esuhl , for clarity :

Are you trying to build a package for i686 architecture on an x86_64 archlinux installation ?

The package is for "any" architecture.  So it should (and does) build as 64-bit on 64-bit Arch.

If you have any hints as to what might go wrong to cause sudo/PAM/gpg errors when building in a chroot, then I'd love to hear them. :-)  Otherwise, I can see now that chroot is working as intended on my 64-bit machine, and will revert to the Arch32 forums for further assistance.

Thanks everyone.

Offline

#11 2021-01-12 02:43:51

esuhl
Member
From: UK
Registered: 2009-09-16
Posts: 140

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

esuhl wrote:

If you have any hints as to what might go wrong to cause sudo/PAM/gpg errors when building in a chroot, then I'd love to hear them. :-)

In case it helps anyone, I resolved this issue by resetting pacman's gpg keys:
https://wiki.archlinux.org/index.php/Pa … l_the_keys

Offline

#12 2021-01-12 08:22:23

seth
Member
Registered: 2012-09-03
Posts: 50,925

Re: [SOLVED] chroot confusion and "WARNING: ... is not a mountpoint."

This may have solved your

But in Arch32 it fails with gpg/sudo/PAM errors.

but bears no whatsoever connection (like "none") w/ the message you asked about in the first post which happens because you're arch-chroot'ing into a random subdir of your root path that is not a mounted partition or image and what is typically not what you ever want to do at all.
Looking into the arch-chroot script would have told you that

Note that when using arch-chroot, the target chroot directory *should* be a
mountpoint. This ensures that tools such as pacman(8) or findmnt(8) have an
accurate hierarchy of the mounted filesystems within the chroot.

If your chroot target is not a mountpoint, you can bind mount the directory on
itself to make it a mountpoint, i.e. 'mount --bind /your/chroot /your/chroot'.

Online

Board footer

Powered by FluxBB