Announcement

Collapse
No announcement yet.

DD commands I need to transfer system to new disc

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    DD commands I need to transfer system to new disc

    I don't know if I'm that new, I think they just keep changing stuff and I become obsolete. I used to do a dd command in terminal to copy bootable system drives and I don't think I am doing it right anymore. Here is what I have...

    Statement
    dd if=/dev/sda of=/dev/sdb


    Description
    Copy the contents from the if= drive /dev/sda to the of= drive /dev/sdb.

    This is the result:
    stanbar@stanbar-C55B:~$ dd if=/dev/sda of=/dev/sdb
    dd: failed to open '/dev/sda': Permission denied
    stanbar@stanbar-C55B:~$

    What do I do? I have a older hard drive and want o move it to a solid state disc in a toshiba laptop. Have an external usb3 drive caddy and will switch out the discs after duplication.

    #2
    For starters, use sudo:

    Code:
    sudo dd if=/dev/sda of=/dev/sdb
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Originally posted by spiderman View Post
      ... they just keep changing stuff and I become obsolete. .....
      I resemble that remark!
      Originally posted by spiderman View Post
      Statement
      dd if=/dev/sda of=/dev/sdb


      Description
      Copy the contents from the if= drive /dev/sda to the of= drive /dev/sdb.

      This is the result:
      stanbar@stanbar-C55B:~$ dd if=/dev/sda of=/dev/sdb
      dd: failed to open '/dev/sda': Permission denied
      stanbar@stanbar-C55B:~$

      What do I do? I have a older hard drive and want o move it to a solid state disc in a toshiba laptop. Have an external usb3 drive caddy and will switch out the discs after duplication.
      Put "sudo" in front of the command:
      sudo dd if=/dev/sda of=/dev/sdb

      You may want to add "bs=1M" or a bigger value on the end so the command will progress faster than one byte at a time.

      Even faster is to use the cat command
      sudo sh -c 'cat /dev/sdb >/dev/sdc'

      http://www.tecmint.com/backup-or-clo...g-cat-command/
      Last edited by GreyGeek; Jun 29, 2016, 10:13 PM.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        Haven't tried it myself but debian faq also mentions just using cp. As root:

        Code:
        cp /path/to.iso /path/to/block/device
        I might be a bit overcautious here but I like adding 'sync' when moving big data; it's probably unnecessary but I guess I'd do

        Code:
        cp /path/to.iso /path/to/block/device && sync
        just to insure I'm okay to unmount the target device.

        edit: Just noticed we weren't talking about copying an iso; I'll go sit down now
        Last edited by wizard10000; Jun 30, 2016, 01:28 PM.
        we see things not as they are, but as we are.
        -- anais nin

        Comment


          #5
          i would use the command
          Code:
          sudo dd if=<path of source disk> of=<path of target disk> bs=4M status=progress
          this way you will get status info from dd and it won't look like the command is just hanging for some period of time. (*this works on 16.04 + ) otherwise you have to leave the status=progress part off the command
          Mark Your Solved Issues [SOLVED]
          (top of thread: thread tools)

          Comment


            #6
            I thought copy, cp, was only for file systems.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              No, padwan!
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                I mean, how would cp pick up all the boot structure and such?
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  It has the "force"!
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Wow! I'm so glad we have this forum. Thank you for your support.

                    Comment

                    Working...
                    X