From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF3B1158170 for ; Wed, 17 Jul 2024 19:50:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3351BE2AC2; Wed, 17 Jul 2024 19:50:40 +0000 (UTC) Received: from tiger.tulip.relay.mailchannels.net (tiger.tulip.relay.mailchannels.net [23.83.218.248]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9195BE2AB8 for ; Wed, 17 Jul 2024 19:50:39 +0000 (UTC) X-Sender-Id: thundermail|x-authsender|confabulate@kintzios.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7534D5C4CA7 for ; Wed, 17 Jul 2024 19:50:38 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1721245836; a=rsa-sha256; cv=none; b=fytVbi1pNklR8WhPXrO2LXfJ2ctB2Ap0N5uryU3qczRFz00senrRbwKfbI/J+NOYej6QM/ 3InyAcEZyg9fducuS5q0OcsO5bPEWccrUz/YlNVsytwQVr2oggFIC2ECD7T+GO26Fz4DHq cI5oSg9jkz7U3FOSFllJ8Xb904NlNyNhymiv0otvNASJ8Bf89u32VmUg0AEzJBYcUUzv1D gbgzqFgNVZ0XpHes9mGdWrnlsTwOoe6/Jj9iDsFKgCyubu/t1qqedz1VuH37IR+Xi+Obzl YJ5rsIFSrD+cuLYnfLAU8Iw1pney0FkWxNidK3How6E+60o2oLcKEo5EOxW5Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1721245836; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=kjLVpiJF3mFUYakdnpDk0UczbiCpUSz0itafGgQ+DFo=; b=tNVa177Zk9hP0BgqSaOxlEzNr35VJsxwUB0/oh4GADhGuNmFgzQYy5NqMTsiCrBJLJ5wdW cfHyBwD7djcn3nQW17UP1b4RtHoaZMZcQZ+zUdh/2rOBFrZqSyqxIFN5rXi6poRHkSp6xs IdROGeXIMna7IPJoNIpby2WRfaZm2Wd0U3Aeaw0ZcDZpD0Rp28zP6kwXDQ6HBC+W3MvKAt YKkGDsJrbqN86aWOC4TwxnSXYS7jR0Wvoa7j/EeipQgNL1p/YFZrfEk4VwfSBFwhUmOXpH lydLJUotVCB9iAPk48vKJf9mTEApErD7B7AX6Fkh9eak5BMnKO4h7Ymp88Nzuw== ARC-Authentication-Results: i=1; rspamd-585d4c99d7-925fm; auth=pass smtp.auth=thundermail smtp.mailfrom=confabulate@kintzios.com X-Sender-Id: thundermail|x-authsender|confabulate@kintzios.com X-MC-Relay: Neutral X-MailChannels-SenderId: thundermail|x-authsender|confabulate@kintzios.com X-MailChannels-Auth-Id: thundermail X-Share-Whistle: 69a32d0f2a1e91ed_1721245837015_1924019732 X-MC-Loop-Signature: 1721245837015:3785068876 X-MC-Ingress-Time: 1721245837015 Received: from mailclean11.thundermail.uk (mailclean11.thundermail.uk [149.255.60.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.119.109.102 (trex/7.0.2); Wed, 17 Jul 2024 19:50:37 +0000 Received: from cloud238.thundercloud.uk (cloud238.thundercloud.uk [149.255.62.116]) by mailclean11.thundermail.uk (Postfix) with ESMTPS id 56AF51E0009 for ; Wed, 17 Jul 2024 20:50:34 +0100 (BST) Authentication-Results: cloud238.thundercloud.uk; spf=pass (sender IP is 217.169.3.230) smtp.mailfrom=confabulate@kintzios.com smtp.helo=rogueboard.localnet Received-SPF: pass (cloud238.thundercloud.uk: connection is authenticated) From: Michael To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] chroot: on update I got "mount: /proc: mount failed: Unknown error 5005.,Unable to mark /proc slave: 32" Date: Wed, 17 Jul 2024 20:50:17 +0100 Message-ID: <4923378.GXAFRqVoOG@rogueboard> In-Reply-To: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1908946.tdWV9SEqCh"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-PPP-Message-ID: <172124583257.1098072.14495021282348860102@cloud238.thundercloud.uk> X-PPP-Vhost: kintzios.com X-Rspamd-Queue-Id: 56AF51E0009 X-Rspamd-Server: mailclean11 X-Spamd-Result: default: False [-1.61 / 999.00]; SIGNED_PGP(-2.00)[]; MID_RHS_NOT_FQDN(0.50)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; ONCE_RECEIVED(0.10)[]; MX_GOOD(-0.01)[]; R_SPF_ALLOW(0.00)[+mx]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:34931, ipnet:149.255.60.0/22, country:GB]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; R_DKIM_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; NEURAL_HAM(-0.00)[-0.978]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; DMARC_POLICY_ALLOW(0.00)[kintzios.com,none]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gentoo-user@lists.gentoo.org]; HAS_REPLYTO(0.00)[confabulate@kintzios.com] X-Rspamd-Action: no action X-Archives-Salt: 244fae1c-28f6-4ac5-8d6e-5501e21e0722 X-Archives-Hash: c837109b5394c5642b49fe3f6abcc0e5 --nextPart1908946.tdWV9SEqCh Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Michael To: gentoo-user@lists.gentoo.org Reply-To: confabulate@kintzios.com Date: Wed, 17 Jul 2024 20:50:17 +0100 Message-ID: <4923378.GXAFRqVoOG@rogueboard> In-Reply-To: References: MIME-Version: 1.0 Hi Vitaly, On Wednesday, 17 July 2024 18:08:08 BST Vitaly Zdanevich wrote: > Hi, I did a chroot according to > https://wiki.gentoo.org/index.php?title=Chroot > > My script in the chroot folder: > > ``` > mount --rbind /dev dev > mount --make-rslave dev > mount -t proc /proc proc > mount --rbind /sys sys > mount --make-rslave sys > mount --rbind /tmp tmp > mount --bind /run run > > mount -o bind /var/db/repos/ var/db/repos/ > > chroot . /bin/bash > > ``` [snip ...] The wiki and the Handbook, explain you need to have a mountpoint for the file system in which you are trying to chroot. For example, the wiki page states: mkdir /mnt/mychroot <== this is the mountpoint cd /mnt/mychroot or if you are trying to chroot on an existing installation on some block device, e.g. say it is partition /dev/sdb3, you would run: mkdir /mnt/mychroot mount /dev/sdb3 /mnt/mychroot Consequently, the mount commands after you mount the OS partition and before you chroot become: cd /mnt/mychroot mount --rbind /dev /mnt/mychroot/dev mount --make-rslave /mnt/mychroot/dev mount -t proc /proc /mnt/mychroot/proc mount --rbind /sys /mnt/mychroot/sys mount --make-rslave /mnt/mychroot/sys mount --rbind /tmp /mnt/mychroot/tmp rmount --bind /run /mnt/mychroot/run After the above you can chroot into the mounted filesystem: chroot /mnt/mychroot /bin/bash The same approach is followed in the Handbook for a new installation: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/ Base#Mounting_the_necessary_filesystems --nextPart1908946.tdWV9SEqCh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmaYIHkACgkQseqq9sKV ZxmBPQ//V465gusXFbgIGPfoMiL27/djQCdCLhQnUni/qGfSjSgV6uVNydvsxDMJ BPWUZjEmKlddOBrbdXiKH+Z1X8v4j623DfS5Qz71g7XsebZiQFXT4KkiR4dF72cv qd8xXJkHn5mLG84k/Mk1Pjwgh9Zg2TB4pw0xbs6PeTaZ6rgU7qCcdEFVj9tdIWVF 7wXjUKI8enQ98TJJkGAr253HzK/+pU0598S/okfomO/z7vb7BZYUN/9gP3yC2gcQ Ob5vO3pm/JpqgfmGefEF+cvktkhT1UsuG5UHkenja6wQ+XZrXh3Nzm2ExnudF7oi /ADB0k+eQdf4xkCHLfMloaY6OkjzhfSrOCFmMpBUNNxkF91vd1MzupyYv4EnIE0P ORtmKhbsok8E4H67Mg3JZEA/Is9KDZgPcbok6yflWjP29GaptvSt327kpz0N3RL6 TdRLKl0qPALaW8TfizBLBvB0q4453eRU6IBF5Or/X6esNMqX85Y5I5M/06JYVaeK TwYZYqXBlAE3Yi3o5gRfz1THDnkRcnbZBXzAuij3ZQM4Gj5FvFhGQAw+wyA0mB2b wPRjNqQH124njzRt8HJlpGyVzN1ZbGMBtY3OHnBAYHLpFrHAsYemGzwcNqjh0uT3 hQ10atJUN+QrbmBF/gGgQ4JH39iZ1WUxVSdSbtN/gC8Kl2PefpE= =Zt2/ -----END PGP SIGNATURE----- --nextPart1908946.tdWV9SEqCh--