You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using crun from initramfs and was running into pivot_root errors because the rootfs mount has no parent. I found a workaround in this comment which I'm reproducing below
unshare --mount
mount --rbind / /abc --mkdir
cd /abc
mount --move . /
chroot .
# bwrap will not get EINVAL from pivot_root() anymore
I am wondering if you think this would be worthwhile to add as an option like --pivot-rootfs <dir> where it would do the above steps using the given <dir> to work from. I'm planning on writing a separate wrapper anyways but thought it might be useful to have builtin. I could work on putting together a PR too with some direction.
The text was updated successfully, but these errors were encountered:
I am using
crun
from initramfs and was running intopivot_root
errors because the rootfs mount has no parent. I found a workaround in this comment which I'm reproducing belowI've successfully used this (notes here).
I am wondering if you think this would be worthwhile to add as an option like
--pivot-rootfs <dir>
where it would do the above steps using the given<dir>
to work from. I'm planning on writing a separate wrapper anyways but thought it might be useful to have builtin. I could work on putting together a PR too with some direction.The text was updated successfully, but these errors were encountered: