Difference between revisions of "Chroot"
Jump to navigation
Jump to search
(Created page with "# Using chroot /bin/bash depends of course on libc, ld-linux, libdl etc., you can use ldd /bin/bash to see which libraries it requires. 1) You can mount -o bind these direc...") |
(No difference)
|
Revision as of 15:12, 17 May 2020
Using chroot
/bin/bash depends of course on libc, ld-linux, libdl etc., you can use ldd /bin/bash to see which libraries it requires.
1) You can mount -o bind these directories under chroot 2) Or you can copy these libraries to chroot, if you don't trust the chrooted env to not corrupt them, like so:
cp main rootfs/ cp -a /usr rootfs/ cp -a /lib rootfs/ cp -a /lib64 rootfs/
chmod rootfs
chroot --userspec=test1:test1 ./rootfs /main