Forum › Forums › New users › New Users and General Questions › Deleting home partition and creating home directory in root partition
- This topic has 3 replies, 3 voices, and was last updated Nov 24-5:07 am by neoabc123.
-
AuthorPosts
-
November 23, 2022 at 2:27 pm #93870Member
neoabc123
My home partition uses very old hard disk.So i want to remove it and make a home directory inside the root partition(with same content).
Thanks.- This topic was modified 5 months, 2 weeks ago by neoabc123.
November 23, 2022 at 2:43 pm #93873Moderator
Brian Masinick
::There are probably a few ways to do this.
One way I can think of is to first rename the current /home structure to something else.
Then create a /home and /home/user directory under the other device.
Next, copy with the -R option the renamed directory to either the new /home or the new /home/user, depending on what you are copying and exactly once you want to move.
(eg. sudo cp -RAfter the contents have been copied to another location, check and verify the contents of the new location to make sure it has everything you need. Rename and move anything that’s not in the correct location once you see how the copy works.
Finally, when you are satisfied with the results, remove the old directory, and then you can remove and/or replace the old device, potentially moving stuff again if you desire to replace it.
I hope this is understandable. If not, show your interpretation of this and I’ll assist, or someone else can jump in with their own suggestions.
--
Brian MasinickNovember 24, 2022 at 1:54 am #93900ModeratorBobC
::I think link entries might be an issue.
What about backup, reinstall with single partition, and then restore /home?
If the above just isn’t possible, I would create a newhome directory and load it as Brian suggested by copying the old /home, then I would reboot in single user mode and sign in as root (because it uses /root, not /home), unmount the old drive if its mounted, remove its /etc/fstab entry, and then mv newhome to home.
No matter which method, I certainly would try to figure a way to test the whole idea thoroughly using a backup copy and spare drives before doing it on the main machine
I am no expert, but have suffered greatly for my goofs
November 24, 2022 at 5:07 am #93909Memberneoabc123
::the first solution didn’t work,and hastily i deleted the renamed home directory.
But luckily i had important files in flashdrive.Still its my brothers use laptop and i will not mess with it more -
AuthorPosts
- You must be logged in to reply to this topic.