Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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.
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.
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.
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?).
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.