Trying to clone a drive ??

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
OldChap
Level 1
Level 1
Posts: 22
Joined: Mon Mar 12, 2012 4:45 pm
Location: Plymouth UK

Trying to clone a drive ??

Post by OldChap »

This is a first for me. using the command:

Code: Select all

dd if=/dev/sda of=/dev/sdb
Two things of note: for me this is not verbose so cannot see progress and I have had a couple of tries on wiped small (160GB same size) drives and I don't get the cursor back to complete the next command (this after 20 minutes) Should I wait longer?

So before I go any further I wanted to ask: is any preparation required prior? like formatting etc or does this command obviate the need by overwriting everything. (I feel it should)

Should I not be able to replicate a drive this way and just install it on another machine?

Machine is e5-2620 x2 32GB Mint 18.3 cinnamon

Hints and tips gratefully recieved

Mute Ant
Level 14
Level 14
Posts: 5134
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Trying to clone a drive ??

Post by Mute Ant »

The dd command was invented back when '16-bit' and 'floppy-disks' were pretty neat ideas. You could hear the floppy head jump from track-to-track and see the light go out when it was finished.

A 'small' hard drive of 160GB at a moderate 60MB/s would be 45 minutes of virtual silence --yawn-- so I use the modern replacement for dd

The ddrescue command works like this...
sudo ddrescue /dev/sd-FROM /dev/sd-INTO --force
...and you see a progress report, an average transfer rate and it will retry bad reads, which is very handy on faded DVD backup disks.

"I feel it should" Yes it does. Make sure you get the 'from' and 'into' drives exactly right.

"Should I not be able to replicate a drive this way and just install it on another machine?" Yes. A generic GNU-Linux tests for available hardware each time it starts. Even Windows accepts being moved wholly into a new hard drive.
Last edited by Mute Ant on Sun Dec 24, 2017 5:17 pm, edited 2 times in total.
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".

OldChap
Level 1
Level 1
Posts: 22
Joined: Mon Mar 12, 2012 4:45 pm
Location: Plymouth UK

Re: Trying to clone a drive ??

Post by OldChap »

Ha. I am older so it doesn't seem so old to me :)

Thanks for the tip. I shall give it a go

Edit: Much better. The ability to watch the progress is helpful. 28 minutes to complete the 160GB drive.

Now to see if I can boot from it.

OldChap
Level 1
Level 1
Posts: 22
Joined: Mon Mar 12, 2012 4:45 pm
Location: Plymouth UK

Re: Trying to clone a drive ??

Post by OldChap »

Managed to boot from it fine on the same machine but had an issue on different machine

Probably my fault when I forgot this one is not set up for hot swap but

Code: Select all

fsck -fy /dev/sda1
fixed it anyway

Many thanks for the advice Mute Ant

Post Reply

Return to “Installation & Boot”