this post was submitted on 06 Jul 2023
45 points (97.9% liked)
Linux
48209 readers
707 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
Make the new filesystem, rsync the old SSD to the new one (making sure to use
rsync -ax
to copy everything properly, also add-H
if you use hardlinks), update fstab UUID, regenerate GRUB configuration and you're good to go.I have a 10 year old install that's survived moving several disks and computers, it works just fine.
Don't forget to change the fstab filesystem type when updating the UUID as well (yes, I've made this oops before).
-x (alias --one-file-system) means "don't cross filesystem boundaries"; is that what you meant? Or did you mean -X | --xattrs?
Edited because I wrote some things before that were incorrect.
Yep, that's so you don't end up potentially copying
/dev
,/sys
,/run
or any other mounted partitions.This is likely what I will do now that I have given it some thought. This will bring over all of my installed apt and snap packages, right? And they will both be aware and know how to update from there?
I have the NVMe prepped. It has a fresh Ubuntu install of the same version, but on btrfs. I could probably even snapshot it before I get started to make sure I can roll back and try again if I fuck up. And worst case, I can just reinstall the OS on that partition, as it would touch my existing install. It feels pretty safe to try. Worst thing that can go wrong is I waste my time.
Yeah, from the software's point of view unless you need some extra rsync flags as some have pointed, you end up with an identical view of the files on there, they'll be mounted exactly at the same places and everything. Just a different filesystem and drive behind it. People have been doing that for decades, before even Linux.
As long as all the attributes like user/group/mode and symlinks are preserved, most distros won't notice a thing with that method. There's no filesystem-specific special sauce to make it work or hidden flags or anything, even snaps and flatpaks.
This is not like Windows where your options are clone the partition or reinstall. Linux is a lot simpler and only cares that the files are where they should be with the right permissions.
And maybe also -ASX for ACLs, sparse files and xattrs
~~-X is already included in -a, so no need to specify expliticly. Doesn't hurt either.~~
Nope, I was wrong, -X is not included in -a. Sorry!
Seconded this approach, I've got a Gentoo installation that has been going since 2005 across half a dozen different machines.