10 Replies Latest reply on Nov 2, 2015 5:27 PM by CMata_Intel

    GPT vs MBR

    jhane

      I've seen an issue with the partitions on the Edison when changing the sizes and was just poking around a little bit.   I notice that when flashing the device, u-boot prints out that is creating a the partition table using GPT.   Out of curiosity I installed the gptfdisk and here is what I see

       

      root@dirty:~# gdisk /dev/mmcblk0

      GPT fdisk (gdisk) version 1.0.0

       

      Caution: invalid backup GPT header, but valid main header; regenerating

      backup header from main header.

       

      Warning! One or more CRCs don't match. You should repair the disk!

       

      Partition table scan:

        MBR: protective

        BSD: not present

        APM: not present

        GPT: damaged

       

      ****************************************************************************

      Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk

      verification and recovery are STRONGLY recommended.

      ****************************************************************************

      ================================================================================

       

      root@dirty:~# gdisk /dev/mmcblk0p9

      GPT fdisk (gdisk) version 1.0.0

       

      Partition table scan:

        MBR: MBR only

        BSD: not present

        APM: not present

        GPT: not present

       

       

      ***************************************************************

      Found invalid GPT and valid MBR; converting MBR to GPT format

      in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by

      typing 'q' if you don't want to convert your MBR partitions

      to GPT format!

      ***************************************************************

       

       

       

        Maybe I just don't understand what is going on here yet; however, I expected that if the partition table was GPT that the gdisk would work.  Instead, the tools seem to indicate that it is not GPT, or at least not valid.

       

      Anyone have any insight into what is going on here?

       

      thanks,

      jeff

        • 1. Re: GPT vs MBR
          CMata_Intel

          Hi jeff,

           

          I will investigate more about this but I would like to know if this is happening always, no matter the size of the partition.

          Also, have you tried to use gptfdisk with the standard image not the custom one?

           

          Regards,

          Charlie

          • 2. Re: GPT vs MBR
            jhane

            results from a fresh from the box edison and then after flashing with ww18-15.  But now there is that disturbing overlap message that I didn't see before.

             

            jeff

             

             

             

            marvel [2254] % cat foo

            root@edison:~# cat /etc/version

            edison-weekly_build_56_2014-08-20_15-54-05

             

            root@bugger:~# gdisk /dev/mmcblk0

            GPT fdisk (gdisk) version 1.0.0

             

            Caution: invalid backup GPT header, but valid main header; regenerating

            backup header from main header.

             

            Warning! One or more CRCs don't match. You should repair the disk!

             

            Partition table scan:

                MBR: protective

                BSD: not present

                APM: not present

                GPT: damaged

             

            ****************************************************************************

            Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk

            verification and recovery are STRONGLY recommended.

            ****************************************************************************

             

            Command (? for help): q

            root@bugger:~# gdisk /dev/mmcblk0p9

            GPT fdisk (gdisk) version 1.0.0

             

            Partition table scan:

                MBR: MBR only

                BSD: not present

                APM: not present

                GPT: not present

             

             

            ***************************************************************

            Found invalid GPT and valid MBR; converting MBR to GPT format

            in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by

            typing 'q' if you don't want to convert your MBR partitions

            to GPT format!

            ***************************************************************

             

            Warning! Main partition table overlaps the first partition by 18 blocks!

            Try reducing the partition table size by 72 entries.

            (Use the 's' item on the experts' menu.)

             

            Warning! Secondary partition table overlaps the last partition by

            33 blocks!

            You will need to delete this partition or resize it in another utility.

             

            ##################################################################################################3

             

            root@bugger:~# cat /etc/version

            weekly-146

            root@bugger:~#

            root@bugger:~# gdisk /dev/mmcblk0

            GPT fdisk (gdisk) version 1.0.0

             

            Caution: invalid backup GPT header, but valid main header; regenerating

            backup header from main header.

             

            Warning! One or more CRCs don't match. You should repair the disk!

             

            Partition table scan:

                MBR: protective

                BSD: not present

                APM: not present

                GPT: damaged

             

            ****************************************************************************

            Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk

            verification and recovery are STRONGLY recommended.

            ****************************************************************************

             

            Command (? for help): q

            root@bugger:~# gdisk /dev/mmcblk0p9

            GPT fdisk (gdisk) version 1.0.0

             

            Partition table scan:

                MBR: MBR only

                BSD: not present

                APM: not present

                GPT: not present

             

             

            ***************************************************************

            Found invalid GPT and valid MBR; converting MBR to GPT format

            in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by

            typing 'q' if you don't want to convert your MBR partitions

            to GPT format!

            ***************************************************************

             

            Warning! Main partition table overlaps the first partition by 18 blocks!

            Try reducing the partition table size by 72 entries.

            (Use the 's' item on the experts' menu.)

             

            Warning! Secondary partition table overlaps the last partition by

            33 blocks!

            You will need to delete this partition or resize it in another utility.

            • 3. Re: GPT vs MBR
              CMata_Intel

              Hi jeff,

               

              I’m still investigating about this. After using parted > print all are you still having "Partition Table: gpt for the /dev/mmcblk0" in the log? The mmcblk0 could have been set as GPT and the other ones can be set differently so that could be the reason of the MBR only/protected GPT damaged in your log

               

              Regards,

              Charlie

              • 4. Re: GPT vs MBR
                jhane

                Hello,

                 

                Running parted > print all didn't change anything but I wouldn't expect it to.  Thanks for looking into this.  Obviously the system is working, I'm just trying to understand if there is some kind of issue or not.

                 

                thanks,

                jeff

                • 5. Re: GPT vs MBR
                  CMata_Intel

                  Hi Jeff,

                   

                  We would like to replicate your environment and do some tests. Did you build gptfdisk source, downloaded the package or did you installed it from a repo?

                   

                  Regards

                  • 6. Re: GPT vs MBR
                    jhane

                    I grabbed a recipe from somewhere and built it in my yocto environment.  I can't access my other system right now so can't tell you exactly what the recipe is.

                     

                    jeff

                    • 7. Re: GPT vs MBR
                      CMata_Intel

                      Hi jeff,

                       

                      Do you remember if you used the openembedded-core layer from OpenEmbedded Metadata Index - layers and this recipe Recipe reporting system - gptfdisk

                      If this was not the recipe you used, could you provide us .bb file?

                       

                      Regards,

                      Charlie

                      • 8. Re: GPT vs MBR
                        jhane

                        Not  sure at this point so here is the recipe:

                         

                        DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks."

                         

                        LICENSE = "GPLv2"

                        LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"

                         

                        DEPENDS = "util-linux popt ncurses"

                         

                        SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz"

                        SRC_URI[md5sum] = "2061f917af084215898d4fea04d8388f"

                        SRC_URI[sha256sum] = "5b66956743a799fc0471cdb032665c1391e82f9c5b3f1d7d726d29fe2ba01d6c"

                         

                        do_install() {

                            install -d ${D}${sbindir}

                            install -m 0755 cgdisk ${D}${sbindir}

                            install -m 0755 gdisk ${D}${sbindir}

                            install -m 0755 sgdisk ${D}${sbindir}

                            install -m 0755 fixparts ${D}${sbindir}

                        }

                         

                        BBCLASSEXTEND = "native nativesdk"

                        • 9. Re: GPT vs MBR
                          CMata_Intel

                          Hi jeff,

                           

                          Thank you, we are still investigating in order to identify why you are getting those messages while using gdisk.

                           

                          Regards,

                          Charlie

                          • 10. Re: GPT vs MBR
                            CMata_Intel

                            Hi Jeff,

                             

                            I’m sorry for the delay in our response. The GTP: damaged message seems to be related with the Edison using MMC as storage device and not a hard drive. Even though, you can ignore these messages as they are just warnings.

                             

                            Regards,

                            Charlie