From 88879e332064c47e0fd8716bd6a578634927d176 Mon Sep 17 00:00:00 2001 From: zhb4 <161548655+zhb4@users.noreply.github.com> Date: Fri, 28 Nov 2025 17:49:52 +0800 Subject: [PATCH 1/9] Create pivot_root.md --- pages/linux/pivot_root.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pages/linux/pivot_root.md diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md new file mode 100644 index 00000000000000..66edd461b53874 --- /dev/null +++ b/pages/linux/pivot_root.md @@ -0,0 +1,14 @@ +# 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: . + + +- Move the current root to `/old_root` and make `/new_root` the new root: + + `sudo pivot_root /new_root /new_root/old_root` + +- Display help: + +`sudo pivot_root --help` From 5127e246682da92d80f0e0fbec698f3e281c5528 Mon Sep 17 00:00:00 2001 From: zhb4 <161548655+zhb4@users.noreply.github.com> Date: Fri, 28 Nov 2025 17:51:13 +0800 Subject: [PATCH 2/9] Update pivot_root.md --- pages/linux/pivot_root.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md index 66edd461b53874..b3834b04db8c44 100644 --- a/pages/linux/pivot_root.md +++ b/pages/linux/pivot_root.md @@ -7,7 +7,7 @@ - Move the current root to `/old_root` and make `/new_root` the new root: - `sudo pivot_root /new_root /new_root/old_root` +`sudo pivot_root /new_root /new_root/old_root` - Display help: From 508e61747da8c7fa63fb2f717322fde9f49f2386 Mon Sep 17 00:00:00 2001 From: zhb4 <161548655+zhb4@users.noreply.github.com> Date: Fri, 28 Nov 2025 17:55:32 +0800 Subject: [PATCH 3/9] Update pivot_root.md --- pages/linux/pivot_root.md | 1 - 1 file changed, 1 deletion(-) diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md index b3834b04db8c44..3c5400838252e2 100644 --- a/pages/linux/pivot_root.md +++ b/pages/linux/pivot_root.md @@ -4,7 +4,6 @@ > Commonly used during system initialization (e.g., in initramfs) to switch from a temporary root to the real root filesystem. > More information: . - - Move the current root to `/old_root` and make `/new_root` the new root: `sudo pivot_root /new_root /new_root/old_root` From 788dc4adbddab184cc0d3bc93b2d58f4e2cd8904 Mon Sep 17 00:00:00 2001 From: zhb4 <161548655+zhb4@users.noreply.github.com> Date: Mon, 1 Dec 2025 09:37:44 +0800 Subject: [PATCH 4/9] Update pages/linux/pivot_root.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/linux/pivot_root.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md index 3c5400838252e2..8ef7fd48816b17 100644 --- a/pages/linux/pivot_root.md +++ b/pages/linux/pivot_root.md @@ -2,7 +2,7 @@ > 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: . +> More information: . - Move the current root to `/old_root` and make `/new_root` the new root: From 66c62f5a55477c652edb6ae3d099272340721e43 Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Sun, 7 Dec 2025 03:21:31 +0100 Subject: [PATCH 5/9] Update pivot_root.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/linux/pivot_root.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md index 8ef7fd48816b17..064aa31dc79242 100644 --- a/pages/linux/pivot_root.md +++ b/pages/linux/pivot_root.md @@ -1,6 +1,6 @@ # pivot_root -> 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: . From a385c20be81099d12c0cc2c976cbb1a059a74e60 Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Sun, 7 Dec 2025 03:21:41 +0100 Subject: [PATCH 6/9] Update pivot_root.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/linux/pivot_root.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md index 064aa31dc79242..e60dd5a9c404e4 100644 --- a/pages/linux/pivot_root.md +++ b/pages/linux/pivot_root.md @@ -4,7 +4,7 @@ > Commonly used during system initialization (e.g., in initramfs) to switch from a temporary root to the real root filesystem. > More information: . -- 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: `sudo pivot_root /new_root /new_root/old_root` From 32b4d4b13aa139df47ce25312029779e04572fb9 Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Sun, 7 Dec 2025 03:22:09 +0100 Subject: [PATCH 7/9] Update pivot_root.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/linux/pivot_root.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md index e60dd5a9c404e4..77ed8251f72c7d 100644 --- a/pages/linux/pivot_root.md +++ b/pages/linux/pivot_root.md @@ -6,7 +6,7 @@ - Make `/new_root` the new root (`/`) and move current root to a subdirectory of it: -`sudo pivot_root /new_root /new_root/old_root` +`sudo pivot_root {{path/to/new_root}} {{path/to/new_root/old_root}}` - Display help: From 7ab54e4a11c42f7adefc22ca3259834680aa9e9d Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Mon, 8 Dec 2025 02:00:24 +0100 Subject: [PATCH 8/9] Update pivot_root.md Co-authored-by: Ivan Baluta <50071699+ivanbaluta@users.noreply.github.com> --- pages/linux/pivot_root.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md index 77ed8251f72c7d..847c163d1dc25f 100644 --- a/pages/linux/pivot_root.md +++ b/pages/linux/pivot_root.md @@ -10,4 +10,4 @@ - Display help: -`sudo pivot_root --help` +`pivot_root {{[-h|--help]}}` From a3c88d90a97bee2658276424d0e63d50c13e2ad3 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Mon, 8 Dec 2025 03:02:31 +0200 Subject: [PATCH 9/9] Update pages/linux/pivot_root.md Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --- pages/linux/pivot_root.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/pivot_root.md b/pages/linux/pivot_root.md index 847c163d1dc25f..eae8b96e4c9596 100644 --- a/pages/linux/pivot_root.md +++ b/pages/linux/pivot_root.md @@ -1,7 +1,7 @@ # pivot_root > 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. +> Commonly used during system initialization (e.g., in `initramfs`) to switch from a temporary root to the real root filesystem. > More information: . - Make `/new_root` the new root (`/`) and move current root to a subdirectory of it: