PIVOT_ROOT - Online Linux Manual PageSection : 8
Updated : 2022-05-11
Source : util−linux 2.38.1
Note : System Administration
ß.nh . am URL . . . am MTO . . . LINKSTYLE blue R < >
NAMEpivot_root − change the root filesystem

SYNOPSISpivot_root new_root put_old

DESCRIPTIONpivot_root moves the root file system of the current process to the directory put_old and makes new_root the new root file system. Since pivot_root(8) simply calls pivot_root(2), we refer to the man page of the latter for further details. Note that, depending on the implementation of pivot_root, root and current working directory of the caller may or may not change. The following is a sequence for invoking pivot_root that works in either case, assuming that pivot_root and chroot are in the current PATH: .fam C cd new_root pivot_root . put_old exec chroot . command .famNote that chroot must be available under the old root and under the new root, because pivot_root may or may not have implicitly changed the root directory of the shell. Note that exec chroot changes the running executable, which is necessary if the old root directory should be unmounted afterwards. Also note that standard input, output, and error may still point to a device on the old root file system, keeping it busy. They can easily be changed when invoking chroot (see below; note the absence of leading slashes to make it work whether pivot_root has changed the shells root or not).

OPTIONS−h, −−help Display help text and exit. −V, −−version Print version and exit.

EXAMPLEChange the root file system to /dev/hda1 from an interactive shell: .fam C mount /dev/hda1 /new−root cd /new−root pivot_root . old−root exec chroot . sh <dev/console >dev/console 2>&1 umount /old−root .famMount the new root file system over NFS from 10.0.0.1:/my_root and run init: .fam C ifconfig lo 127.0.0.1 up # for portmap # configure Ethernet or such portmap # for lockd (implicitly started by mount) mount −o ro 10.0.0.1:/my_root /mnt killall portmap # portmap keeps old root busy cd /mnt pivot_root . old_root exec chroot . sh −c 'umount /old_root; exec /sbin/init' \ <dev/console >dev/console 2>&1 .fam

SEE ALSOchroot(1), pivot_root(2), mount(8), switch_root(8), umount(8)

REPORTING BUGSFor bug reports, use the issue tracker at <https://github.com/util−linux/util−linux/issues>.

AVAILABILITYThe pivot_root command is part of the util−linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util−linux/>.
0
Johanes Gumabo
Data Size   :   9,209 byte
man-pivot_root.8Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 201,065
Visitor ID   :     :  
Visitor IP   :   3.142.255.103   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_nr_xxx|123|pivot_root.8|13|\n[.ss] 0 |.ss \n[.ss] 0 )         (parse_manual_page_|249|pivot_root.8|22|am|. am URL )         (parse_manual_page_|249|pivot_root.8|24|.|. . )         (parse_manual_page_|249|pivot_root.8|25|am|. am MTO )         (parse_manual_page_|249|pivot_root.8|27|.|. . )         (parse_manual_page_|249|pivot_root.8|28|LINKSTYLE|. LINKSTYLE blue R < > )         (parse_manual_page_|249|pivot_root.8|43|fam|.fam C )         (parse_manual_page_|249|pivot_root.8|47|fam|.fam )         (parse_manual_page_|249|pivot_root.8|71|fam|.fam C )         (parse_manual_page_|249|pivot_root.8|77|fam|.fam )         (parse_manual_page_|249|pivot_root.8|85|fam|.fam C )         (parse_manual_page_|249|pivot_root.8|95|fam|.fam )