Announcement

Collapse
No announcement yet.

Have I killed my hdd with dd ?

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

    #16
    Re: Have I killed my hdd with dd ?

    Originally posted by oshunluvr
    Sweet! Government job? I only get 50% but I retired at 46! Take that!
    Where should I write down my name to get such wondrous benefits?

    I spent about a couple hours in a Cessna 152 but switched when I couldn't press my toes on the top of the peddles to brake the aircraft -- not enough room in the cockpit. I licensed on a Cessna 172 Skyhawk, which is a beautiful aircraft. But, my favorite was the Cessna 206 Centurion, a 6 passenger, 3 bladed, triple axis autopilot with retractable landing gear. That puppy was fast. Coming back from a business trip to Albuquerque, NM, TACAN clocked me at 295 mph ground speed over Kansas. The pitot tube put me at 195 Knts (Vmax) indicated air speed. The difference was a tail wind.

    I would fly rather than eat and I am hungry all the time. But, alas, my eye problems have worsened with age and even an eye surgery doesn't correct the strabismus which plagued me earlier. Cry
    I see. Well, you might try stop eating chicken for a week or two and come back to tell us how you feel after doing so.
    Multibooting: Kubuntu Noble 24.04
    Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
    Win XP, 7 & 10 sadly
    Using Linux since June, 2008

    Comment


      #17
      Re: Have I killed my hdd with dd ?

      Originally posted by kyonides
      ....
      I see. Well, you might try stop eating chicken for a week or two and come back to tell us how you feel after doing so.
      Chicken I could stop, but Buffalo is another matter. Have you taked? eaten Buffalo burgers or steaks? Puts beef to shame.
      "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


        #18
        Re: Have I killed my hdd with dd ?

        Spoken like a true midwesterner! 8)

        Please Read Me

        Comment


          #19
          Re: Have I killed my hdd with dd ?

          Greygreek & oshunluvr,

          Thanks for the information. I spoke too soon, because, shortly after my last post, I began getting error messages stating the filesystem had gone read only. I had in fact overwrote the first ~1.5Gb with an (irrelevant) boot record and new partition meant for my usb disk.

          I thought it would be useful to highlight what I did to recover from the situation.

          Whilst there was nothing wrong mechanically with my hard drive I still opted to copy all the data on the drive to an image file on my usb hard drive. I tried ddrescue but it didn't work too well with the usb hard drive. So, back to dd, the command I'd just used to kill the drive in the first place .

          Booting from a live cd and mounting the necessary drives enabled me to use the dd command to copy the data (minus my partition table) to an image file:

          dd if=/dev/sda of=/mnt/disk-1/back.img

          This worked a treat; creating a backup of my hard drive on my usb drive. This allowed me to reinstall Linux on my hard drive and retreive data from a backup which was, albeit, a few weeks old. But, I still needed to retrieve some of my recent work.

          After reviewing: https://help.ubuntu.com/community/DataRecovery
          I tried to use testdisk to search for partitions. But, I feared they'd gone. I didn't have a separate /home partition having opted for Kubuntu's default partitions - which I guess just sets up a boot partition and just one main partition for the rest of the system at the begginning of the drive. Therefore, testdisk didn't return anything of use.

          Therefore, I opted to use foremost to search the image file and attempt to extract fragments of my files. From what I have learnt so far, foremost works by string search and matching. The only method available given the inability to search for filenames and filetypes.

          The following command scanned the image file and saved the results to a directory based on a configuration file called foremost.conf:

          foremost -i back.img -o /rescuedfiles/ -v -T

          I found that none of the pre-defined file formats in foremost.conf were of much use to me in etc/foremost.conf.

          However, with some playing around I added my own:

          Code:
              odt y  20000000  PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.textPK META-INF/manifest.xmlPK????????????????????
              ods y  10000000  PK????????????????????????????mimetypeapplication/vnd.oasis.opendocument.spreadsheetPK META-INF/manifest.xmlPK????????????????????
              csv   y    30000  Bank:Cash    ASCII
              pl   y    300000 #!/usr/local/bin/perl  ASCII
              tex   y    150000 chapter{ ASCII
          The first 2 lines searched for odt and ods openoffice documents.
          The "csv" line found my ledger files by searching for the specific string: Bank:Cash.
          The "pl" line allowed me to find all perl scripts (which returned a lot of files).
          Finally, the "tex" line retreived my latex files by looking for data containing the "chapter{" string - which all of my latex files used.

          Adding ASCII to each line restricted the returned data to ASCII only.

          With quite a few attempts at trying different search strings, file headers and footers, I was able to retreive most of my important data.


          Comment


            #20
            Re: Have I killed my hdd with dd ?

            Like I said:
            ...dd will start at track 0, sector 0 byte 0 and begin writing away, which wiped out your MBR, along with 1.4 GB of the 3.675 GB on sda1....
            which was easy to calculate from the data you supplied.

            Recovering your data using dd is great ending to this saga! Now you know why it is one of my favorite tools. Nice Job! 8)
            "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


              #21
              Re: Have I killed my hdd with dd ?

              I'd also like to add congratulations for be willing to put in the work required to get the job done. So many new linux users give up and wipe the drive or go back to windows without even trying to get the results they really want.

              Good job!

              Please Read Me

              Comment

              Working...
              X