Add (already created) partition for /home after OS installation The 2019 Stack Overflow Developer Survey Results Are InHow do I permanently mount a separate partition as folder in a separate home partition?/home partitionumount /home does not workThe file system type of my home partition is 'swsuspend'. Is this recoverable?How do you access the contents of a previous mount after switching to a different the partition?After setting a new drive to be the home partition, where can I find the old /home files?Encrypted (luks) + LVM Ubuntu installation where /home is encrypted as well (ecryptfs): How to make a new partition for /home?Not mounting Multiple NFS Share Directories using fstab on RHEL 7Is it possible to run a fstab present in non-root partition on FreeBSD bootup?FreeBSD can't mount home partition
Where does the "burst of radiance" from Holy Weapon originate?
If a poisoned arrow's piercing damage is reduced to 0, do you still get poisoned?
I see my dog run
Why could you hear an Amstrad CPC working?
In microwave frequencies, do you use a circulator when you need a (near) perfect diode?
Why is the maximum length of openwrt’s root password 8 characters?
Is three citations per paragraph excessive for undergraduate research paper?
What does Linus Torvalds mean when he says that Git "never ever" tracks a file?
Is "plugging out" electronic devices an American expression?
Is domain driven design an anti-SQL pattern?
Springs with some finite mass
I looked up a future colleague on LinkedIn before I started a job. I told my colleague about it and he seemed surprised. Should I apologize?
Understanding the implication of what "well-defined" means for the operation in quotient group
What tool would a Roman-age civilization have to grind silver and other metals into dust?
aging parents with no investments
How come people say “Would of”?
Are USB sockets on wall outlets live all the time, even when the switch is off?
Time travel alters history but people keep saying nothing's changed
Manuscript was "unsubmitted" because the manuscript was deposited in Arxiv Preprints
Is flight data recorder erased after every flight?
How to reverse every other sublist of a list?
How are circuits which use complex ICs normally simulated?
Output the Arecibo Message
Geography at the pixel level
Add (already created) partition for /home after OS installation
The 2019 Stack Overflow Developer Survey Results Are InHow do I permanently mount a separate partition as folder in a separate home partition?/home partitionumount /home does not workThe file system type of my home partition is 'swsuspend'. Is this recoverable?How do you access the contents of a previous mount after switching to a different the partition?After setting a new drive to be the home partition, where can I find the old /home files?Encrypted (luks) + LVM Ubuntu installation where /home is encrypted as well (ecryptfs): How to make a new partition for /home?Not mounting Multiple NFS Share Directories using fstab on RHEL 7Is it possible to run a fstab present in non-root partition on FreeBSD bootup?FreeBSD can't mount home partition
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I made a separate partition for /home
, but during installation process I forgot to mount it and hence no entry was made in fstab.
I had everything in partition under the root ( well not the swap and efi system partition). I realised what I did, very late and by that time I had already installed packages and wrote data in the home directory.
Now what I want to know is “is there any way possible to move my home directory to a separate partition with out losing any data?”
I was thinking of doing something like mounting the root directory in /mnt
and than mount a new partition(for home) in /mnt/home
from a liveUSB and than generate the fstab.
But I am like 79% sure that this will wipe out my home directory.
SPEC: Arch Linux x86_64 latest kernel (5.0.4)
partition fstab home move-partition
add a comment |
I made a separate partition for /home
, but during installation process I forgot to mount it and hence no entry was made in fstab.
I had everything in partition under the root ( well not the swap and efi system partition). I realised what I did, very late and by that time I had already installed packages and wrote data in the home directory.
Now what I want to know is “is there any way possible to move my home directory to a separate partition with out losing any data?”
I was thinking of doing something like mounting the root directory in /mnt
and than mount a new partition(for home) in /mnt/home
from a liveUSB and than generate the fstab.
But I am like 79% sure that this will wipe out my home directory.
SPEC: Arch Linux x86_64 latest kernel (5.0.4)
partition fstab home move-partition
add a comment |
I made a separate partition for /home
, but during installation process I forgot to mount it and hence no entry was made in fstab.
I had everything in partition under the root ( well not the swap and efi system partition). I realised what I did, very late and by that time I had already installed packages and wrote data in the home directory.
Now what I want to know is “is there any way possible to move my home directory to a separate partition with out losing any data?”
I was thinking of doing something like mounting the root directory in /mnt
and than mount a new partition(for home) in /mnt/home
from a liveUSB and than generate the fstab.
But I am like 79% sure that this will wipe out my home directory.
SPEC: Arch Linux x86_64 latest kernel (5.0.4)
partition fstab home move-partition
I made a separate partition for /home
, but during installation process I forgot to mount it and hence no entry was made in fstab.
I had everything in partition under the root ( well not the swap and efi system partition). I realised what I did, very late and by that time I had already installed packages and wrote data in the home directory.
Now what I want to know is “is there any way possible to move my home directory to a separate partition with out losing any data?”
I was thinking of doing something like mounting the root directory in /mnt
and than mount a new partition(for home) in /mnt/home
from a liveUSB and than generate the fstab.
But I am like 79% sure that this will wipe out my home directory.
SPEC: Arch Linux x86_64 latest kernel (5.0.4)
partition fstab home move-partition
partition fstab home move-partition
edited Apr 6 at 11:43
Paradox
483317
483317
asked Apr 6 at 9:22
Just KhaithangJust Khaithang
207
207
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Because you already have an home partition, we should be able to do this with out a live OS.
- mount the new home on
/mnt
- move files from old-home (
/home
), to new home (/mnt
). (/home
should now be empty). - remount new-home to
/home
(bind mountsudo mkdir -p /home && sudo mount --bind /mnt /home
(you can also use--move
, in place of--bind
), or unmount then mount).
It is not as you want, but the mount is not persistent.
- edit
/etc/fstab
(There may be tools to help you with this, I can't remember).
Will the installed packages turn out fine after this ? Because I have installed package in my home directory. Other files(music ,videos , text files ) will be okay I know , but the I am worried that this may render the environment variables of the software defunct. I am not sure though.
– Just Khaithang
Apr 6 at 10:09
You need to do the move as root, to ensure that ownership info is not lost. However because it will all end up back in/home
the environment variable will be OK. Just don't use any of these files during he migration.
– ctrl-alt-delor
Apr 6 at 10:15
what if instead of move , I do copy? just asking. I mean will original files be erased ? or I will end up with two home directory,?
– Just Khaithang
Apr 6 at 10:21
Did you meancp
. If so then the originals will remain, but will be covered by the mount. You can do this, and remove them (or not) latter. You can use a bind mount to mount this part of the root partition on to/mnt
, when you want to see / remove them.
– ctrl-alt-delor
Apr 6 at 10:24
I can mount the partition to home but cannot bind mount it. I think bind mount is not possible with partition?
– Just Khaithang
2 days ago
|
show 5 more comments
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%2f510872%2fadd-already-created-partition-for-home-after-os-installation%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
Because you already have an home partition, we should be able to do this with out a live OS.
- mount the new home on
/mnt
- move files from old-home (
/home
), to new home (/mnt
). (/home
should now be empty). - remount new-home to
/home
(bind mountsudo mkdir -p /home && sudo mount --bind /mnt /home
(you can also use--move
, in place of--bind
), or unmount then mount).
It is not as you want, but the mount is not persistent.
- edit
/etc/fstab
(There may be tools to help you with this, I can't remember).
Will the installed packages turn out fine after this ? Because I have installed package in my home directory. Other files(music ,videos , text files ) will be okay I know , but the I am worried that this may render the environment variables of the software defunct. I am not sure though.
– Just Khaithang
Apr 6 at 10:09
You need to do the move as root, to ensure that ownership info is not lost. However because it will all end up back in/home
the environment variable will be OK. Just don't use any of these files during he migration.
– ctrl-alt-delor
Apr 6 at 10:15
what if instead of move , I do copy? just asking. I mean will original files be erased ? or I will end up with two home directory,?
– Just Khaithang
Apr 6 at 10:21
Did you meancp
. If so then the originals will remain, but will be covered by the mount. You can do this, and remove them (or not) latter. You can use a bind mount to mount this part of the root partition on to/mnt
, when you want to see / remove them.
– ctrl-alt-delor
Apr 6 at 10:24
I can mount the partition to home but cannot bind mount it. I think bind mount is not possible with partition?
– Just Khaithang
2 days ago
|
show 5 more comments
Because you already have an home partition, we should be able to do this with out a live OS.
- mount the new home on
/mnt
- move files from old-home (
/home
), to new home (/mnt
). (/home
should now be empty). - remount new-home to
/home
(bind mountsudo mkdir -p /home && sudo mount --bind /mnt /home
(you can also use--move
, in place of--bind
), or unmount then mount).
It is not as you want, but the mount is not persistent.
- edit
/etc/fstab
(There may be tools to help you with this, I can't remember).
Will the installed packages turn out fine after this ? Because I have installed package in my home directory. Other files(music ,videos , text files ) will be okay I know , but the I am worried that this may render the environment variables of the software defunct. I am not sure though.
– Just Khaithang
Apr 6 at 10:09
You need to do the move as root, to ensure that ownership info is not lost. However because it will all end up back in/home
the environment variable will be OK. Just don't use any of these files during he migration.
– ctrl-alt-delor
Apr 6 at 10:15
what if instead of move , I do copy? just asking. I mean will original files be erased ? or I will end up with two home directory,?
– Just Khaithang
Apr 6 at 10:21
Did you meancp
. If so then the originals will remain, but will be covered by the mount. You can do this, and remove them (or not) latter. You can use a bind mount to mount this part of the root partition on to/mnt
, when you want to see / remove them.
– ctrl-alt-delor
Apr 6 at 10:24
I can mount the partition to home but cannot bind mount it. I think bind mount is not possible with partition?
– Just Khaithang
2 days ago
|
show 5 more comments
Because you already have an home partition, we should be able to do this with out a live OS.
- mount the new home on
/mnt
- move files from old-home (
/home
), to new home (/mnt
). (/home
should now be empty). - remount new-home to
/home
(bind mountsudo mkdir -p /home && sudo mount --bind /mnt /home
(you can also use--move
, in place of--bind
), or unmount then mount).
It is not as you want, but the mount is not persistent.
- edit
/etc/fstab
(There may be tools to help you with this, I can't remember).
Because you already have an home partition, we should be able to do this with out a live OS.
- mount the new home on
/mnt
- move files from old-home (
/home
), to new home (/mnt
). (/home
should now be empty). - remount new-home to
/home
(bind mountsudo mkdir -p /home && sudo mount --bind /mnt /home
(you can also use--move
, in place of--bind
), or unmount then mount).
It is not as you want, but the mount is not persistent.
- edit
/etc/fstab
(There may be tools to help you with this, I can't remember).
edited yesterday
answered Apr 6 at 9:49
ctrl-alt-delorctrl-alt-delor
12.4k52662
12.4k52662
Will the installed packages turn out fine after this ? Because I have installed package in my home directory. Other files(music ,videos , text files ) will be okay I know , but the I am worried that this may render the environment variables of the software defunct. I am not sure though.
– Just Khaithang
Apr 6 at 10:09
You need to do the move as root, to ensure that ownership info is not lost. However because it will all end up back in/home
the environment variable will be OK. Just don't use any of these files during he migration.
– ctrl-alt-delor
Apr 6 at 10:15
what if instead of move , I do copy? just asking. I mean will original files be erased ? or I will end up with two home directory,?
– Just Khaithang
Apr 6 at 10:21
Did you meancp
. If so then the originals will remain, but will be covered by the mount. You can do this, and remove them (or not) latter. You can use a bind mount to mount this part of the root partition on to/mnt
, when you want to see / remove them.
– ctrl-alt-delor
Apr 6 at 10:24
I can mount the partition to home but cannot bind mount it. I think bind mount is not possible with partition?
– Just Khaithang
2 days ago
|
show 5 more comments
Will the installed packages turn out fine after this ? Because I have installed package in my home directory. Other files(music ,videos , text files ) will be okay I know , but the I am worried that this may render the environment variables of the software defunct. I am not sure though.
– Just Khaithang
Apr 6 at 10:09
You need to do the move as root, to ensure that ownership info is not lost. However because it will all end up back in/home
the environment variable will be OK. Just don't use any of these files during he migration.
– ctrl-alt-delor
Apr 6 at 10:15
what if instead of move , I do copy? just asking. I mean will original files be erased ? or I will end up with two home directory,?
– Just Khaithang
Apr 6 at 10:21
Did you meancp
. If so then the originals will remain, but will be covered by the mount. You can do this, and remove them (or not) latter. You can use a bind mount to mount this part of the root partition on to/mnt
, when you want to see / remove them.
– ctrl-alt-delor
Apr 6 at 10:24
I can mount the partition to home but cannot bind mount it. I think bind mount is not possible with partition?
– Just Khaithang
2 days ago
Will the installed packages turn out fine after this ? Because I have installed package in my home directory. Other files(music ,videos , text files ) will be okay I know , but the I am worried that this may render the environment variables of the software defunct. I am not sure though.
– Just Khaithang
Apr 6 at 10:09
Will the installed packages turn out fine after this ? Because I have installed package in my home directory. Other files(music ,videos , text files ) will be okay I know , but the I am worried that this may render the environment variables of the software defunct. I am not sure though.
– Just Khaithang
Apr 6 at 10:09
You need to do the move as root, to ensure that ownership info is not lost. However because it will all end up back in
/home
the environment variable will be OK. Just don't use any of these files during he migration.– ctrl-alt-delor
Apr 6 at 10:15
You need to do the move as root, to ensure that ownership info is not lost. However because it will all end up back in
/home
the environment variable will be OK. Just don't use any of these files during he migration.– ctrl-alt-delor
Apr 6 at 10:15
what if instead of move , I do copy? just asking. I mean will original files be erased ? or I will end up with two home directory,?
– Just Khaithang
Apr 6 at 10:21
what if instead of move , I do copy? just asking. I mean will original files be erased ? or I will end up with two home directory,?
– Just Khaithang
Apr 6 at 10:21
Did you mean
cp
. If so then the originals will remain, but will be covered by the mount. You can do this, and remove them (or not) latter. You can use a bind mount to mount this part of the root partition on to /mnt
, when you want to see / remove them.– ctrl-alt-delor
Apr 6 at 10:24
Did you mean
cp
. If so then the originals will remain, but will be covered by the mount. You can do this, and remove them (or not) latter. You can use a bind mount to mount this part of the root partition on to /mnt
, when you want to see / remove them.– ctrl-alt-delor
Apr 6 at 10:24
I can mount the partition to home but cannot bind mount it. I think bind mount is not possible with partition?
– Just Khaithang
2 days ago
I can mount the partition to home but cannot bind mount it. I think bind mount is not possible with partition?
– Just Khaithang
2 days ago
|
show 5 more comments
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%2f510872%2fadd-already-created-partition-for-home-after-os-installation%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