Failed to create lib/libc.musl-armhf.so.1: Operation not permitted
No idea why I am getting Operation not permitted errors as root?
Trying to set up chroot on a Raspberry Pi Zero while already SSH'd into Alpine.
pi:/home/brandon# uname -a
Linux pi 5.4.82-0-rpi #1-Alpine Thu Dec 10 08:59:43 UTC 2020 armv6l Linux
pi:/home/brandon# mkdir /media/mmcblk0p1/chroot
pi:/home/brandon# tar -xzf apk-tools-static-2.10.5-r1.apk -C /media/mmcblk0p1/chroot/
pi:/home/brandon# /media/mmcblk0p1/chroot/sbin/apk.static -X https://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted -p /media/mmcblk0p1/chroot --i
nitdb add alpine-base
fetch https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/armhf/APKINDEX.tar.gz
(1/19) Installing musl (1.1.24-r10)
ERROR: Failed to create lib/libc.musl-armhf.so.1: Operation not permitted
ERROR: musl-1.1.24-r10: failed to rename lib/.apk.9515002d69a704922ec64ed91637d14737d574e2b42faa53 to lib/libc.musl-armhf.so.1.
(2/19) Installing busybox (1.31.1-r19)
ERROR: Failed to create bin/sh: Operation not permitted
ERROR: busybox-1.31.1-r19: failed to rename bin/.apk.81e31612de5fd2307f03c3d021cdb29bb974271bb8e0add1 to bin/sh.
Executing busybox-1.31.1-r19.post-install
ERROR: busybox-1.31.1-r19.post-install: script exited with error 127
(3/19) Installing alpine-baselayout (3.2.0-r7)
Executing alpine-baselayout-3.2.0-r7.pre-install
ERROR: alpine-baselayout-3.2.0-r7.pre-install: script exited with error 127
ERROR: Failed to create etc/mtab: Operation not permitted
ERROR: Failed to set ownership on etc/.apk.495842ab4ef6caf39f00c713de8d1dd1d55acca658b1ee28: Operation not permitted
ERROR: Failed to create var/run: Operation not permitted
ERROR: Failed to create var/spool/cron/crontabs: Operation not permitted
ERROR: Failed to create var/spool/mail: Operation not permitted
ERROR: alpine-baselayout-3.2.0-r7: failed to rename etc/.apk.fcd3ed8165e7d73b895fca4b744c49c2f4fa0886059a748b to etc/mtab.
ERROR: alpine-baselayout-3.2.0-r7: failed to rename var/.apk.f752bb51c942c7b3b4e0cf24875e21be9cdcd4595d8db384 to var/run.
ERROR: alpine-baselayout-3.2.0-r7: failed to rename var/spool/.apk.1330e212b7b42701c34c05275c3aba9bcde6d872c51306ee to var/spool/mail.
ERROR: alpine-baselayout-3.2.0-r7: failed to rename var/spool/cron/.apk.925c57471bbb2fc6aef2916a28302c3e14e4a58f119af7e6 to var/spool/cron/crontabs.
Executing alpine-baselayout-3.2.0-r7.post-install
ERROR: alpine-baselayout-3.2.0-r7.post-install: script exited with error 127
(4/19) Installing openrc (0.42.1-r11)
ERROR: Failed to create etc/init.d/functions.sh: Operation not permitted
ERROR: Failed to create sbin/rc-sstat: Operation not permitted
ERROR: Failed to create sbin/service: Operation not permitted
ERROR: openrc-0.42.1-r11: failed to rename etc/init.d/.apk.dc9f86b14bc619d31f26a5f80c4b68d189a245a2e272ef3c to etc/init.d/functions.sh.
ERROR: openrc-0.42.1-r11: failed to rename sbin/.apk.a3de5874b1eca8c83fa4a02bb835cd057a1f027325416c36 to sbin/rc-sstat.
ERROR: openrc-0.42.1-r11: failed to rename sbin/.apk.93045393f9e37e6cceb04553fabdc123c9ea8221f31ee5e7 to sbin/service.
Executing openrc-0.42.1-r11.post-install
ERROR: openrc-0.42.1-r11.post-install: script exited with error 127
(5/19) Installing alpine-conf (3.9.0-r1)
ERROR: Failed to create sbin/lbu_commit: Operation not permitted
ERROR: Failed to create sbin/lbu_exclude: Operation not permitted
ERROR: Failed to create sbin/lbu_include: Operation not permitted
ERROR: Failed to create sbin/lbu_status: Operation not permitted
ERROR: Failed to create sbin/lbu_update: Operation not permitted
ERROR: alpine-conf-3.9.0-r1: failed to rename sbin/.apk.32a7a3deb8963534924612eb6559e02c1bfe84d6566779b8 to sbin/lbu_commit.
ERROR: alpine-conf-3.9.0-r1: failed to rename sbin/.apk.e27894b5836cdf8d1e41197f74404cf78b8358b0c60f60e1 to sbin/lbu_exclude.
ERROR: alpine-conf-3.9.0-r1: failed to rename sbin/.apk.1950f3333b2a356cde52995aff02e35021c0eb9d51657f7b to sbin/lbu_include.
ERROR: alpine-conf-3.9.0-r1: failed to rename sbin/.apk.61644974a42d911185188faaec02bed101ba81570300b812 to sbin/lbu_status.
ERROR: alpine-conf-3.9.0-r1: failed to rename sbin/.apk.175d8accf16ecc20922e25777701fa07a35394f268204ab1 to sbin/lbu_update.
(6/19) Installing libcrypto1.1 (1.1.1i-r0)
ERROR: Failed to create etc/ssl/misc/tsget: Operation not permitted
ERROR: Failed to create usr/lib/libcrypto.so.1.1: Operation not permitted
ERROR: libcrypto1.1-1.1.1i-r0: failed to rename etc/ssl/misc/.apk.c6053a1e71934a4124bd9d0a1c37c9b26eb21572466de7fd to etc/ssl/misc/tsget.
ERROR: libcrypto1.1-1.1.1i-r0: failed to rename usr/lib/.apk.e6399721458ef4d59829888e8c40b687dd1d3eb03d366f53 to usr/lib/libcrypto.so.1.1.
(7/19) Installing libssl1.1 (1.1.1i-r0)
ERROR: Failed to create usr/lib/libssl.so.1.1: Operation not permitted
ERROR: libssl1.1-1.1.1i-r0: failed to rename usr/lib/.apk.bce9754a08a2d094c12a507745afba96edd648ecd622e0eb to usr/lib/libssl.so.1.1.
(8/19) Installing ca-certificates-bundle (20191127-r4)
ERROR: Failed to create etc/ssl/cert.pem: Operation not permitted
ERROR: ca-certificates-bundle-20191127-r4: failed to rename etc/ssl/.apk.9e2754c1d351390138c4dbc6dc67c53949c57f6934547649 to etc/ssl/cert.pem.
(9/19) Installing libtls-standalone (2.9.1-r1)
ERROR: Failed to create usr/lib/libtls-standalone.so.1: Operation not permitted
ERROR: libtls-standalone-2.9.1-r1: failed to rename usr/lib/.apk.90d29c63d78653a770f4de6112d6fb6fa4b260c2bbe0b819 to usr/lib/libtls-standalone.so.1.
(10/19) Installing ssl_client (1.31.1-r19)
(11/19) Installing zlib (1.2.11-r3)
ERROR: Failed to create lib/libz.so.1: Operation not permitted
ERROR: zlib-1.2.11-r3: failed to rename lib/.apk.18f76108508a22199d34ce6cd480f511897ca79ad2b6d4eb to lib/libz.so.1.
(12/19) Installing apk-tools (2.10.5-r1)
(13/19) Installing busybox-suid (1.31.1-r19)
ERROR: Failed to set file permissions on bin/.apk.f02148a9023df4219fcb5a5f42b49c3b465d106d3e9ef45f: Operation not permitted
(14/19) Installing busybox-initscripts (3.2-r2)
Executing busybox-initscripts-3.2-r2.post-install
ERROR: busybox-initscripts-3.2-r2.post-install: script exited with error 127
(15/19) Installing scanelf (1.2.6-r0)
(16/19) Installing musl-utils (1.1.24-r10)
(17/19) Installing libc-utils (0.7.2-r3)
(18/19) Installing alpine-keys (2.2-r0)
ERROR: Failed to create usr/share/apk/keys/aarch64/alpine-devel@lists.alpinelinux.org-58199dcc.rsa.pub: Operation not permitted
ERROR: Failed to create usr/share/apk/keys/armhf/alpine-devel@lists.alpinelinux.org-524d27bb.rsa.pub: Operation not permitted
ERROR: Failed to create usr/share/apk/keys/mips64/alpine-devel@lists.alpinelinux.org-5e69ca50.rsa.pub: Operation not permitted
ERROR: Failed to create usr/share/apk/keys/ppc64le/alpine-devel@lists.alpinelinux.org-58cbb476.rsa.pub: Operation not permitted
ERROR: Failed to create usr/share/apk/keys/s390x/alpine-devel@lists.alpinelinux.org-58e4f17d.rsa.pub: Operation not permitted
ERROR: Failed to create usr/share/apk/keys/x86/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub: Operation not permitted
ERROR: Failed to create usr/share/apk/keys/x86/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub: Operation not permitted
ERROR: Failed to create usr/share/apk/keys/x86_64/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub: Operation not permitted
ERROR: Failed to create usr/share/apk/keys/x86_64/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub: Operation not permitted
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/aarch64/.apk.5acace59dced97bbc8cd7e95542fcb2175b8b8e9bb185683 to usr/share/apk/keys/aarch64/alpine-devel@lists.alpinelinux.org-58199dcc.rsa.pub.
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/armhf/.apk.fd4146477eb502ba84c48be67f680f6001172e692cc7bf59 to usr/share/apk/keys/armhf/alpine-devel@lists.alpinelinux.org-524d27bb.rsa.pub.
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/mips64/.apk.e9bbaa27fbec2bacaa1921ac1f87aaa158348b380dde0c0e to usr/share/apk/keys/mips64/alpine-devel@lists.alpinelinux.org-5e69ca50.rsa.pub.
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/ppc64le/.apk.71de2281b2411c9847c62b5f7559c425cd8b966d947db268 to usr/share/apk/keys/ppc64le/alpine-devel@lists.alpinelinux.org-58cbb476.rsa.pub.
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/s390x/.apk.7cac83547c6b8f5940c2ce103d1b96316f96bb1100966322 to usr/share/apk/keys/s390x/alpine-devel@lists.alpinelinux.org-58e4f17d.rsa.pub.
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/x86/.apk.ec803979372371729da8b6c0124f0dda890fe0d3ece65f75 to usr/share/apk/keys/x86/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub.
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/x86/.apk.bacdf5bf7c07dac6d41d2245a886dedfad5f8ba9faa56c7a to usr/share/apk/keys/x86/alpine-devel@lists.alpinelinux.org-5243ef4b.rsa.pub.
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/x86_64/.apk.3af2b6045837c9c3af07f3e9e774fc0d6feee7b410f8d939 to usr/share/apk/keys/x86_64/alpine-devel@lists.alpinelinux.org-4a6a0840.rsa.pub.
ERROR: alpine-keys-2.2-r0: failed to rename usr/share/apk/keys/x86_64/.apk.9c3904f53d2b9fdb14f43a833ee6b4084ed922fba8ee7ce4 to usr/share/apk/keys/x86_64/alpine-devel@lists.alpinelinux.org-5261cecb.rsa.pub.
(19/19) Installing alpine-base (3.12.2-r0)
Executing busybox-1.31.1-r19.trigger
ERROR: busybox-1.31.1-r19.trigger: script exited with error 127
13 errors; 7 MiB in 19 packages