Menu

[MBR] What do these restore options do?

Help
Anonymous
2010-01-21
2013-10-13
  • Anonymous

    Anonymous - 2010-01-21

    Hello,

    I didn't find a document on the CZ site that explains precisely what these restore options actually do:

    -g auto (default: checked) : "Reinstall grub in client disk MBR (only if grub config exists)"
    -t (default : unchecked) : "Client does not restore the MBR"
    -t1 (default : unchecked) : "Client restores the prebuilt MBR from syslinux (for Windows only)"
    -j1 (default : unchecked) : "Write MBR (512 B) again after image is restored. Not OK for partition table differ from that of the image"
    -j2 (default : checked) : "Clone the hiddent data between MBR and 1st partition"
    -k (default : used) : "Do NOT create a partition table on the target disk"
    -j0 (default : used) : "Use dd to create partition"

    I need to know what these options do, because I don't know how CZ works in the following cases:
    - When the Master Boot Code was removed voluntarily with "dd if=/dev/zero of=/dev/sda bs=440 count=1", the MBR contains no Master Boot Code (a.k.a. Master Boot Loader), only the Partition Table

    - the MBR contains a Master Boot Code different from the one that was saved in the image. For instance, if I clone a Windows partition, does CZ also include the Windows Master Boot Code located in the MBR? If I then restore a Linux image, will CZ also update the MBR to replace the Windows Master Boot Code with the Grub in the Linux image?

    Thank you.

     
  • Steven Shiau

    Steven Shiau - 2010-01-26

    OK, I have put the answer here:
    http://drbl.sourceforge.net/faq/fine-print.php?path=./2_System/88_mbr_related_options.faq#88_mbr_related_options.faq

    Please check it, and if any more questions, please ask.

    Steven.

     
    • aeon

      aeon - 2013-10-02

      And what may I ask is the difference between the commands in 2. (-t) and 4. (-j1)? Shouldn't the command in 4. be:

      dd if=$IMAGE_DIR/$HARDDRIVE-mbr of=/dev/$HARDDRIVE bs=512 count=1 ?

       
      • Steven Shiau

        Steven Shiau - 2013-10-13

        Yes, you are right.

        Steven.

         
  • Anonymous

    Anonymous - 2010-01-29

    Thanks much Steven for the explanations.

    A couple of questions, though:

    1. -t1: Does the syslinux MBR that Clonezilla restores include just the Master Boot Code (first 440 bytes), or does it also include the four-byte Disk ID and the Partition Table?

    2. -t: So if I currently have Linux installed, with Grub in the MBR, and then I use Clonezilla to restore a Windows image, I must uncheck "-t" if I want Clonezilla to leave the MBR alone instead of overwriting it with the Windows Master Boot Loader?

     
  • Steven Shiau

    Steven Shiau - 2010-02-01

    As for your questions,
    (1) Only the first 440 bytes I believe.
    (2) Not really. What clonezilla will restore is the MBR from the image, so if  a MBR file exists in your Windows image (normally it does), it will be restored. It's nothing to do with the existing OS on the restored disk.

    Steven.

    Steven.

     

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.