Backup boot record of GPT disk











up vote
0
down vote

favorite












I know how to use dd to backup the boot record of a MBR partitioned disk, but how do I backup the boot record of a GPT partitioned disk?



(I use sgdisk to backup the partition table, but also need the boot record)



I'm looking for the GPT equivalent of (MBR backup):



dd if=/dev/sda of=/dev/sdb bs=512 count=1









share|improve this question


























    up vote
    0
    down vote

    favorite












    I know how to use dd to backup the boot record of a MBR partitioned disk, but how do I backup the boot record of a GPT partitioned disk?



    (I use sgdisk to backup the partition table, but also need the boot record)



    I'm looking for the GPT equivalent of (MBR backup):



    dd if=/dev/sda of=/dev/sdb bs=512 count=1









    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I know how to use dd to backup the boot record of a MBR partitioned disk, but how do I backup the boot record of a GPT partitioned disk?



      (I use sgdisk to backup the partition table, but also need the boot record)



      I'm looking for the GPT equivalent of (MBR backup):



      dd if=/dev/sda of=/dev/sdb bs=512 count=1









      share|improve this question













      I know how to use dd to backup the boot record of a MBR partitioned disk, but how do I backup the boot record of a GPT partitioned disk?



      (I use sgdisk to backup the partition table, but also need the boot record)



      I'm looking for the GPT equivalent of (MBR backup):



      dd if=/dev/sda of=/dev/sdb bs=512 count=1






      backup dd gpt mbr






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 1 at 15:17









      TSG

      3742720




      3742720






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          If you used the --backup option to the sgdisk program to create the backup, it already contains all there is to back up: the "protective MBR", the GPT header, and the partition table. There is no boot record in addition to these on GPT partitioned disks.






          share|improve this answer





















          • Could you expand on that? In particular, MBR contains a "boot sector" to bootstrap the PC. Doesn't a GPT partitioned disk also need a "boot sector" to bootstrap the PC? If not how is that handled?
            – TSG
            Jan 1 at 19:56










          • On a UEFI system, the machine starts by executing code in the firmware (i.e. in ROM on the motherboard). This code is smart enough to look for the ESP (EFI System Partition), and it also knows how to read and execute files from the ESP, directed by variables stored in non-volatile memory. Thus there is no "boot sector", it's all in normal files on the disk. In the rare combination GPT disk + legacy BIOS boot, the boot code is read in the old-fasioned way from the MBR.
            – Johan Myréen
            Jan 1 at 20:04










          • So a non-UEFI bios would need a protective MBR on the GPT disk in order to book that disk? (In which case the above 'dd' method of copying the MBR is required)?
            – TSG
            Jan 1 at 20:33










          • If you use gdisk's backup command, it includes the MBR in the backup. Also note that using legacy BIOS (CSM) mode together with GPT is not something that is usually done, and can be risky.
            – Johan Myréen
            Jan 1 at 20:43











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414138%2fbackup-boot-record-of-gpt-disk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          If you used the --backup option to the sgdisk program to create the backup, it already contains all there is to back up: the "protective MBR", the GPT header, and the partition table. There is no boot record in addition to these on GPT partitioned disks.






          share|improve this answer





















          • Could you expand on that? In particular, MBR contains a "boot sector" to bootstrap the PC. Doesn't a GPT partitioned disk also need a "boot sector" to bootstrap the PC? If not how is that handled?
            – TSG
            Jan 1 at 19:56










          • On a UEFI system, the machine starts by executing code in the firmware (i.e. in ROM on the motherboard). This code is smart enough to look for the ESP (EFI System Partition), and it also knows how to read and execute files from the ESP, directed by variables stored in non-volatile memory. Thus there is no "boot sector", it's all in normal files on the disk. In the rare combination GPT disk + legacy BIOS boot, the boot code is read in the old-fasioned way from the MBR.
            – Johan Myréen
            Jan 1 at 20:04










          • So a non-UEFI bios would need a protective MBR on the GPT disk in order to book that disk? (In which case the above 'dd' method of copying the MBR is required)?
            – TSG
            Jan 1 at 20:33










          • If you use gdisk's backup command, it includes the MBR in the backup. Also note that using legacy BIOS (CSM) mode together with GPT is not something that is usually done, and can be risky.
            – Johan Myréen
            Jan 1 at 20:43















          up vote
          2
          down vote













          If you used the --backup option to the sgdisk program to create the backup, it already contains all there is to back up: the "protective MBR", the GPT header, and the partition table. There is no boot record in addition to these on GPT partitioned disks.






          share|improve this answer





















          • Could you expand on that? In particular, MBR contains a "boot sector" to bootstrap the PC. Doesn't a GPT partitioned disk also need a "boot sector" to bootstrap the PC? If not how is that handled?
            – TSG
            Jan 1 at 19:56










          • On a UEFI system, the machine starts by executing code in the firmware (i.e. in ROM on the motherboard). This code is smart enough to look for the ESP (EFI System Partition), and it also knows how to read and execute files from the ESP, directed by variables stored in non-volatile memory. Thus there is no "boot sector", it's all in normal files on the disk. In the rare combination GPT disk + legacy BIOS boot, the boot code is read in the old-fasioned way from the MBR.
            – Johan Myréen
            Jan 1 at 20:04










          • So a non-UEFI bios would need a protective MBR on the GPT disk in order to book that disk? (In which case the above 'dd' method of copying the MBR is required)?
            – TSG
            Jan 1 at 20:33










          • If you use gdisk's backup command, it includes the MBR in the backup. Also note that using legacy BIOS (CSM) mode together with GPT is not something that is usually done, and can be risky.
            – Johan Myréen
            Jan 1 at 20:43













          up vote
          2
          down vote










          up vote
          2
          down vote









          If you used the --backup option to the sgdisk program to create the backup, it already contains all there is to back up: the "protective MBR", the GPT header, and the partition table. There is no boot record in addition to these on GPT partitioned disks.






          share|improve this answer












          If you used the --backup option to the sgdisk program to create the backup, it already contains all there is to back up: the "protective MBR", the GPT header, and the partition table. There is no boot record in addition to these on GPT partitioned disks.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 1 at 16:11









          Johan Myréen

          7,20611423




          7,20611423












          • Could you expand on that? In particular, MBR contains a "boot sector" to bootstrap the PC. Doesn't a GPT partitioned disk also need a "boot sector" to bootstrap the PC? If not how is that handled?
            – TSG
            Jan 1 at 19:56










          • On a UEFI system, the machine starts by executing code in the firmware (i.e. in ROM on the motherboard). This code is smart enough to look for the ESP (EFI System Partition), and it also knows how to read and execute files from the ESP, directed by variables stored in non-volatile memory. Thus there is no "boot sector", it's all in normal files on the disk. In the rare combination GPT disk + legacy BIOS boot, the boot code is read in the old-fasioned way from the MBR.
            – Johan Myréen
            Jan 1 at 20:04










          • So a non-UEFI bios would need a protective MBR on the GPT disk in order to book that disk? (In which case the above 'dd' method of copying the MBR is required)?
            – TSG
            Jan 1 at 20:33










          • If you use gdisk's backup command, it includes the MBR in the backup. Also note that using legacy BIOS (CSM) mode together with GPT is not something that is usually done, and can be risky.
            – Johan Myréen
            Jan 1 at 20:43


















          • Could you expand on that? In particular, MBR contains a "boot sector" to bootstrap the PC. Doesn't a GPT partitioned disk also need a "boot sector" to bootstrap the PC? If not how is that handled?
            – TSG
            Jan 1 at 19:56










          • On a UEFI system, the machine starts by executing code in the firmware (i.e. in ROM on the motherboard). This code is smart enough to look for the ESP (EFI System Partition), and it also knows how to read and execute files from the ESP, directed by variables stored in non-volatile memory. Thus there is no "boot sector", it's all in normal files on the disk. In the rare combination GPT disk + legacy BIOS boot, the boot code is read in the old-fasioned way from the MBR.
            – Johan Myréen
            Jan 1 at 20:04










          • So a non-UEFI bios would need a protective MBR on the GPT disk in order to book that disk? (In which case the above 'dd' method of copying the MBR is required)?
            – TSG
            Jan 1 at 20:33










          • If you use gdisk's backup command, it includes the MBR in the backup. Also note that using legacy BIOS (CSM) mode together with GPT is not something that is usually done, and can be risky.
            – Johan Myréen
            Jan 1 at 20:43
















          Could you expand on that? In particular, MBR contains a "boot sector" to bootstrap the PC. Doesn't a GPT partitioned disk also need a "boot sector" to bootstrap the PC? If not how is that handled?
          – TSG
          Jan 1 at 19:56




          Could you expand on that? In particular, MBR contains a "boot sector" to bootstrap the PC. Doesn't a GPT partitioned disk also need a "boot sector" to bootstrap the PC? If not how is that handled?
          – TSG
          Jan 1 at 19:56












          On a UEFI system, the machine starts by executing code in the firmware (i.e. in ROM on the motherboard). This code is smart enough to look for the ESP (EFI System Partition), and it also knows how to read and execute files from the ESP, directed by variables stored in non-volatile memory. Thus there is no "boot sector", it's all in normal files on the disk. In the rare combination GPT disk + legacy BIOS boot, the boot code is read in the old-fasioned way from the MBR.
          – Johan Myréen
          Jan 1 at 20:04




          On a UEFI system, the machine starts by executing code in the firmware (i.e. in ROM on the motherboard). This code is smart enough to look for the ESP (EFI System Partition), and it also knows how to read and execute files from the ESP, directed by variables stored in non-volatile memory. Thus there is no "boot sector", it's all in normal files on the disk. In the rare combination GPT disk + legacy BIOS boot, the boot code is read in the old-fasioned way from the MBR.
          – Johan Myréen
          Jan 1 at 20:04












          So a non-UEFI bios would need a protective MBR on the GPT disk in order to book that disk? (In which case the above 'dd' method of copying the MBR is required)?
          – TSG
          Jan 1 at 20:33




          So a non-UEFI bios would need a protective MBR on the GPT disk in order to book that disk? (In which case the above 'dd' method of copying the MBR is required)?
          – TSG
          Jan 1 at 20:33












          If you use gdisk's backup command, it includes the MBR in the backup. Also note that using legacy BIOS (CSM) mode together with GPT is not something that is usually done, and can be risky.
          – Johan Myréen
          Jan 1 at 20:43




          If you use gdisk's backup command, it includes the MBR in the backup. Also note that using legacy BIOS (CSM) mode together with GPT is not something that is usually done, and can be risky.
          – Johan Myréen
          Jan 1 at 20:43


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414138%2fbackup-boot-record-of-gpt-disk%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Morgemoulin

          Scott Moir

          Souastre