Last active
October 13, 2019 18:23
-
-
Save Forty-Bot/7b608f3a17933f007d7ea8fd8d780a1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mount -t tmpfs upper /mnt | |
| mkdir /mnt/{upper,work,newroot} | |
| mount -t overlay overlay -o lowerdir=/,upperdir=/mnt/upper,workdir=/mnt/work /mnt/newroot | |
| cd /mnt/newroot | |
| pivot_root . mnt | |
| # exec chroot . bash | |
| # bash: /mnt/chroot: No such file or directory | |
| # exec /mnt/bin/chroot . bash | |
| # /mnt/bin/chroot: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory | |
| # exec /mnt/bin/busybox chroot . bash | |
| # chroot: can't execute 'bash': No such file or directory | |
| # exec /mnt/bin/bysubox chroot . /mnt/bin/busybox sh | |
| # works but dynamic executables are broken |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment