grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-mkrescue: Problem with MBR partition table at start of EFI part


From: Thomas Schmitt
Subject: Re: grub-mkrescue: Problem with MBR partition table at start of EFI partition
Date: Wed, 01 May 2019 09:33:46 +0200

Hi,

Vladimir Serbinenko wrote:
> There is an easy way to check if -k can be used always: have a look at
> windows install CD/DVD. If it doesn't have partion table then we can drop it
> as well.

Eek. After that i would have to scrub my eyes with a wire brush.

But this question is already decided by the EFI capable ISOs of Debian,
Ubuntu, Archlinux, Fedora, and openSUSE. None of them has a partition
table entry. I am not aware of failure reports which point to this as
culprit.

Still open is the question whether mformat -k omits more preparations
which may be needed in some situations.

-----------------------------------------------------------------------

Meanwhile i found an example in grub-mkrescue.c about how to patch the
mformat result immediately after it was produced:

  if (source_dirs[GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275]
      ...
      out = grub_util_fopen (sysarea_img, "wb");
      if (!out)
        grub_util_error (_("cannot open `%s': %s"), sysarea_img,
                         strerror (errno));
      memset (buf, 0, 512);
      fwrite (buf, 1, 512, out);
      ...
      fclose (out);

With due adaptions this gesture could well zeroize the 64 byte of
partition table in mformat's (pseudo-)MBR.

-----------------------------------------------------------------------

Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]