Deleting home partition and creating home directory in root partition

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.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #93870
    Member
    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 2 weeks ago by neoabc123.
    #93873
    Moderator
    Brian Masinick
    Helpful
    Up
    0
    ::

    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 -R

    After 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 Masinick

    #93900
    Moderator
    BobC
    Helpful
    Up
    0
    ::

    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

    #93909
    Member
    neoabc123
    Helpful
    Up
    0
    ::

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.