debian/patches/bufio_sensible_block_sizes.patch: Don't use arbitrary file
fizes as block sizes in bufio: this avoids potentially seeking back in
the files unnecessarily, which may require re-open files that cannot be
seeked into, such as via TFTP. (LP: #1743249)
Don't use arbitrary file sizes as block sizes in bufio
When grub_bufio_open() is called with a buffer size greater than the size
of the file being buffered, it clamps the buffer size to the file size.
This seems sensible on the surface to avoid over-allocating memory, but
grub_bufio_read() also assumes that ~(block_size-1) gives a sensible
mask value... which is only true for power of 2 block sizes, not for
random file sizes.
If the file we're buffering is on tftp, we get particularly pathological
results because we wind up seeking backwards which requires re-requesting
the file from the tftp server - even though the whole file fit in a single
udp packet much smaller than the default buffer size.
Keep the native terminal active when enabling gfxterm
grub-mkconfig will set GRUB_TERMINAL_OUTPUT to "gfxterm" unless the user
has overridden it. On EFI systems, this will stop output from going to the
default "console" terminal. When the EFI fw console is configured to output to
both serial and video, this will cause GRUB to only display on video - while
continuing to accept input from both video and serial.
Instead of switching from "console" to "gfxterm", let's output to both.
Modify the existing vt_handoff.patch to set vt.handoff=1 instead of vt.handoff=7. This fixes some problems with netboot installed server systems + adds consistency as we're no longer running display servers on vt7.
[ dannf: re-applied for git-dpm by:
git-dpm checkout-patched
squashing the changes into the original vt handoff commit
git-dpm update-patches ]
tsc: Change default tsc calibration method to pmtimer on EFI systems
On efi systems, make pmtimer based tsc calibration the default over the
pit. This prevents Grub from hanging on Intel SoC systems that power gate
the pit.
Signed-off-by: David E. Box <email address hidden>
Reviewed-by: Daniel Kiper <email address hidden>
There are a few cases where we legitimately cast to memory that is bigger
than we need when building on one arch, because on a different arch it will
be just right. For example, grub_status_t can be int32 or int64, depending
on the size of void*.
Added GRUB_FORCE_PARTUUID and GRUB_DISABLE_INITRD configuration knobs to allow
users to generate grub menu entries that boot directly to the kernel, without
using an initramfs.