LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Need to clone HDD to SSD (https://www.linuxquestions.org/questions/linux-software-2/need-to-clone-hdd-to-ssd-4175591957/)

RvBVakama 10-21-2016 11:14 PM

Need to clone HDD to SSD
 
Hi, I just bought a ssd and would like to use it to replace my hdd. I deleted 1.5tb the other day so its down to 403gb ish and the ssd is 490gb. Now due to insufficient cables inside my PC I can't wire up all 3 disks at a time so I am wondering what software is best to clone my hdd disk contents onto the ssd from a live linux usb.
Thanks for any replies

yooy 10-22-2016 12:47 PM

build in DD can do the job if you know what you are doing, beware that Ssd is not operating the same way Hdd does and that you will need to re-install grub after cloning OS.

IsaacKuo 10-22-2016 03:22 PM

I have done numerous clone transfers from spinning SATA hard drive to SATA SSD, and I have never had to reinstall grub as a result. I detail how to use dd for this situation here:

http://www.linuxforums.org/forum/new...ost983273.html

tofino_surfer 10-22-2016 04:08 PM

>>>"Now due to insufficient cables inside my PC I can't wire up all 3 disks at a time"

Could you please explain this. Even a cheap motherboard will have more than 3 SATA controllers. If you need more SATA cables buy them, they are $4-5 in stores, less than $2 online.

>>>>"I deleted 1.5tb the other day so its down to 403gb ish and the ssd is 490gb"

You didn't have to do this either. You could just copy the directories you needed from the larger HDD to the smaller SSD such as with rsync and leave the rest where they are. These days it is common to have a small SSD with OS and applications and a spinning drive for larger media files.

RvBVakama 10-22-2016 11:03 PM

Quote:

Originally Posted by tofino_surfer (Post 5621566)
>>>"Now due to insufficient cables inside my PC I can't wire up all 3 disks at a time"

Could you please explain this. Even a cheap motherboard will have more than 3 SATA controllers. If you need more SATA cables buy them, they are $4-5 in stores, less than $2 online.

>>>>"I deleted 1.5tb the other day so its down to 403gb ish and the ssd is 490gb"

You didn't have to do this either. You could just copy the directories you needed from the larger HDD to the smaller SSD such as with rsync and leave the rest where they are. These days it is common to have a small SSD with OS and applications and a spinning drive for larger media files.

I currently have a boot ssd and a hdd. I bought a ssd 490gb and deleted 1.5 tb of useless files: such as movies and video and pictures and steam installed games (800gb) to shrink it down to be able to be cloned over. the cables in my system only allow for 2 hdd/sdd to be plugged in at a time so that is fine with me, besides i dont want to touch anything in my pc if it is not necessary due to all the cables being tied down with cable ties which allow for good air flow. Also I don't trust my 2tb seagate anymore due to it disappearing now and then. plus hard disk sentinal says it has 60% health left also it makes lots of unhealthy sounds, so i'd rather just use 2 sdds.

IsaacKuo 10-23-2016 07:09 AM

I don't know about the OP's specific situation, but I personally have numerous computers with only 2 SATA headers, and a few which are limited by extremely limited power supply connectors.

But in any case, what's the big deal? It's straightforward enough to solve the stated problem, and the ability to attach a third hard drive doesn't really have anything to do with it. The OP is likely unaware that you can do a traditional GNU/Linux install on a USB drive just like a hard drive install (it's typically slower because USB thumbdrives tend to have very slow read/write compared to hard drives, but it's fully functional).

I didn't bother with going off onto a tangent about that, since the tools required will be available in any live USB anyway. Just gparted and plain old dd will do.

Copying directories will get you halfway there, assuming a simple single booting install. But the other half is making the SSD boot. If you know what you're doing, it's not that hard to do. But it's not so simple for someone who's not familiar with how the boot process works and how to repair it. And the instructions for making it work vary with bootloader, distribution, etc.

syg00 10-23-2016 07:37 AM

Hmmm ...
dd is insensitive to file system errors. If you are setting up a new system you really want to know about file system errors. The worst option IMHO.

Your foot, your gun.

IsaacKuo 10-23-2016 08:40 AM

My experience is that dd will indeed fail in a perfectly sensible way on file write errors. I have had to deal with partially bad destination drives - one spinning hard drive with bad regions in the middle, and a USB thumbdrive which was bad around 5GB in. dd would fail at the same spot every time, and I had to use gparted to shrink my source partition(s) to fit within the good regions to get everything to work properly.

So, not only did dd fail (as it should) on bad sectors, it failed in a way that provided useful feedback to let me work around the problem.

Emerson 10-23-2016 08:47 AM

I think syg00 meant errors on source drive filesystem.

IsaacKuo 10-23-2016 08:58 AM

If there are any file system errors in the source, gparted would have caught them because it does a file system check before shrinking it.

The OP specified removing files to make it fit in 490GB, but did NOT mention anything about shrinking the actual partition. That's why I specified using gparted if necessary to shrink the source partition(s). The common tools for shrinking the partition would first do a file system check.

And even if there were no file system check...then so what? The cloned file system would be in the same state, and the next file system check will find and deal with errors just the same as it would have done for the source file system.

RvBVakama 10-24-2016 12:10 AM

Thanks for the replies everyone but dd seems a it unsafe to me, I'm just gonna use Macirum PE.
Now how to close a thread?

Emerson 10-24-2016 12:26 AM

Come on, millions of sysadmins use dd daily and ruin their systems permanently ... err, I wanted to say they fix their systems permanently. :p

RvBVakama 10-24-2016 01:47 AM

Quote:

Originally Posted by Emerson (Post 5622150)
Come on, millions of sysadmins use dd daily and ruin their systems permanently ... err, I wanted to say they fix their systems permanently. :p

ahhh no, I am PC DESTROYING prone so I want something an idiot can use

IsaacKuo 10-24-2016 08:32 AM

Or, you could read the linked tutorial discussion thread on JustLinux and see how reliable the described dd method is. I've personally used it dozens if not hundreds of times, with spectacular success. The only failures have been due to the destination drive having bad sectors, and that's easy enough to work around.

Seriously. It's the best most reliable method of cloning any OS (even multi-boot!) if you're not an expert at what you're doing. In particular, it will clone the bootloader as well as all UUIDs, file systems, file system types, file system options EXACTLY. You don't need to be an expert in how the bootloader you're using works, or configuration of the boot process. The dd method will simply clone everything precisely.

I use the dd method for all operating systems, including weird Windows XPE kiosk systems. The Windows based cloning software doesn't always work with these. But the dd method always works.

I don't really understand why some people just want to be unhelpful. People come to LinuxQuestions and other Linux forums for help. So, what's wrong with just providing some help and explaining a solution to their problem? I notice that I'm the ONLY person who actually answered the question with a solution. And it's a solution I have personally used and proven reliable with first hand experience over many years.

What's wrong with you people?

Emerson 10-24-2016 09:39 AM

Yes I have used dd for many years and cannot recall a case it went wrong. But you definitely need to pay attention to what you are doing. Sorry if my joke was inappropriate. It was just funny someone not using the knife because it is sharp.


All times are GMT -5. The time now is 08:42 PM.