[syslinux] Install gptmbr with Windows

Ady Ady ady-sf at hotmail.com
Thu Aug 4 08:30:23 PDT 2016


> On 8/3/2016 18:58, Erik Sandberg via Syslinux wrote:
> > Does anyone know how to install the gptmbr.bin onto a USB drive with
> > Windows? I noticed that it would be really easy to modify the source of the
> > installer to install gptmbr.bin instead of mbr.bin with the -m flag, but
> > I'd like a solution that doesn't require me to maintain my own custom
> > syslinux. I'm open to writing and submitting a patch to add a new flag (say
> > -g) to install gptmbr.bin but I'd really like a solution that's more like
> > running `cat gptmbr.bin > /dev/sdb` but on Windows.
 
 
Using the "cat" command to write the MBR to a device is simple, but not 
always the recommended choice.

Generally speaking, use "dd", _with appropriate parameters_. See:

 http://www.syslinux.org/wiki/index.php/Mbr 

At any rate, there are several ports to Windows of the "cat" command.

The official Syslinux distribution archives downloaded from kernel.org 
also include a DOS-based command line utility named "copybs.com", which 
copies the boot sector "from a drive to a file". This tool performs the 
copy in the opposite direction of what is being requested in this email 
thread. Some Windows versions might not be able to correctly execute 
it, and I admit I don't recall whether it writes the first 440 bytes or 
more than that. Perhaps "copybs.asm" might be a starting point so to 
have this "opposite" task included / developed? Or perhaps FreeDOS' 
"sys.com" / "sys.exe"?


> 
> I sometimes use "rawwrite dd for windows version 0.3" by John Newbigin 
> as well as "mirkes.de Tiny Hexer 1.8.1.6 small edition" by Markus 
> Stephany.  Using "dd --list" is educational in the former. Using "File > 
> Disk > Open drive..." is educational in the latter.  - Shao
 
With regards to "dd for Windows" or similar, there are also several 
tools available for Windows, too many to mention.

I wonder what would be the reason for Shao to suggest version 0.3 of 
"dd for windows by John Newbigin", instead of the latest version 
available at this time (0.6beta3).

As usual hex-editing is also possible. Tiny Hexer, mentioned by Shao, 
is only one of many alternatives (e.g. HxD). Some of them are 
especially useful when it comes to (master) boot sectors and filesystem 
structures, but if writing gptmbr.bin is all that is needed, then the 
simpler the tool, the better ("dd for Windows" for this use case, 
IMHO).

In case of choosing "dd for Windows", please note the special option(s) 
available only in the Windows version, so to be able to perform tasks 
on the "parent" device (not on a "drive" letter, which is a partition / 
volume) as required in this case.

Regards,
Ady.




More information about the Syslinux mailing list