I have a problem with Manjaro after relocating my home folder. I moved it from an external drive to /home inside system root. During installation, I used a separate disk for /home but it turns out I need that drive for something else.
This is what I did so far. After booting machine into LIVE-USB, I have moved everything from the disk to /home in the system / partition. Essentially, I did following
# mount /dev/sda3 ./system
# mount /dev/sdb1 ./manjaro-home
# cp -rp ./manjaro-home/* ./system/home
/dev/sda3 is the root / and /dev/sdb1 was mounted to /home.
I also commented a part of fstab to avoid /home being mounted to the external drive.
After rebooting, Manjaro seems to be OK and starts without complaining about anything. However, things get odd when I use terminal. It kind of flickers when I move cursor around its window or gets even hidden, until I mouseover bottom task bar. It also flickers if It loses or gains focus.
Keyboard in the terminal also does not work correctly. For instance, I canāt type `l`, or typing `a` takes time. Thereās an issue with showing content because all commands I type are executed.
It changes the path of a userās home directory which is stored in /etc/passwd, and moves the files to the new directory.
However the OP wants to move the contents of /home to a different partition. In this case the / partition, but either way the path will be the same once finished, so changing it is counterproductive.
Further Explanation if needed
Two cases:
Running system - either no current home partition or partition is mounted at /home
/home ā /mnt
Iām not sure if bind mounting the root partition to /mnt would work for OPs case (home partition ā root partition), if not then weād have to use a live USB.
Live USB - neither partition is mounted at /home
/mnt/home/ ā /mnt/root/home/
The destination is never /home/username - so thereās no way to use usermod as cp without breaking the configuration, necessitating another usermod -d /home/username username to fix it.
Alternatively we can just use cp (or rsync, etc) and do it all in a single command - without unnecessarily editing /etc/passwd twice for each user.
It may be useful if you want to move a single user from the root (or home) partition to another partition - but thatās a little weird.
from man cp
(that is the manual page for the program cp, describing usage and options ā¦)
-a, --archive
same as -dR --preserve=all
as for rsync:
man rsync starts with: rsync - a fast, versatile, remote (and local) file-copying tool
It is more complex and also more versatile.
⦠incremental backups, for instance
or
backup over the network ā¦
using compression for the transfer ā¦
the -a option is but one of many
and has different implications:
--archive, -a
This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything. Be aware that it does not include preā
serving ACLs (-A), xattrs (-X), atimes (-U), crtimes (-N), nor the finding and preserving of hardlinks (-H).
No.
Depends on what you actually want to achieve.
Incremental backup, for instance - only transfer what has been changed (again: for instance)