How can I replace root / filesystem with another filesystem?Given vmlinuz and initrd.gz, how do I find out,...
Can a House-impeached but not Senate-convicted president run for a second term?
Does WSL2 runs Linux in a virtual machine or alongside windows Kernel?
Is the first page of Novel really that important?
What is the most 'environmentally friendly' way to learn to fly?
Search and replace a substring only if another substring is not present
How to understand "...to hide the evidence of mishandled magic, or else hidden by castle-proud house-elves" in this sentence
Meaning of ギャップ in the following sentence
How to call made-up data?
Is this popular optical illusion made of a grey-scale image with coloured lines?
Are the "muddled thoughts" from Synaptic Static a magical effect?
On the expression "sun-down"
How do I safety check that there is no light in Darkroom / Darkbag?
Why does Shift-right says it is bound to right?
Phase portrait of a system of differential equations
A wiild aanimal, a cardinal direction, or a place by the water
How do people drown while wearing a life jacket?
Unlocked Package Dependencies
Different answers of calculations in LuaLaTeX on local computer, lua compiler and on overleaf
How can I perform a deterministic physics simulation?
Why is the Vasa Museum in Stockholm so Popular?
how to change ^L code in many files in ubuntu?
Representation of the concatenation at the type level
Do moonless nights cause dim light to become darkness, and bright light (e.g. from torches) to become dim light?
Why does the friction act on the inward direction when a car makes a turn on a level road?
How can I replace root / filesystem with another filesystem?
Given vmlinuz and initrd.gz, how do I find out, where the kernel is going to load / (root) file system from?SquashFS+UnionFS as root filesystem?Is there a way to get Linux to treat an initramfs as the final root filesystem?Running code before initrd has been removed and after the root filesystem has been mountedPatching the kernel to allow booting without initrdinitrd built with NFS module cannot mount NFS rootHow to populate a root filesystem from scratch?Linux 2.4.0 - How to Create a Root Filesystem for a diskless installWhen can Linux boot with a Read-Only Root Filesystemkernel sysfs doesn't recognize storage kobjects
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
When the Linux kernel starts up, it uses initrd as the root / filesystem, then replaces that with a filesystem partition in fstab.
Based on a test in an early init script, I want to replace that root / filesystem with another filesystem partition. How to do that?
mount init initramfs initrd root-filesystem
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 1 more comment
When the Linux kernel starts up, it uses initrd as the root / filesystem, then replaces that with a filesystem partition in fstab.
Based on a test in an early init script, I want to replace that root / filesystem with another filesystem partition. How to do that?
mount init initramfs initrd root-filesystem
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Are you asking to create a dual boot?
– ryekayo
Aug 18 '14 at 17:24
@ryekayo no, not dual boot. Dual boot is a modification of boot loader. I'm not modifying the boot loader.
– Sepero
Aug 18 '14 at 17:30
Do you mean that you want to go initrd → root #1 → root #2? This isn't possible. But you can modify the content of the initrd and go initrd → root #2. (Are you sure it's an initrd and not an initramfs? Most distributions have switched to initramfs, even though the image file may still be calledinitrd; the principle is the same but the mechanics are a little different.) What tests do you need to make to determine the location of the root filesystem?
– Gilles
Aug 18 '14 at 21:36
Here's an alternative in case you can't do it inside initrd: list all your possible roots as separate boot options in grub.conf, then in an init script usegrub-reboot nto choose one of them if the desired root isn't currently mounted. superuser.com/a/290458/264506 has some details.
– Mark Plotnick
Aug 19 '14 at 0:16
Thanks for the suggestion Mark. Unfortunately the machine is Arm architecture and doesn't use grub.
– Sepero
Aug 24 '14 at 15:35
|
show 1 more comment
When the Linux kernel starts up, it uses initrd as the root / filesystem, then replaces that with a filesystem partition in fstab.
Based on a test in an early init script, I want to replace that root / filesystem with another filesystem partition. How to do that?
mount init initramfs initrd root-filesystem
When the Linux kernel starts up, it uses initrd as the root / filesystem, then replaces that with a filesystem partition in fstab.
Based on a test in an early init script, I want to replace that root / filesystem with another filesystem partition. How to do that?
mount init initramfs initrd root-filesystem
mount init initramfs initrd root-filesystem
asked Aug 18 '14 at 17:22
SeperoSepero
6093 gold badges14 silver badges26 bronze badges
6093 gold badges14 silver badges26 bronze badges
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 16 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Are you asking to create a dual boot?
– ryekayo
Aug 18 '14 at 17:24
@ryekayo no, not dual boot. Dual boot is a modification of boot loader. I'm not modifying the boot loader.
– Sepero
Aug 18 '14 at 17:30
Do you mean that you want to go initrd → root #1 → root #2? This isn't possible. But you can modify the content of the initrd and go initrd → root #2. (Are you sure it's an initrd and not an initramfs? Most distributions have switched to initramfs, even though the image file may still be calledinitrd; the principle is the same but the mechanics are a little different.) What tests do you need to make to determine the location of the root filesystem?
– Gilles
Aug 18 '14 at 21:36
Here's an alternative in case you can't do it inside initrd: list all your possible roots as separate boot options in grub.conf, then in an init script usegrub-reboot nto choose one of them if the desired root isn't currently mounted. superuser.com/a/290458/264506 has some details.
– Mark Plotnick
Aug 19 '14 at 0:16
Thanks for the suggestion Mark. Unfortunately the machine is Arm architecture and doesn't use grub.
– Sepero
Aug 24 '14 at 15:35
|
show 1 more comment
Are you asking to create a dual boot?
– ryekayo
Aug 18 '14 at 17:24
@ryekayo no, not dual boot. Dual boot is a modification of boot loader. I'm not modifying the boot loader.
– Sepero
Aug 18 '14 at 17:30
Do you mean that you want to go initrd → root #1 → root #2? This isn't possible. But you can modify the content of the initrd and go initrd → root #2. (Are you sure it's an initrd and not an initramfs? Most distributions have switched to initramfs, even though the image file may still be calledinitrd; the principle is the same but the mechanics are a little different.) What tests do you need to make to determine the location of the root filesystem?
– Gilles
Aug 18 '14 at 21:36
Here's an alternative in case you can't do it inside initrd: list all your possible roots as separate boot options in grub.conf, then in an init script usegrub-reboot nto choose one of them if the desired root isn't currently mounted. superuser.com/a/290458/264506 has some details.
– Mark Plotnick
Aug 19 '14 at 0:16
Thanks for the suggestion Mark. Unfortunately the machine is Arm architecture and doesn't use grub.
– Sepero
Aug 24 '14 at 15:35
Are you asking to create a dual boot?
– ryekayo
Aug 18 '14 at 17:24
Are you asking to create a dual boot?
– ryekayo
Aug 18 '14 at 17:24
@ryekayo no, not dual boot. Dual boot is a modification of boot loader. I'm not modifying the boot loader.
– Sepero
Aug 18 '14 at 17:30
@ryekayo no, not dual boot. Dual boot is a modification of boot loader. I'm not modifying the boot loader.
– Sepero
Aug 18 '14 at 17:30
Do you mean that you want to go initrd → root #1 → root #2? This isn't possible. But you can modify the content of the initrd and go initrd → root #2. (Are you sure it's an initrd and not an initramfs? Most distributions have switched to initramfs, even though the image file may still be called
initrd; the principle is the same but the mechanics are a little different.) What tests do you need to make to determine the location of the root filesystem?– Gilles
Aug 18 '14 at 21:36
Do you mean that you want to go initrd → root #1 → root #2? This isn't possible. But you can modify the content of the initrd and go initrd → root #2. (Are you sure it's an initrd and not an initramfs? Most distributions have switched to initramfs, even though the image file may still be called
initrd; the principle is the same but the mechanics are a little different.) What tests do you need to make to determine the location of the root filesystem?– Gilles
Aug 18 '14 at 21:36
Here's an alternative in case you can't do it inside initrd: list all your possible roots as separate boot options in grub.conf, then in an init script use
grub-reboot n to choose one of them if the desired root isn't currently mounted. superuser.com/a/290458/264506 has some details.– Mark Plotnick
Aug 19 '14 at 0:16
Here's an alternative in case you can't do it inside initrd: list all your possible roots as separate boot options in grub.conf, then in an init script use
grub-reboot n to choose one of them if the desired root isn't currently mounted. superuser.com/a/290458/264506 has some details.– Mark Plotnick
Aug 19 '14 at 0:16
Thanks for the suggestion Mark. Unfortunately the machine is Arm architecture and doesn't use grub.
– Sepero
Aug 24 '14 at 15:35
Thanks for the suggestion Mark. Unfortunately the machine is Arm architecture and doesn't use grub.
– Sepero
Aug 24 '14 at 15:35
|
show 1 more comment
1 Answer
1
active
oldest
votes
I know this is an old thread, but still came up in Google.
if you stumble on this, look at pivot_root
https://linux.die.net/man/8/pivot_root
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f150827%2fhow-can-i-replace-root-filesystem-with-another-filesystem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I know this is an old thread, but still came up in Google.
if you stumble on this, look at pivot_root
https://linux.die.net/man/8/pivot_root
add a comment |
I know this is an old thread, but still came up in Google.
if you stumble on this, look at pivot_root
https://linux.die.net/man/8/pivot_root
add a comment |
I know this is an old thread, but still came up in Google.
if you stumble on this, look at pivot_root
https://linux.die.net/man/8/pivot_root
I know this is an old thread, but still came up in Google.
if you stumble on this, look at pivot_root
https://linux.die.net/man/8/pivot_root
answered Apr 12 '18 at 21:43
Paul MPaul M
2012 silver badges5 bronze badges
2012 silver badges5 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f150827%2fhow-can-i-replace-root-filesystem-with-another-filesystem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you asking to create a dual boot?
– ryekayo
Aug 18 '14 at 17:24
@ryekayo no, not dual boot. Dual boot is a modification of boot loader. I'm not modifying the boot loader.
– Sepero
Aug 18 '14 at 17:30
Do you mean that you want to go initrd → root #1 → root #2? This isn't possible. But you can modify the content of the initrd and go initrd → root #2. (Are you sure it's an initrd and not an initramfs? Most distributions have switched to initramfs, even though the image file may still be called
initrd; the principle is the same but the mechanics are a little different.) What tests do you need to make to determine the location of the root filesystem?– Gilles
Aug 18 '14 at 21:36
Here's an alternative in case you can't do it inside initrd: list all your possible roots as separate boot options in grub.conf, then in an init script use
grub-reboot nto choose one of them if the desired root isn't currently mounted. superuser.com/a/290458/264506 has some details.– Mark Plotnick
Aug 19 '14 at 0:16
Thanks for the suggestion Mark. Unfortunately the machine is Arm architecture and doesn't use grub.
– Sepero
Aug 24 '14 at 15:35