I recently migrated Windows 10 and Gentoo to 2 separate 250 GB SSD's and left my old traditional SATA HDD Drives in to use for Storage.
- I put
Userson a HDD for Windows during a new install.
- I used a GParted LiveCD to shrink my root file system, and copied it to the new drive, rebooted, and then deleted the old root I'm leaving
/homeand a swap partition on my HDD Drive. This all works great, as I'm booting using the UUID's.
Since I'm on Gentoo, I need to move just the
/usr directory from the SSD back to the original HDD I copied it from, so that the Portage Tree doesn't hog the small SSD space during updates. I'm not tagging this with gentoo until now(See Update Heading), because this question is related to the proper command options needed for
rsync For a bit of context, the portage tree is Gentoo's package repository. The entire repository is downloaded to the user's local machine before updating. Downloading it to the SSD would cause needless wear, as the tree is updated daily.
I found the following two questions related to what I'm trying to accomplish:
Now I need an answer to a few of my own questions:
- Can I use the
rsynccommand to move
/usrwhile in the Gentoo install where
/usrneeds to be moved? The ServerFault question hints at this.
- If #1 isn't possible, and I use the GParted Live USB to issue the
rsynccommand, do the file/directory owners change since the LiveUSB is based on a Debian distribution?
- What are the proper options for
-afor archive? The comments in the selected answer at AskUbuntu hint at adding
-Hto ensure hardlinks are followed, but then the OP contradicts the comments in his own answer.
I need to move the
/usr directory from the partition squared in red to the empty partition squared in blue, while the entire partition squared in red is running, or use a LiveCD to do so, without harming or changing the current permissions.
This question turned out to be a mountain that can be conquered, but I don't know if I conquer it:
- I am/was able to move
/usrto a new partition using
rsync -avAHPX /mnt/gentoo/usr /mnt/new_usr. I can't give credit for a partial answer as I'm still stuck.
- It does no good, as systemd complains that the root filesystem doesn't contain a valid init because the init system is in the partition that can't be mounted. Do you see the issue here? (Systemd is located in
- I need early userspace mounting in order to fix the issue, but in order to do that, I'd lose my Plymouth boot screen initramfs with the initramfs it takes to mount
/usrearly. See also Custom Initramfs and Initramfs/Guide.
- Support and or other Gentoo users not complaining that "Systemd Sucks" are hard to come by (which is one of the reasons, I started contributing here). As such, if I post a question in our official resources, I get booed.
If anyone can tell me the proper tools to use that combine both a plymouth bootsplash and early
/usr mounting in the initramfs/intramfd, I'd appreciate it, and I'm thinking about offering a bounty, if this question sits. Also know that since Gentoo is source based that even though I linked the Gentoo Wiki articles, that I can use the tools from other distributions.