Menu

Restoring only MBR

Help
Shoke
2008-02-05
2013-04-05
  • Shoke

    Shoke - 2008-02-05

    Hello,

    I have the same problem like schaapmansz, I try to recover image and receive lzop error. I restore with another compressor tool and use ntfsclone to copy partitions to the harddisk, but MBR doesn´t restore. Is there any way to restore only MBR from image to disk?

     
    • Steven Shiau

      Steven Shiau - 2008-02-05

      If you have saved a clonezilla image, yes, you can.
      Take hda (1st IDE HD) as an example, use the following to restore the executable code area and partition table:
      dd if=/home/partimag/$IMAGENAME/hda_mbr of=/dev/hda
      (Replace $IMAGENAME with yours)
      If you mean you want to restore the first 446 bytes of MBR data, i.e. executable code area:
      dd if=/home/partimag/$IMAGENAME/hda-mbr of=/dev/hda bs=446 count=1

      ///WARNING/// This action is really dangerous! You might destroy all the data in the harddisk. Be careful when you do it.

       
    • Shoke

      Shoke - 2008-02-19

      Hello,

      Thanks for your help. The boot sector is restored, but it doesnt work, coz the ntfs clone image is damaged. How could i recover the ntfs clone image? I tried with OPTIONS-OVERWRITE-RESCUE but received many errors. Everytime i restore the image and receive many errors, the size is of the image file gets 0 bytes. Anyway, i work with copies and keep the original image file. Is there anyway of view, extract, check... etc ntfsclone image? I need the data in that image file.

      Thanks in advance...

       
      • Steven Shiau

        Steven Shiau - 2008-02-19

        Well, if the image is corrupt, then it's not easy to recover it. However, you still can try this:
        1. Prepare a large disk in Linux
        2. Say if your image is /home/partimag/YOURIMAGE/, and the image is /home/partimag/YOURIMAGE/hda1.ntfs-img.aa, hda1.ntfs-img.ab...
        run
        "file /home/partimag/YOURIMAGE/hda1.ntfs-img.aa"
        to see it's gzip, bzip or lzop image. Say it's gzip, then you can run
        cat /home/partimag/YOURIMAGE/hda1.ntfs-img.* | gunzip -c | ntfsclone --restore-image -o hda1.img -
        Then you will have a "hda1.img" which you can mount it by
        mount -o loop -t ntfs hda1.img /mnt

        Good luck.

         
    • Shoke

      Shoke - 2008-02-19

      :´( The original compressed image with lzop has been damaged, I have only the descompressed file image. There is only the compressed original file of the second partition, and it´s a recovery partition, but the documents and other files were in the 1st partition. I tried to recover from the descompressed image but the result is an empty partition, with alone folder: "System Volume Information" :(

       
      • Steven Shiau

        Steven Shiau - 2008-02-20

        Ouch!
        Do you know any reason that the image file is broken ? Due to lzop or ?
        By default now gzip is used when saving an image, and there is a warning when you choose to use lzop...

         
    • Shoke

      Shoke - 2008-02-20

      The error has been caused by lzop and uncompressing with 7zip coz lzop doesn´t end descompression. I lost two files from lzop´s 1st partition and have the 2nd partition but received errors.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.