Find the answer to your Linux question:
Results 1 to 4 of 4
so i'm using dd to copy my harddrive to an external harddrive, and it's not going well what i want is to be able to boot from the external and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    17

    dd problem


    so i'm using dd to copy my harddrive to an external harddrive, and it's not going well

    what i want is to be able to boot from the external and run the machine i have locally on other computers, using a usb interface.

    what i did, is i made 3 partitions to the external drive, sdb1,2,and 5

    1 being ext4, and the same size as the local harddrive
    2 being extended, and 5 being swap

    i did all this using gparted. So, the problem is the dd stops saying there's not enough space on sdb1 to complete the task, and when i try to mount it, it says that there's too many blocks. i used dmesg | tail to figure that out.

    so, if anyone can help, i would really appreciate it.

    thx in advance,
    -dan

  2. #2
    Just Joined!
    Join Date
    Oct 2007
    Posts
    1
    I am not sure exactly what you are trying to do here but I have used dd in the past to backup my partitions. However, I wanted to see the progress specially with those large partitions. I found dcfldd command to be very useful. I think it uses dd internally but nicely reports the progress and if there are any errors. So you may try using dcfldd if you suspect there are some errors that prevent dd from finishing its job.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,159
    You can't just clone a drive with dd to another unless they are identical drives. Likewise, cloning partitions - you need to be sure that the target is at least as big as the source, and after you copy it, you will need to fix up the file system using fsck.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined! Prioria's Avatar
    Join Date
    Sep 2010
    Location
    Gainesville, FL
    Posts
    31
    Not sure about that... I have used dd to clone drives to very different destination drives. (WD 40GB 5400RPM drive to a Seagate 500GB 7200RPM drive, etc)

    About your problem:

    You don't need to create any partitions on the destination drive if you just want a clone. All you need to do is:

    sudo fdisk -l to list your drives and run:
    "dd if=/dev/sda of=/dev/sdb"

    Here, if=... sets the source and of=... sets the destination.

    Hint: dd takes a long time to clone so you can check the progress by doing this:

    When the dd is running, open a second terminal and run:
    ps -ef | grep dd

    You'll get something like this:

    root 31733 31268 54 10:44 pts/0 00:01:55 dd of my-dd.img

    Then find the status of the dd by running:

    kill -SIGUSR1 31733 (replacing 31733 with your number)

    Then the original dd terminal will dump the status:

    #dd if=/dev/sda1 of=my-dd.img
    12574781+40555 records in
    12601304+0 records out
    6451867648 bytes (6.5 GB) copied, 224.634 s, 28.7 MB/s

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •