Chroot

From UVOO Tech Wiki
Revision as of 15:12, 17 May 2020 by Busk (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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