Move Home folder back to default location

Shmu26

Member
Joined
Dec 11, 2018
Messages
95
Reaction score
32
Credits
624
I moved Home to a separate partition. Now I want to move it back where it was by default. How to do that?
Kubuntu 20.04
 


I moved Home to a separate partition. Now I want to move it back where it was by default. How to do that?
Kubuntu 20.04
How did you move it in the first place? Guess you can use the same procedure to put it back where it was before.
 
a screen shot of your partitions gParted would help.

I assume you had a partition holding everything . you shrank it and in the maybe in the un-allocated bit created you made home. The basics of going back would be back up /copy everything you need in home to say an external hd (rsync might be good for that )

you delete home and so its unallocated. if the position is next to root , then it would be a case of using gPArted from live OS (because it has to be unmounted) and stretch the root across into the allocated.

i similar process was carried out here: https://linux.org/threads/removing-windows.30411/post-100012

basically what they did was remove a widows partition which was luckily right next to a linux partition they wanted to expand

out of interest what didn't you like about having a separate /home ?

I could have done that with slackware; but instead i chose one whole install. Then home directories are allocated for users within that space
 
The standard instructions don't work very well in reverse.
That's why I asked how you moved it in the first place, depending on how you did it, answers may vary.
 
@captain-sensible @Tolkem @Shmu26
Greetings Shmu and welcome,
After reading this thread I started thinking - wouldn't it be easier just to save whatever you want to save on a flash drive; and then just re-install Kubuntu 20.04?
That would automatically put your home folder back in place.
Then you can move what you have saved on the flash drive back to your computer.
{As an old guy, I have learned to avoid work as much as I can.}
Old Geezer Tango Charlie
 
I have learned to avoid work as much as I can
Good approach, but I am not sure that reinstalling is "avoiding work"
Running the installer is just the easy part, then comes root certificate and updates and keyboard layouts and samba and programs and printers and...
 
Then follow the same instructions and adapt where apply; you're basically doing the same thing, moving a partition from one mountpoint to a new one: old_home to new_home, which is exactly the same thing you did if you followed those instructions:
1. - Set-up your new partition; boot to a live USB and create a new partition where new_home will be.
2. - Find the uuid (=address) of the new partition; in a terminal type
Code:
sudo blkid
3. - Backup and edit your fstab to mount the new partition as /media/home (just for the time being) and reboot.
4. - Use rsync to migrate all data from /home into /media/home.
5. - Check copying worked!
6. - Move /home to /old_home to avoid confusion later!
7. - Edit fstab again so the new partition mounts as /home instead of as /media/home.
8. - Reboot or remount all. Check system seems to be working well.

As you can see I just copied/pasted that from https://help.ubuntu.com/community/Partitioning/Home/Moving which is what you did to move your old_home to new_home and if you take a good look at those instructions they make perfect sense and there should be no reason why they won't work to reverse what you did, after all, is the same thing; create a new partition, backup the old partition, move the old partition to new partition.
Read here too for more references if you need to https://www.maketecheasier.com/move-home-folder-ubuntu/
 
Last edited:
a screen shot of your partitions gParted would help.

I assume you had a partition holding everything . you shrank it and in the maybe in the un-allocated bit created you made home. The basics of going back would be back up /copy everything you need in home to say an external hd (rsync might be good for that )

you delete home and so its unallocated. if the position is next to root , then it would be a case of using gPArted from live OS (because it has to be unmounted) and stretch the root across into the allocated.

i similar process was carried out here: https://linux.org/threads/removing-windows.30411/post-100012

basically what they did was remove a widows partition which was luckily right next to a linux partition they wanted to expand

out of interest what didn't you like about having a separate /home ?

I could have done that with slackware; but instead i chose one whole install. Then home directories are allocated for users within that space
Hi, I somehow missed this post and read the next one. So yeah, I can copy files and delete a partition and stretch a partition, but the trickier part is recreating Home in a way that will be recognized by the system.
Fstab needs to be modified, and maybe other things, too. And Home needs the right permissions.
 
Question no longer relevant.
Did you solve it? Then mark the thread as solved by editing your first post and inserting SOLVED between brackets, like this: (SOLVED) Also, can you tell us how you did it?
 
I didn't try it yet, but the first answer over here looks very promising:
Hmmm ... those instructions look pretty much the same as the ones you followed from here https://help.ubuntu.com/community/Partitioning/Home/Moving don't they?
 
Okay, so I see you edited your answer over there.
No, I didn't. That's how I did the first time; AFAIK, you can't manipulate system's partiitons within the running system itself, for that you always need to boot to a live USB, otherwise you may experience undesired/unwanted results, i.e data loss.
 
No, I didn't. That's how I did the first time
So I apologize for my comment. For some reason, I keep missing important posts in this thread. I will have to pay more attention...
 

Members online


Top