Messed up user folder

Alright, this should be good for a chuckle.

So, I wanted to move the entire contents of my /home/$USER folder to my new storage SSD that I had recently installed to replace a failing HDD.

I started this process by copying my ~/Downloads folder to the new drive, removing the original folder, and then linking to the new folder, so the path remained the same.
This seemed to work well but I realized it would take forever to do everything in the /home/$USER folder individually, so I had the bright idea of just doing the same thing with the entire directory.

Well, I was able to copy the entire directory (all but one file, which didn’t exist), but I was not able to remove the /home/myname directory, so, this caused complications when trying to link to the copy on the new drive. Before I knew it, overwriting was being done, and now things just seem like a mess. I’d like to just delete my original /home/$USER folder and replace it with the copy I made.

Please advise.

(I hope this made sense, never tried this kind of thing before.)

  • boot in rescue mode,
  • edit your /etc/fstab
  • mount the new hard disk to the /home/$USER folder (after deleting the content of that folder)

Special note: *You can also boot with any other user who has root privileges.¨

1 Like

I’ve marked this answer as the solution to your question as it is by far the best answer you’ll get.

However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (If you disagree with my choice, just send me a personal message and explain why I shouldn’t have done this or :heart: or :+1: if you agree)

:innocent:
P.S. In the future, please don’t forget to come back and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
Solution
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.

1 Like

Funny thing: I’d also managed to totally screw up my permissions throughout the file system in the process. I ended up reinstalling. However, I am going to take your advice now, with a fresh install, and mount a nice big partition from the new SSD into my home directory. Thanks for the advice.

2 Likes

One last small tip. Which I always use personally. Activate the root user, except Fedora it seems all other distributions disable root user.
The only way you can use rescue mode is through root user.
You can use root user by setting a password for the root user through:

sudo passwd

Although I know a lot of people discourage activating the root user for security reasons (and I am pretty sure they have a valid reason for that), but if you mess up your fstab, I personally believe rescue mode is the fastest option - rather than searching for a USB bootable.

1 Like

Please read this:

:crossed_fingers:

1 Like

Well, I keep a copy of my docs and pictures backed up in all the HDDs available to me (Normally 4 or 5) haha…
Also back it up on my Pi (just in case)…

That’s a data backup. Read the article as that explains how to to both a system backup and a data backup…

:stuck_out_tongue_winking_eye:

Actually I don’t backup the system, If I screw it up real bad - I prefer to reinstall the OS fresh. No biggy :slight_smile:
P.S. I like to screw it up pretty bad once every couple of month or so… :smiley:

1 Like

Hey, thanks again. I always keep a LIVE usb of whatever distro I’m playing with, but I will absolutely activate root user. I like having plenty of options, makes me feel in control (I’m usually not, or so it feels). Thanks again.

Cool, thanks! Is Wine really a threat like that? Because I can really do without it on my machine at all. I spent thirty years of my life with Windows, and I’m really not looking to have anything to do with her in the foreseeable future.

1 Like

When I moved from Windows to Linux permanently in 2012, I missed Notepad++, so I installed wine too, but the risk compared to the benefits was just too high when I learned more about the technology.

So if you can do without wine,

pamac --remove --no-save wine*

:grin:

2 Likes

Wine is a pretty bad idea, IMHO. It is not containerized. I have used wine once and it can access your entire file system, so I am not sure why some people claim it to be containerized.
If you can - stay away from it, IMHO as mentioned by @Fabby

Gracias.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.