Hello.
I'm trying to move my Home directory back to my Root partition.
I'm mostly having success.
What I've done is:
sudo mkdir /mnt/tmp
‘sudo mount /dev/sda1 /mnt/tmp’ (Root)
‘sudo mkdir /mnt/home’.
‘sudo mount /dev/sdb1 /mnt/home’
‘sudo cp -rp /mnt/home/* /mnt/tmp/’ OR ‘sudo cp -rp /mnt/home/* /mnt/tmp/home/’
When I copy to just /mnt/tmp, it moves all my files to the Root directory, but when I copy to /mnt/tmp/home, it creates another folder in Home called Home, meaning it doesn't work either way. How can I do this successfully?
Thanks
Gregg
Moving Home directory back to Root partition
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 1
- Posts: 3
- Joined: Tue Jun 15, 2021 6:36 pm
Moving Home directory back to Root partition
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Moving Home directory back to Root partition
Boot a live session (your mint install media) and copy everything from your existing
Why are you doing this, seems a retrograde step to me?
Take a backup before you start.
/home
partition to the /home
folder on your existing /
partition. Then edit fstab to remove the entry pointing at your home partition.Why are you doing this, seems a retrograde step to me?
Take a backup before you start.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
-
- Level 1
- Posts: 3
- Joined: Tue Jun 15, 2021 6:36 pm
Re: Moving Home directory back to Root partition
Thank you for this. What would be the best way of copying in terms of what command should I enter?AndyMH wrote: ⤴Wed Jun 16, 2021 4:55 am Boot a live session (your mint install media) and copy everything from your existing/home
partition to the/home
folder on your existing/
partition. Then edit fstab to remove the entry pointing at your home partition.
Why are you doing this, seems a retrograde step to me?
Take a backup before you start.
This might sound strange, but I'm just experimenting in a virtual machine to find out how to do this.
Re: Moving Home directory back to Root partition
Running from the live USB:grxgghxrpxr wrote: ⤴Thu Jun 17, 2021 6:24 pmThank you for this. What would be the best way of copying in terms of what command should I enter?
Code: Select all
cp -ax /whatever/username /home/.
/whatever/username
= where your $HOME (=/home/username) is located on the not-OS partition/home/.
= the location on the OS partition which will become /home when you boot.-ax = copy and preserve ownership, etc, and copy links as links.
If you copy from
/whatever/username/*
, you'll miss the "." files; the easy way is to copy the entire username
directory.Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
-
- Level 1
- Posts: 3
- Joined: Tue Jun 15, 2021 6:36 pm
Re: Moving Home directory back to Root partition
Thank you so much! This worked, I was able to do this using a TTY prompt, rather than bootable media.
Re: Moving Home directory back to Root partition
I guess the takeaway here is that if an alternative '/home' location is not provided, it defaults to '/home/your_username', if available; I actually didn't know that, as I've never done it that way around before. I've done the same as you, but the other way around, and on hardware. It's pretty smooth sailing, really. I love that Linux gives you the option to do all these cool things; it's so flexible!
I'm also Terminalforlife on GitHub.