Announcement

Collapse
No announcement yet.

"dd" transfer of data failed in part. Can it be salvaged?

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

    "dd" transfer of data failed in part. Can it be salvaged?

    Using the command 'dd if=/dev/sda of=/dev/sdb bs=4096' I copied my failing
    HDD to a new HDD.

    During the copy process I was advised about the stage of completion a few times, so I was confident things were going as intended. Additionally, the container of the New HDD had an led that blinked continuously during the copy process and stopped blinking when process finished.

    When completed, I removed the failing HDD and put the new drive in my Laptop. After starting the computer an error message indicating unrecognizable file system appeared and the system went to a grub rescue prompt.

    Using a liveUSB, I opened "Try Kubuntu", then opened the Partition Application in System. After the partition package opened, data appeared for the LiveUSB, but the new HDD stated there was no partition information. No used or unused space was indicated. Can this problem be rectified? I also noticed the file system indicated on the new drive was FAT32. I suspect that is correct, though.

    I still have the failing HDD and believe it would function if redoing the process is required. If so, it would be nice if I could leave the new HDD in the laptop and make the transfer from the outside unit.

    Does it appear that I executed the Command wrong? Thanks!

    #2
    Sorry to hear you are still having problems.
    I have omitted to mention that you may have to create a partition table first on your new drive. Sorry about that.
    I have used this command many times and it never failed, but that was on already used drives with, presumably, a partition table in place.
    The dd command will copy everything perfectly, but will not look for a partition table, as far as i know.
    So i am afraid that you may have to start the whole process all over again.
    No harm done, just waisted a few hours of your time.
    So i would suggest you replace your old drive, plug in your new drive in its USB caddy, and fire up KDE Partition Manager.

    Click image for larger version

Name:	snapshot12.jpg
Views:	1
Size:	80.2 KB
ID:	642456

    In KDE Partition Manager, highlight you new drive, presumably /dev/sdb, and under "Device", select "New Partition Table"

    Click image for larger version

Name:	snapshot13.jpg
Views:	1
Size:	68.2 KB
ID:	642457

    Choose the "MS-Dos" option and click on "Create New Partition Table".
    It will do as it says, destroy all data but that's ok.
    Once it has created the partition table, all of your partitions, if any, will be gone and you will be left with "unallocated space" only.
    You can leave it like that, you don't have to do any formatting.
    You can then go ahead with the dd copying again.
    I am using Kubuntu 14.10, so your KDE Partition Manager probably will look slightly different, but it will do the same thing.

    Let us know how you got on.
    Last edited by GerardV; Sep 09, 2014, 05:37 AM.
    sigpic

    Comment


      #3
      Looking at Gerard's first screenshot I wonder if it is possible using KDE Partition Manager to export the partition table from the old drive and import it to the new drive without destroying the already copied data? I see my older version of KDE Partition Manager (v1.0.3) does not have that option. It might be worth a try before going to the bother of copying everything again. Just make sure you don't get mixed up which drive is which.
      Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
      Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

      Comment


        #4
        FWIW, it has been my understanding that dd works at the bit level and copies everything--bit by bit--that way, not really caring if it's a partition table or smartition table or a what-ition table. The command in Post #1 'should' start at the very start of sda, at bit 1 of the 512-byte table ... IOW, it looks, to me, that he used the correct dd command.
        An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

        Comment


          #5
          Thanks Rod, too late, already in the process. I hope I am doing right though.
          The TB drive ended up being formatted as FAT32 and was listed as /dev/sdc, so when I started the 'dd' process, where he had /dev/sdb, I made it /dev/sdc. Did I do the right thing? There was no MSDOS option, only FAT 16 and FAT 32 and NTFS. I chose FAT 32, because googling suggested that FAT 16 was for Win 95, 98, millenium. Somewhere in my memory, I remembered that most of the starting points with HDD's was FAT 32, even though newer installations of Vista, Win7 and Win8 were NTFS. I hope I don't have to do this again. Thanks for stepping in.

          Originally posted by Rod J View Post
          Looking at Gerard's first screenshot I wonder if it is possible using KDE Partition Manager to export the partition table from the old drive and import it to the new drive without destroying the already copied data? I see my older version of KDE Partition Manager (v1.0.3) does not have that option. It might be worth a try before going to the bother of copying everything again. Just make sure you don't get mixed up which drive is which.

          Comment


            #6
            Does anyone else wonder if this method is going to work in one shot? You will probably have to at least set up a partition table and then the properly formatted partition per OS of the same or larger size as you have now. Then you must run dd on each partition. I also wonder how grub is going to handle this dual boot since the disk id for each os will have changed.
            Last edited by anika200; Sep 09, 2014, 09:23 AM.

            Comment


              #7
              Since I last replied, I have had to start over 3 times. Each time I went back to the partition manager and created a fresh FAT 32 partition table. The computer starts the dd just fine, but stops at about 4GB and ends the process therre. Just the OS's are about 10GB, so something is amiss. It probably is the hard drive finally failing, I don't know, It looks like I am going to have to bite the bullet and lose my data. This is a tough loss, I have been using it for secure backup for important stuff. I hardly use the laptop, so I never expected this kind of problem to ever happen. Seems like I have to learn the big stuff the hard way. Thanks to all for trying.

              I will try one time more, watch the post for a solution until it works or fails one last time . then Install the 2 OS's fresh and accept the loss.

              Comment


                #8
                Wait do not do anything, you should not loose any data.

                Comment


                  #9
                  To SKIP the MBR/partition table, you'd have to explicitly put a skip parameter into dd (of, say, 512 or 4096 or whatever you wish to skip on that disk); otherwise, you ARE already dd-ing the MBR/partition table (in your dd command of Post #1).
                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment


                    #10
                    Let me get this straight, you now have a usb harddrive container that holds your old laptop drive or is the drive still in the laptop?

                    Comment


                      #11
                      Was there ever an initial display of disk layout and type? It could be that he went from gpt to mbr and then what? I
                      Code:
                      fdisk -l

                      Comment


                        #12
                        Whatever I did was catastrophic. Impossible to repair. I have mortally damaged both OS's on my laptop and Kubuntu on my PC. Right now, when I try to start Kubuntu on my Desktop PC, I get this at restart:


                        GNU GRUB Version 2.02~Beta2--90ubuntu1

                        Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.

                        grub>_

                        I have no idea what caused this or how to fix it, if it is possible. Thanks for any help.

                        Originally posted by anika200 View Post
                        Was there ever an initial display of disk layout and type? It could be that he went from gpt to mbr and then what? I
                        Code:
                        fdisk -l

                        Comment


                          #13
                          you should never "dd" anything until you are EXACTLY sure what you are doing ,,,,,,and NOTHING in this thread is telling us which drive is what .

                          + you should not try to "dd" mounted file system.

                          for this to work you would be needing to be using a live USB/DVD/CD to run the computer with both drives attached to the computer but NOT in use .

                          then open parted
                          Code:
                          sudo parted -l
                          and see what the drives sdx assignments are and use those in the "dd" command ,,,,,,,,,,,,,,if you were using a liveUSB at the time then sda would have been the liveUSB you were copying (probably)

                          so STOP now and tell exactly how things were setup when you tryed to do this and exactly how you went about it.

                          VINNY
                          i7 4core HT 8MB L3 2.9GHz
                          16GB RAM
                          Nvidia GTX 860M 4GB RAM 1152 cuda cores

                          Comment


                            #14
                            First, I have been careful to keep the computer OFF most of the time. The warning about imminent drive failure made me concerned about how long the drive might last before quitting. I put the new replacement drive in a container that works for external HDDs. I connected it to a USB 2.0 port. I opened a konsole and typed: 'dd if=/dev/sda of=/dev/sdb bs=4096 as was suggested in a reply.

                            After a little over an hour and with several %age progress reports the copy finished. The copy was a failure because I did not know that the replacement drive had to have a DOS partition.

                            Next I opened partition software and created a FAT 32 partition for the replacement drive. I noticed it was identified as /dev/sbc, so when I entered the 'dd' command in the konsole, I entered it like this: dd if=/dev/sda of=/dev/sdc bs=4096. When the copy process finished, there was only 4gb of data copied and the process stopped.

                            I figured something had gone wrong, so I re-partitioned the drive FAT 32 again. The partitioner said any data would be lost, but that did not seem a problem, because if the lost area was put in a separate computer created partition, it is a big drive and I did not care if I lost a little space.

                            Finally after duplicating the effort and only copying 4GB before completion, I decided I wanted to read the information on the replacement drive, if possible, to get more understanding.

                            That is when I found that I had actually copied the USB 3.0 liveUSB drive. I selected replacement drive and it opened to the "Try Kubuntu"/"Install Kubuntu" page of the liveUSB, I thought, but it probably should be called liveHDD, because the liveUSB was not in any USB port at the time.

                            I was warned if I did it wrong that I would lose the data, so that is where I am now.

                            Not being used to operating Windows 7 anymore, an application called AdBlock stopped my download of Gparted. When I finally found how to disable the block and downloaded Gparted, I made a liveCD.

                            When I opened Gparted I waited though the opening process until Language had to be selected. I chose 33, US English. Next was a selection for the video. I chose to use the default settings on two occasions, when both times the application seemed to pause or freeze at that point.

                            I tried again to open Gparted, this time selecting the options for manual configuration. There wasn't any choice for the aspect ratio of my monitors so I chose the 1400x1080 option, which seemed closest to my 1920x1080 aspect ration. I tried twice again, but at this point in the opening of Gparted the system seemed to pause or freeze again.

                            At this point, I thought perhaps total failure of the original HDD had caused the problem. I don't know enough about it to know.

                            I still have the old HDD, so perhaps my OS's and data are still preserved, but the pressure and failure were getting too much for me, so I decided to try to put a clean install of both Kubuntu 14.04 and Windows 7 on the replacement drive and forget about the lost data. To top it off, while trying to do all this, I dropped two of the smallest screws I have ever used.

                            I spent hours on my hands and knees looking for them, until my 71 years caught up with me, and I had to stop looking. A potential further problem is that I lost both of them when attempting to secure the HDD's in the laptop. There are two small open areas right next to where I was attempting to secure the HDD, and I am also worried that one or both may have fallen into one of those open spaces and gotten into the laptop's main works.

                            I turned the computer upside down and gently rattled it to see if I could hear anything moving or perhaps drop out of the computer, but like I said, at 71, I have to turn the volume up a bit when listening to a movie, so if they made any noise, their small size may have made the sound inaudible to me.

                            I was unaware of the warning you indicate in this reply, but even if the instructions I tried to apply were incorrect, I do not hold that against those trying to help me; I am grateful when I get help. I still have two persistent problems that if I got help replies, I would take the advice, good or bad, I have had the problems a long time and they are two annoying to live with.

                            And finally, my Desktop Kubuntu doesn't open now either, but I am pretty sure it has to do with my replacement HDD. I had to use my Desktop PC to read the replacement HDD. Since I did not have a live USB in a port, when I saw the "Try Kubuntu"/"Install Kubuntu" screen open, it did not occur to me that I was reading from a liveHDD, for lack of a better way to describe it. I went through the steps that came onscreen looking for anything that would let me know why I was seeing what I was seeing. But the screen for selecting 'manual' and the screen for setting file systems and partitions never appeared, but a screen came up that included success on all steps of an installation of an OS with the last item highlighted. When I clicked continue, it proceeded like an installation of the OS.

                            I let it go, thinking that all the damage had already been done, not knowing what would happen. After an extremely long period of time, and after there was no indication of a completed install, I restarted the computer to a black screen with a grub>_ prompt.

                            I realize that I am too stupid to consider operating a computer, but I love it so much, I just can't give it up. I am sorry for the burden that puts on you guys, so if you say to quit, I will quit. I hate to think of that, but at least I won't be a pest any longer. I still need to use it a little though, so I want it working again. But I can hold its use to watching movies and purchasing things I need and paying my bills on line. I can't get around well enough to give up those things. Thanks for your help getting it working again, if you will.

                            If I could get things to open on top of existing open pages and sound to work again, these are also very important to me. If possible, that is.

                            Comment


                              #15
                              your data MAY still be intact,,,,,,may ,

                              but we need to take this SLOW so we know what’s what .

                              first - is the computer with the bad HD still assembled in the way it was when it worked?

                              second - if it is still assembled will it boot a liveUSB/DVD

                              do not have any extra monitors on it or printers or anything yet.

                              just answer these 2 questions . with ,,,,"yes it's assembled" or no it's not & "yes I can boot a liveUSB" or no I can not.

                              VINNY
                              i7 4core HT 8MB L3 2.9GHz
                              16GB RAM
                              Nvidia GTX 860M 4GB RAM 1152 cuda cores

                              Comment

                              Working...
                              X