LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-24-2016, 02:33 PM   #16
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930

Quote:
Originally Posted by RvBVakama View Post
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 View Post
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!!!

Last edited by rtmistler; 10-24-2016 at 02:35 PM.
 
Old 10-26-2016, 04:49 PM   #17
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
"gparted would have caught them because it does a file system check before shrinking it."

If someone has a link to this I'd be interested. You'd think it would do that.

Last edited by jefro; 10-26-2016 at 04:51 PM.
 
Old 10-26-2016, 06:03 PM   #18
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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.
 
Old 10-26-2016, 07:18 PM   #19
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
I just saw that quote and began to wonder. I'd like to know for sure either way.
 
Old 11-16-2019, 10:44 PM   #20
DellAnderson
LQ Newbie
 
Registered: Nov 2019
Posts: 3

Rep: Reputation: Disabled
Question Link to HDD -> SSD using DD not working

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?
 
Old 11-17-2019, 06:35 PM   #21
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Hey, I don't know where to find my post, but the original resource I used to learn how to use dd is here:

http://forums.justlinux.com/showthre...CD-to-clone-XP

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.
 
Old 11-17-2019, 08:41 PM   #22
DellAnderson
LQ Newbie
 
Registered: Nov 2019
Posts: 3

Rep: Reputation: Disabled
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?
 
Old 11-17-2019, 09:40 PM   #23
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
I would recommend clonezilla over dd; it's much faster and fairly straightforward. You can download a bootable iso here:

https://clonezilla.org/downloads/dow...?branch=stable
 
Old 11-18-2019, 04:30 AM   #24
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
DellAnderson,

I second the advice from kilgoretrout to use Clonezilla (see download link above).

Just to be on the safe side, I would also burn the following two repair items to CD/DVD/USB:

Boot Repair Disk:
https://sourceforge.net/p/boot-repair-cd/home/Home/

Rescatux & Super Grub2 Disk
:
https://www.supergrubdisk.org/super-grub2-disk/

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.

Last edited by beachboy2; 11-19-2019 at 01:33 AM.
 
Old 11-18-2019, 08:18 PM   #25
DellAnderson
LQ Newbie
 
Registered: Nov 2019
Posts: 3

Rep: Reputation: Disabled
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).
 
  


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
Install Linux in Toshiba u940 series with 32gb ssd and 750gb hdd I would like to have boot code in ssd only cvkchary Linux - Laptop and Netbook 4 08-31-2016 04:26 PM
[SOLVED] Shrink the hard drive to accommodate a SSD clone. ArtKautz Linux - Hardware 11 04-02-2016 01:18 PM
New Clone SSD Drive Will Not Boot doctorcisco Linux - Software 1 05-07-2012 11:58 PM
Clone to Sandforce SSD anhume Linux - Hardware 7 01-11-2011 06:35 PM
[SOLVED] Using both SSD/HDD for partitioning or is it better to just get external HDD? Switch7 Linux - Hardware 16 10-26-2009 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:08 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