LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2020, 02:34 AM   #1
bennylavalol
LQ Newbie
 
Registered: Oct 2020
Posts: 22

Rep: Reputation: Disabled
Best way to clone an OS drive?


Hi all, I'm wanting to find out the best way to clone a Linux OS drive. I want to make a copy of the drive I'm on now. I bought it just to try out the linux distros and see if I could make the switch from windows. Turns out I can, so now I need a bigger better SSD. This one is only 250Gb, but it was cheap and now it'll just be storage.

So what's the best way to clone a linux OS drive? To be clear, not image, but clone. I want to just perform the cloning process, and then pop the new drive into a computer and have go straight into the desktop. No messing around with settings, no need to deal with the terminal. Just plug it in, and it goes as though it's the original drive.

I used to do this with Acronis and Clonezilla with Windows, years ago. It was awesome because you could just make all kinds of backups that you knew with 100% certainty would work with no messing around. You'd plug it in, and it would just boot right into the OS. That's what I'm looking for. Thanks!

Last edited by bennylavalol; 10-31-2020 at 06:51 PM.
 
Old 10-31-2020, 03:00 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,147

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
So why not clonezilla ?.
 
Old 10-31-2020, 03:49 AM   #3
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,988
Blog Entries: 33

Rep: Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471
bennylavalol,

Clonezilla, as syg00 suggests:
https://www.linuxquestions.org/quest...o-image-38106/
 
Old 10-31-2020, 06:25 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
I've always used the dd command.
 
Old 10-31-2020, 07:34 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Code:
dd
and it doesn't matter whether it's a "Linux", "OS" or any other partition. Full byte-to-byte clone.

edit:
Quote:
Originally Posted by bennylavalol View Post
To be clear, not image, but clone. I want to just perform the cloning process, and then pop the new drive into a computer and have go straight to the desktop. No messing around with settings, no need to deal with the terminal. Just plug it in, and it goes as though it's the original drive.
Ah, I didn't see this.
Software might exist to aid you, but ultimately you'll need to adjust some "things".

FWIW, I think the terms you use to make that distinction are ultimately meaningless. An image is a clone.

Last edited by ondoho; 10-31-2020 at 07:36 AM.
 
Old 10-31-2020, 06:54 PM   #6
bennylavalol
LQ Newbie
 
Registered: Oct 2020
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Code:
dd
Ah, I didn't see this. Software might exist to aid you, but ultimately you'll need to adjust some "things".

FWIW, I think the terms you use to make that distinction are ultimately meaningless. An image is a clone.
If so, what exactly will need to be adjusted? What needs to be adjusted if you use dd?
 
Old 11-01-2020, 01:29 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by bennylavalol View Post
If so, what exactly will need to be adjusted? What needs to be adjusted if you use dd?
fstab, mostly. New UUIDs. Possibly the kernel command line too.
 
Old 11-01-2020, 02:35 AM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,861
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by ondoho View Post
fstab, mostly. New UUIDs. Possibly the kernel command line too.
If you never boot with both SSDs in the same PC at the same time, then these things need no changing per se, but a change might be called for in a UEFI BIOS.

In a different PC, depending on how networking was configured, it might be necessary to make a configuration change for it to function correctly, and same for sound.
 
Old 11-01-2020, 05:59 AM   #9
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Whether you use clonezilla or dd, if all you're doing is copying the entire drive and putting it in another computer, a lot of things will be resolved by the os booting.
 
Old 11-01-2020, 06:16 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,004

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
Quote:
Originally Posted by bennylavalol View Post
If so, what exactly will need to be adjusted? What needs to be adjusted if you use dd?
depends on the content. You may need to adjust network related settings, fstab and any other configuration of any [other] software which may depend on the hardware (like disk layout or network interface) and on the hostname, ip address or something similar (ssh keys, own web server, ?).

If you are lucky you do not need to configure anything (but hostname?).
 
Old 11-01-2020, 06:50 AM   #11
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Why not just re-install - no command line stuff and no need to worry about uuids and so on
 
1 members found this post helpful.
Old 11-01-2020, 09:20 AM   #12
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,988
Blog Entries: 33

Rep: Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471Reputation: 1471
bennylavalol,

I second GPAGent's advice to do a fresh install on the new SSD, then copy and paste the personal data from the original drive using one of these:
https://www.amazon.co.uk/Cable-Benfe...d_asin_0_title

It is a good idea to have a separate home partition on the new drive if you did not have one on the old SSD.

This is very useful when upgrading or changing the distro:
https://www.linuxquestions.org/quest...-distro-37074/

Last edited by beachboy2; 11-01-2020 at 09:22 AM.
 
Old 11-01-2020, 09:45 AM   #13
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by bennylavalol View Post
If so, what exactly will need to be adjusted? What needs to be adjusted if you use dd?
A lot.!!
you said the drive you are copying from is smaller than the new one.
Once copied the new drive will appear EXACTLY as the original. Partitions, size, etc. forcing you to resize partitions and possibly even moving them. That is addition to what has already been said.

Clonezilla is the much better choice for copying, or a new install on the new disk.

Last edited by computersavvy; 11-01-2020 at 09:47 AM.
 
Old 11-01-2020, 10:08 AM   #14
verndog
Member
 
Registered: Oct 2007
Posts: 279

Rep: Reputation: 68
Quote:
Originally Posted by ondoho View Post
...
FWIW, I think the terms you use to make that distinction are ultimately meaningless. An image is a clone.
Disk image vs Disk clone:
https://blog.macrium.com/techie-tues...e-e6be74abb089
 
Old 11-01-2020, 10:08 AM   #15
remmilou
Member
 
Registered: Mar 2010
Location: Amsterdam
Distribution: MX Linux (21)/ XFCE
Posts: 212

Rep: Reputation: 69
Clonezilla rules!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Open-spec SBC is a clone of a clone of a clone of a Raspberry Pi 3 LXer Syndicated Linux News 0 04-25-2018 04:56 PM
[SOLVED] Best way to correct Hard drive clone gone wrong boguspersin Ubuntu 6 07-02-2011 09:22 PM
I need to Clone a Red Hat drive and install clone in HP server drummer54 Linux - Newbie 14 03-07-2009 04:15 PM
best way to clone mandriva (2007 spring) hard drive babag Mandriva 2 03-08-2008 06:11 PM
Best way to clone hard drive to server sharptech Linux - Newbie 5 06-23-2007 08:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration