#9 Support syslinux's gptmbr.bin

closed
nobody
None
5
2014-05-24
2014-04-29
No

I'd like to see a version of ms-sys which supports writing and detecting syslinux's gptmbr.bin. ms-sys could then be used to write syslinux's gpt boot code to the protective MBR of a GPT disk. This is needed to boot from a GPT disc on a non-UEFI system.

Discussion

  • Henrik Carlqvist

    As the file gptmbr.bin could be seen as a simple documentation of itself implementing such a feature seems rather easy.

    However, it does seem as if different versions of syslinux have different versions of gptmbr.bin with very different contents. With syslinux 3.84 which I have installed on my Slackware 13.1 system gptmbr.bin is 424 bytes big. With the currently latest version 6.02 gptmbr.bin is 440 bytes big.

    We would have to choose a version of gptmbr.bin for ms-sys to support, and then ms-sys would only be able to detect that version.

    As such, the detection feature of ms-sys would be of rather limited use. The writing feature might be more useful to get a booting system, but on the other hand syslinux is already providing an opensource tool with this functionality.

     
  • Sven Köhler

    Sven Köhler - 2014-04-30

    By "detection" I was referring to the message that ms-sys shows, something like "this disk contains an x86 boot sector like ms-sys would install with option -x". It would be great if ms-sys would detect all kind of things (like if GRUB would be installed in the MBR, and whether it's GRUB legacy or GRUB 2), but that shall not be the point of this feature request. So it's fine if ms-sys detects only the boot sectors that it installs.

    I would go with the latest version of gptmbr.bin. What gptmbr.bin does is that it finds and loads the boot sector of a GPT partition that is marked as BIOS-bootable. The interface between the MBR and the partition boot sector seems to be quite well defined and I assume that all version of gptmbr.bin implement it. (Even though newer versions might have less bugs.)

    See http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/doc/gpt.txt?id=HEAD

    We can compare early and current versions of gptmbr.S to see what has changed. I can also ask the authors about what has changed.

     
    Last edit: Sven Köhler 2014-04-30
  • Henrik Carlqvist

    • status: open --> accepted
     
  • Henrik Carlqvist

    Ok, I hope to be able to make a first implementation of this within a few days. After that I will send you updated ms-sys code to test. If you think that the new functionality works fine I will make a new release.

     
  • Henrik Carlqvist

    I have now checked in a first attempt of syslinux GPT MBR functionality. Would you be able to test it by checking out the code with:

    cvs -d:pserver:anonymous@ms-sys.cvs.sourceforge.net:/cvsroot/ms-sys login

    cvs -z3 -d:pserver:anonymous@ms-sys.cvs.sourceforge.net:/cvsroot/ms-sys co -P ms-sys

    regards Henrik

     
  • Sven Köhler

    Sven Köhler - 2014-05-02

    I tested it. The system boots fine after using it. I also reviewed the code. It looks fine to me.

     
    • Henrik Carlqvist

      I hope to release a new version after our mail discussion has come to a conclusion about what to do with 0x55 0xaa at the end of the MBR.

      regards Henrik

       
  • Henrik Carlqvist

    Syslinux GPT MBR is now included in stable version 2.4.0 of ms-sys.

     
  • Henrik Carlqvist

    • status: accepted --> closed
     
  • Henrik Carlqvist

    closing ticket

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks