Find the answer to your Linux question:
Results 1 to 9 of 9
Hello everyone. Maybe i m posting on wrong distro category,but this is very urgent,and i have no idea who to ask. Here is my problem. I got an arch linux ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2014
    Posts
    4

    Malformed sda(main hard disk drive) by wrong use of "dd"


    Hello everyone. Maybe i m posting on wrong distro category,but this is very urgent,and i have no idea who to ask.
    Here is my problem.

    I got an arch linux iso,and wanted to make a bootable usb using dd. So for "of" i put /dev/sda which is my main hard disk drive (instead of sdb,the flash drive). Now,after reboot i get the arch linux installation screen,and cant boot my existing OSs.I even tried boot already existing OS but no luck.
    Any way that may lead to recovery?
    Any solution?

    Again,this is may not be the right place to ask,but I am a bit in chaos.

    Thank you in advance

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,390
    Hi and welcome,

    Unfortunately you will not be able to boot your arch linux again.
    It is overwritten.

    Depending on how much has been overwritten, you might be able to salvage some files.
    Have a look at these tools
    TestDisk - CGSecurity
    PhotoRec - CGSecurity

    It should be noted, that you should not do any write actions to this disk anymore.
    Any write action will decrease the number of restoreable files.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    May 2014
    Posts
    4
    Ok so this is maybe worse than i anticipated,and maybe I did not provide as much info as needed. I do not have arch linux installed. I have dual boot windows and kali linux. So now i can boot to neither of them. If there is no way i can boot to any of those two,how am i to restore the files? Use TestDisk from a live cd maybe?

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,390
    Ah ok, I misread your post a little. I thought arch was already installed.

    But still, the blocks that dd has overwritten are gone.
    dd starts at the first block and goes sequentially.

    So depending on how many blocks dd has overwritten, the second operating system might actually have survived.
    Usually windows is on the first partition, so I assume this is gone.

    Also the partition table is gone, because it is at the very first sector of a disk.
    However, there are backups on different sectors, plus there are tools to scan the disk and recreate the partition table.
    This would be my recommendation for your second operation system.
    - recreate the partition table
    - mount the partition
    - backup your important files
    - try to install a boot loader to get this OS booting again

    For the first operating system, you have to use TestDisk and/or PhotoRec to recover some files.
    You must always face the curtain with a bow.

  5. #5
    Just Joined!
    Join Date
    May 2014
    Posts
    4
    I am very sorry for the intense posting. I just cant belive what i did. I have some new info that may help sovle this.
    I run testdisk and it seems that there are 3 seperate "directories" :
    /dev/sda (which is my hard-disk)
    /dev/mapper/arch_root-image (1459 MB)
    /dev/dm-o (1459 MB)

    Does this change anything?

  6. #6
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,292
    It is a disaster but not necessarily unmitigated.

    TestDisk has a live Linux recovery CD. Hopefully you'll be able recover any data that was valuable to you.

    As the carpenters say, "measure twice, cut once". There are some tools in the Linux bag that always require a second thought before hitting the enter key.

  7. #7
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,390
    Testdisk is asking you on which device it should start working and try to recover files.
    You must always face the curtain with a bow.

  8. #8
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,292
    Have you read this:
    Running TestDisk - CGSecurity

  9. #9
    Just Joined!
    Join Date
    May 2014
    Posts
    4
    Ok guys.I ve made it. I thought there was no hope,but then i found them. The problem was I had to choose Intel/Pc partitioning on testdisk->analyze(the program itself detected "None" by default.after 10 minutes it asked to create partition table all over,i did it and then i booted from a live cd.The partitions were there,EXCEPT the Windows partition.It seems THAT partition was (the only one) affected. I may try photorec to restore the rest of my files.
    I also want to say that it was not the first time i used d(isk)d(estroyer) (no wonder the nickname),just this time I made a mistake.
    Thank you so much everyone for your time and knowledge,and I m going to start over using Arch Linux(that was the cause in the first place).

    p.s. if you want,i can post the answer more clearly for later reference,just tell me.

Posting Permissions

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