Moving a linux (debian12) installation from an old drive to a new one.
1. create the new partitions with GParted to mirror the old (but larger) root + boot, efi, usr, var, home, tmp, swap, and a remaining data partition. All ext4 except the efi partition which must be FAT32 and the swap, as linux-swap. set the flags for both the efi partition and root to be bootable. They will have both the esp and boot flags set. 2. mount and rsync the files from the old partitions to the new, to mirror them. create mount points in /mnt/ To make things easier, mount everything separately initially. /mnt/1root/ /mnt/1var/ /mnt/1home/ /mnt/1usr/ /mnt/1efi/ eg mount for each #mount UUID=<get uuid from gparted information> /mnt/1root/ mount the new partions separately. /mnt/2root/ /mnt/2var/ /mnt/2home/ /mnt/2usr/ /mnt/2efi/ for each rsync all the files across #rsync -avxHAX --progress /mnt/1root/ /mnt/2root/ Note: rsync -avxHAX --progress /source/ /destination/. -a (archive mode): This is a shorthand for several options that preserve file attributes (permissions,...