Page 1 of 1

[SOLVED] Transfer Linux from one HDD to another?

Posted: Fri Sep 21, 2018 8:12 pm
by Fredashay
I installed Linux Mint 19 Cinnamon onto a 128 GB HDD and have been using it for some time. I now want to transfer it onto a 1 TB SSD. My desktop machine has removable drive bays, and I'm no stranger to booting different Linux distros and even different OSes to experiment with them. Though Mint 19 Cinnamon is my daily driver. The rub? I want to keep my desktop and installed applications without installing Linux fresh and reinstalling everything.

What is the best way to do this?

1.) I tried to do a file copy from the HDD to the SSD, but even as root, it wouldn't let me copy some system files.

2.) I can copy only the HOME folder, but that won't copy all my installed applications.

3.) If I buy one of those disk duplicators, will I be able to copy one drive to the other? And will the duplicator be smart enough to know that the destination is a larger partition size? Or will it destroy the destination drive if they're not identical?

4.) Can I use Timeshift to backup the HDD, install Linux on the SSD as a new install, then use Timeshift to restore it to the exact state of the old HDD?

5.) Something else?

Re: Transfer Linux from one HDD to another?

Posted: Fri Sep 21, 2018 8:47 pm
by rui no onna
Fredashay wrote:
Fri Sep 21, 2018 8:12 pm
What is the best way to do this?

5.) Something else?
https://clonezilla.org

Re: Transfer Linux from one HDD to another?

Posted: Fri Sep 21, 2018 8:47 pm
by catweazel
Fredashay wrote:
Fri Sep 21, 2018 8:12 pm
5.) Something else?
Use Clonezilla Live to clone the small drive to the bigger drive. Remove the small drive. All done. The worst you'll have to do is extend the linux partition in the clone.

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sat Sep 22, 2018 11:31 am
by Fredashay
Clonezilla... Got it! :-)

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sat Sep 22, 2018 11:38 am
by AscLinux
I've always used simple cp -a to move my installations to a new disk. But of course, I'm a pragmatic Linux user, I fail to see the beauty of all bells and whistles.

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sat Sep 22, 2018 2:48 pm
by Fredashay
I'll try that, then! I had always assumed that cp -a writes the copied files in a special "archive" format rather than a true file-by-file copy.

cd /mnt/ssd
cp /* . -a -p -r -v

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sat Sep 22, 2018 3:53 pm
by AscLinux
-a does all you need, it is short for -dR --preserve=all
You need to correct your fstab afterwards if UUID's are used.
In case of MBR boot you probably need to chroot and [re]install your boot loader.
You did boot from an external media for this, right? Copying from live installation may work, but you probably get lots of errors, some files (/proc, /etc/dev and /sys) are not regular files. They do not need to be copied, so you may get away with this ... I've never tried it myself.

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sun Sep 23, 2018 2:02 pm
by Fredashay
A bug in the Linux Mint forums created this message and posted it on behalf of me. I DID NOT post this, I merely edited it.

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sun Sep 23, 2018 2:02 pm
by Fredashay
A bug in the Linux Mint forums created this message and posted it on behalf of me. I DID NOT post this, I merely edited it.

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sun Sep 23, 2018 2:02 pm
by Fredashay
A bug in the Linux Mint forums created this message and posted it on behalf of me. I DID NOT post this, I merely edited it.

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sun Sep 23, 2018 2:14 pm
by Fredashay
Sorry, people, but I DID NOT POST 3 COPIES OF MY POST. The forum software created 2 copies for some reason. When I deleted the second, the forum created a third copy!!! A bug maybe...

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sun Sep 23, 2018 2:19 pm
by Fredashay
AscLinux wrote:
Sat Sep 22, 2018 3:53 pm
-a does all you need...
I haven't done anything yet. I'm a procrastinator :-p Based on everything everyone has said above, here's the plan:

1.) To get the boot loader, partitioning, and flags set correctly, install Linux Mint 19 on a new SSD from the same Live CD that I used originally.

2.) Boot the HDD, mount the SSD at /mnt/ssd.

3.) Do this (I know -v slows things down, but I want to see the progress):
cd /mnt/ssd
cp /* . -a -v

=

Re: [SOLVED] Transfer Linux from one HDD to another?

Posted: Sat Oct 27, 2018 4:38 pm
by Fredashay
Just to post some feedback from my experience...

I've experimented and have done this using several different methods. The fastest and easiest, I've found, is to use a disk duplicator (you can get them from Amazon for anywhere from 20 buckazoids on up). If you're copying from a smaller disk to a larger disk, then just used Gparted to resize the partition to use all the larger disk. FYI, I haven't gone the other direction copying from a larger disk to a smaller disk.