[syslinux] [PATCH] Proposal for a pacifier option with mkdiskimage

Thomas Schmitt scdbackup at gmx.net
Wed Jan 29 01:44:44 PST 2014


Hi,

hpa wrote:
> > it doesn't make much sense to zero the whole hardware device like that.

Mattias Schlenker wrote:
> Probably not. But a left over backup GPT at the end of a "disk" (hard disk,
> thumb drive, SSD, eMMC) now confuses some UEFI implementations that look for
> GPT first (or only) on boot media.

mkdiskimage does not reliably address this issue. It zeroises only
the partition, which may end nearly 8 MB before the device end.

By the same cause, image files do not get inflated to the full
size but only up to the partition end:

  $ mkdiskimage_orig.in -M image.img 100 255 63
  $ image.img
  -rw-r--r-- 1 xyz xyz  98703360 2014-01-29 10:31 image.img
  
This happens too with my proposed bug fix for option -s.
(truncate(OUTPUT, $totalsize * 512);)


@hpa:
Is this a bug or a feature ?


Have a nice day :)

Thomas



More information about the Syslinux mailing list