[SOLVED] Transfer Linux from one HDD to another?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

[SOLVED] Transfer Linux from one HDD to another?

Post 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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
rui no onna

Re: Transfer Linux from one HDD to another?

Post by rui no onna »

Fredashay wrote: Fri Sep 21, 2018 8:12 pmWhat is the best way to do this?

5.) Something else?
https://clonezilla.org
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Transfer Linux from one HDD to another?

Post 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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

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

Post by Fredashay »

Clonezilla... Got it! :-)
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
AscLinux
Level 4
Level 4
Posts: 477
Joined: Sat Oct 29, 2016 3:32 pm
Location: Acadiana
Contact:

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

Post 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.
Master Foo Discourses on GUI.
First Linux 1997. Last Windows 2004.
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

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

Post 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
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
AscLinux
Level 4
Level 4
Posts: 477
Joined: Sat Oct 29, 2016 3:32 pm
Location: Acadiana
Contact:

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

Post 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.
Master Foo Discourses on GUI.
First Linux 1997. Last Windows 2004.
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

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

Post 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.
Last edited by Fredashay on Sun Sep 23, 2018 2:19 pm, edited 1 time in total.
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

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

Post 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.
Last edited by Fredashay on Sun Sep 23, 2018 2:18 pm, edited 1 time in total.
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

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

Post 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.
Last edited by Fredashay on Sun Sep 23, 2018 2:18 pm, edited 1 time in total.
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

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

Post 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...
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

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

Post 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

=
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
User avatar
Fredashay
Level 2
Level 2
Posts: 69
Joined: Tue Aug 30, 2016 6:15 pm
Location: About 200 chunks west of spawn
Contact:

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

Post 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.
Into computer gaming and HO model railroading. I run a Minecraft server and write plugins in Java for my server.
My Server -- https://minecraft-server-list.com/server/271259/
My Plugins -- https://www.spigotmc.org/resources/auth ... hay.38349/
Locked

Return to “Beginner Questions”