this post was submitted on 24 Dec 2023
32 points (92.1% liked)
Linux
48185 readers
1428 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Log in as root to avoid trying to make sure no files in
/home/
are being read/written to.Step 1: copy data to new drive. Mount new drive to
/mnt/
.cp -ra /home/* /mnt/
.-a
means that all permissions remain the same which will mean that your user can still read them. Check the man page for more details. This command will take a while. Use-v
to see progress. You should see a folder with your username appear.Step 2. Prepare
/home
for new drive. Move the files to a new folder. This is done to make sure you can still easily go back.mv /home/ /home-bak/
keep your old home dir safe in case a mistake was made.mkdir /home/
.Step 3. Mount your new drive. Mount your drive to
/home/
and check if you can login. If everything went correctly, you should be able to just login. Finally you need to update your/etc/fstab
to include this new drive. This will make sure your home drive mounts when you start your os. If everything is working, you can delete your home-bak as well.I dont like the MV home. 😅
My advice :
You can now delete or keep it as a save.
the mv home is just renaming the folder so you can mount home in the same space. Rsync is probably better than cp but I didn't want to suggest tools that op doesn't have installed.
Oh ok I see why no use of rsync. Clever.
I've read your solution, OP, you can go. Good tuto written on mobile.
This is a rough guide written on mobile. its probably best if someone double check some of this stuff before op tries it.