Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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?
Under Thread Tools you can mark it as Solved. Closing it you can "request" this using the REPORT button, however I do not feel the thread merits closing from future posts.
Personally I would use dd and do not consider it unsafe, in fact I consider it more correct for this exact use case. One does not avoid a tool out of caution, instead you should learn how to use it properly and safely.
Quote:
Originally Posted by Emerson
Come on, millions of sysadmins use dd daily and ruin their systems permanently ... err, I wanted to say they fix their systems permanently.
It's not a bad joke, I myself have reporting having done exactly this in the very old thread where we admit our Linux sins.
Even if they were decades ago, and JUST THAT ONE TIME!!!
I don't have a reference to gparted's behavior, just experience of using it and watching what it does while I'm waiting for it to complete its tasks. The initial file check before shrinking or moving is one of the more time consuming steps.
I have been searching for the simplest DD HDD->SSD clone tutorial. I was happy to find this thread and the link to a description, but the link doesn't work! (I can't post it here because this is my first post, but it's easy to find on the first page of this thread).
Does anyone have a working (or revised) version of that DD HDD->SSD tutorial link somewhere hidden on the interwebs?
Used Linux for years without getting into Grub and I don't want to now. Have my laptop configured perfectly except for it being an old sluggish HDD. Bought a nearly identical SSD and thought I could just DD or Clonezilla it but now I'm not sure because the only tutorials I've seen on line seem to use a combination of gparted/rsync/grub to make the disc bootable. I like easy. Thought I could just boot to a LiveCD and DD bit copy the entire hard drive including boot sector seems like it would work - Is this so easy no one bothers to write tutorials? Or am I missing something?
It's a bit out of date because it doesn't take into account EFI/UEFI boot methods - just MBR.
But anyway, if the HDD size fits entirely within the SSD size, you can simply dd it over ... sweet and simple. But if you need to shrink things first, then it can be a little more complicated. It's still pretty simple, though.
1) Boot into a liveCD or thumbdrive or whatever.
2) Make sure to turn off swap, if necessary, with "swapoff -a" (running as root, either with "su" or "sudo", depending on how Ubuntu-like your liveCD/thumbdrive is). If you don't turn off swap, gparted will have limited capabilities to modify partitions because the swap partition (if it exists) may be in use. Personally, I don't use swap partitions, but whatever.
3) Use gparted to shrink partitions, if necessary, to make everything fit in the first X GB (where the SSD is X GB big).
4) Use dd to clone the drive from the HDD to SSD. First use "fdisk -l" to verify the identities of the HDD and SSD device names. Obviously important! Then use something like:
"dd if=/dev/sda of=/dev/sdb bs=32256"
Oh - there is a dd option to display progress, but I forget what it is at the moment. I've been using dd since before that option was added. Without it, the default behavior is to display no feedback at all during the cloning. So ... you just have to be really really patient.
5) Optionally use gparted to expand partitions to fill out the SSD.
You do NOT need to do anything special with the MBR, reinstalling grub, or anything like that. It will just plain work.
However, be aware that the cloned partitions will have cloned the UUIDs also. This can cause the OS confusion if you have both the HDD and SSD installed at the same time. So, after completing the cloning and powering off, remember to remove one of them.
Thanks, Isaac - sweet and simple. Thank you very much for the details. I'm typing to you from my newly cloned to SSD drive! ;-) Wow! What a speedup.
I have to admit that I got impatient this afternoon and used Clonezilla using instructions from http://www.linux.com/tutorials/how-i...es-clonezilla/
I used TuxBoot to create a bootable USB (first time I'd done that) and then used a freshly downloaded Stable Alternate version of Clonezilla (has more drivers, including non-free, than the plain stable) and modified the instructions to do local disk to local disk clone instead of local disk to image. Had the new SSD plugged into a USB-to-SATA adapter and so far everything went well. The only thing that was a bit tricky was that my new SSD was recognized as sda and my (former) spinning disk drive was recognized as sdb, so I had to be very careful which way the clone went.
If I have any issues, I will follow your directions to the letter.
Thanks again for summarizing so clearly.
PS Do I need to do anything special to enable trim now since the original drive was HDD?
NB It is essential that you know exactly which drive is which before you start.
Instructions:
1. Boot from Clonezilla USB drive.
2. Select Clonezilla Live-Default settings.
3. Choose language.
4. Select Don’t touch keymap.
5. Start Clonezilla.
6. Select device-device.
7. Choose Beginner mode.
8. Select Disk to local Disk.
9. Now be very careful!!
10. Your Source disk should be sda (the HDD).
11. Your Destination or Target drive should be sdb (SSD). If you have anything else connected, make sure you know which drive is which!!
12. Skip the file system check.
13. Select Shutdown.
14. You will now be asked several times whether you wish to continue. Just keep pressing Enter or type Y and press Enter.
15. Wait for the cloning to complete and system shutdown.
16. Remove the Clonezilla USB drive.
17. Next, connect the Destination SSD drive to the cables currently used by the Source HDD. You may or may not wish to connect the old HDD to the cables previously used by the SSD.
18. Start computer.
Thanks KilgoreTrout and beachboy2 - due to moderation delay, my reply (#22 above) was already submitted and waiting in limbo land when you posted but I mentioned that I had already downloaded and used Clonezilla successfully, so I am glad to hear you confirm that I did the right thing. Didn't do the safe side stuff so I will make a note of that for next time. Also want to reemphasize that for whatever reason, Clonezilla recognized my (internal sata) source drive as sdb and my (external usb-to-sata adapter mounted) destination drive as sda. No idea why, unless it had to do with my bios boot order (I had selected USB as primary boot).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.