Monday, December 21, 2009

pivot_root

http://www.kernel.org/doc/man-pages/online/pages/man2/pivot_root.2.html
http://lists.debian.org/debian-handheld/2004/12/msg00029.html

You can't go back like chroot when using pivot_root.


The main difference is that pivot_root is intended to switch the complete system over to a new root directory and remove dependencies on the old one, so that you would be able to unmount the original root directory and proceed as if it had never been in use. chroot is intended to apply for the lifetime of a single process, with the rest of the system continuing to run in the old root dir, and the system being unchanged when the chrooted process exits.


The following restrictions apply to new_root and put_old:

- They must be directories.

- new_root and put_old must not be on the same file system as the current root.

- put_old must be underneath new_root, that is, adding a non-zero number of /.. to the string pointed to by put_old must yield the same directory as new_root.

- No other file system may be mounted on put_old.

No comments:

Related Posts Plugin for WordPress, Blogger...