-
-
Notifications
You must be signed in to change notification settings - Fork 5k
pivot_root: add page #19673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
pivot_root: add page #19673
Conversation
|
The build for this PR failed with the following error(s) at commit Please fix the error(s) and push again. |
Co-authored-by: Managor <[email protected]>
| - Move the current root to `/old_root` and make `/new_root` the new root: | ||
|
|
||
| `sudo pivot_root /new_root /new_root/old_root` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give me an example on how this should look like in a real world scenario?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give me an example on how this should look like in a real world scenario?
This usage can all be found online, and there are many detailed cases explaining its application
mkdir -p /mnt/newroot/old_root
cd /mnt/newroot
pivot_root . old_root
umount -l /old_root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `sudo pivot_root /new_root /new_root/old_root` | |
| `sudo pivot_root {{path/to/new_root}} {{path/to/new_root/old_root}}` |
Thanks, I just needed an example before I suggest any changes.
|
Also, how does this command differ from |
This usage can all be found online. There are many detailed examples of its application that can all be found |
For the usage of this command, I suggest you search online. You can basically understand it. It's the same as ordinary linux commands |
| @@ -0,0 +1,13 @@ | |||
| # pivot_root | |||
|
|
|||
| > Change the root filesystem to a new directory and move the current root to another location. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| > Change the root filesystem to a new directory and move the current root to another location. | |
| > Change the root filesystem to a new directory and move the current root to a subdirectory of the new root. |
| > Commonly used during system initialization (e.g., in initramfs) to switch from a temporary root to the real root filesystem. | ||
| > More information: <https://manned.org/pivot_root.8>. | ||
| - Move the current root to `/old_root` and make `/new_root` the new root: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Move the current root to `/old_root` and make `/new_root` the new root: | |
| - Make `/new_root` the new root (`/`) and move current root to a subdirectory of it: |
Checklist
common,linux,osx,windows,sunos,android, etc.