[SOLVED] Transfer Linux from one HDD to another?

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
Fredashay
Level 1
Level 1
Posts: 31
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 » Fri Sep 21, 2018 8:12 pm

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 Fredashay on Sat Sep 22, 2018 11:27 am, 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/

rui no onna
Level 4
Level 4
Posts: 241
Joined: Thu Jul 19, 2018 4:18 pm

Re: Transfer Linux from one HDD to another?

Post by rui no onna » Fri Sep 21, 2018 8:47 pm

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

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

User avatar
catweazel
Level 17
Level 17
Posts: 7767
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Transfer Linux from one HDD to another?

Post by catweazel » Fri Sep 21, 2018 8:47 pm

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
Fredashay
Level 1
Level 1
Posts: 31
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 » Sat Sep 22, 2018 11:31 am

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: 330
Joined: Sat Oct 29, 2016 3:32 pm

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

Post by AscLinux » Sat Sep 22, 2018 11:38 am

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.

User avatar
Fredashay
Level 1
Level 1
Posts: 31
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 » Sat Sep 22, 2018 2:48 pm

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: 330
Joined: Sat Oct 29, 2016 3:32 pm

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

Post by AscLinux » Sat Sep 22, 2018 3:53 pm

-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.

User avatar
Fredashay
Level 1
Level 1
Posts: 31
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 » Sun Sep 23, 2018 2:02 pm

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 1
Level 1
Posts: 31
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 » Sun Sep 23, 2018 2:02 pm

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 1
Level 1
Posts: 31
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 » Sun Sep 23, 2018 2:02 pm

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 1
Level 1
Posts: 31
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 » Sun Sep 23, 2018 2:14 pm

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 1
Level 1
Posts: 31
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 » Sun Sep 23, 2018 2:19 pm

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 1
Level 1
Posts: 31
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 » Sat Oct 27, 2018 4:38 pm

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/

Post Reply

Return to “Newbie Questions”