-
-
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,13 @@ | ||||||
| # pivot_root | ||||||
|
|
||||||
| > Change the root filesystem to a new directory and move the current root to another location. | ||||||
| > 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>. | ||||||
zhb4 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| - Move the current root to `/old_root` and make `/new_root` the new root: | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| `sudo pivot_root /new_root /new_root/old_root` | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This usage can all be found online, and there are many detailed cases explaining its application cd /mnt/newroot pivot_root . old_root umount -l /old_root
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Thanks, I just needed an example before I suggest any changes. |
||||||
|
|
||||||
| - Display help: | ||||||
|
|
||||||
| `sudo pivot_root --help` | ||||||
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.