LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-08-2016, 06:01 AM   #1
cwc
Member
 
Registered: Nov 2004
Location: Tri-Cities, WA
Distribution: Gentoo, Ubuntu, Mint,Fedora
Posts: 71

Rep: Reputation: 16
cloning a harddrive with dd


I used :
dd if=/dev/sda of-/dev/sdb
to try to clone a harddrive with no luck grub would not load.
I'm running debain.

Please throw me a bone on what you have done to get this to work.

I saw this from http://unix.stackexchange.com/questi...om-hdd-to-hdd:

sudo dd if=/dev/sdb bs=128K | pv -s 3000G | sudo dd of=/dev/sdc bs=128K
 
Old 12-08-2016, 06:10 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,844

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
use dcfldd instead of dd if you want to see the progress. Do not need pv and pipe.
you gave insufficient information, please tell us a few words about what's happening: error message/whatever
 
Old 12-08-2016, 02:28 PM   #3
linuxbird
Member
 
Registered: Feb 2006
Distribution: Slackware
Posts: 543

Rep: Reputation: 36
I tend to use clonezilla and copy "offline." Clonezilla will help with the boot and partition information.

Are you restricted to using dd?
 
Old 12-08-2016, 03:15 PM   #4
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 cwc View Post
I used :
dd if=/dev/sda of-/dev/sdb
to try to clone a harddrive with no luck grub would not load.
I'm running debain.

Please throw me a bone on what you have done to get this to work.

I saw this from http://unix.stackexchange.com/questi...om-hdd-to-hdd:

sudo dd if=/dev/sdb bs=128K | pv -s 3000G | sudo dd of=/dev/sdc bs=128K
What you're doing should absolutely work, providing you type it correctly. Based on the command you cited as your primary example, it should be:
Code:
$ sudo dd if=/dev/sda of=/dev/sdb
Have you used sudo when you've done the command? Are you sure the input is /dev/sda and the output is /dev/sdb? That's all you need. You can opt to add a bs=10M to that command, I usually don't.
 
Old 12-08-2016, 04:36 PM   #5
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
I don't know if this is off-topic or not, but recent Fedora versions of dd offer status=progress option to show progress, without needing pv or USR1 signal.
 
Old 12-08-2016, 10:00 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Notes,

You can't clone live media with dd usually. Boot to some cd or usb and then find correct drives to copy from and to.

dd command copies exactly and is mainly useful on exact disk to exact disk and exact position of disk in some cases. Generally before you clone using grub you may have to make grub and other drive and maybe network settings to a generic form otherwise you'll have to correct later.

Not sure the clone operation worked correctly either.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cloning varan12345 Linux - Newbie 2 10-26-2011 12:22 PM
hd cloning hectorDUQUE Fedora 2 05-15-2007 09:37 AM
Fedora Core 6 won't recognize second internal harddrive or usb harddrive Rockgod1969 Linux - Hardware 14 01-26-2007 01:03 AM
Installing linux on 2nd harddrive(dual boot) windows on seperate harddrive lysol Linux - Software 25 08-03-2004 09:33 AM
Need to replace full harddrive with new, larger harddrive pearlr Linux - Newbie 1 01-02-2004 12:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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