Commit Graph

14719 Commits

Author SHA1 Message Date
Paulo Flabiano Smorigo
031efc7e3f Disable VSX instruction
VSX bit is enabled by default for Power7 and Power8 CPU models,
so we need to disable them in order to avoid instruction exceptions.
Kernel will activate it when necessary.

* grub-core/kern/powerpc/ieee1275/startup.S: Disable VSX.

Also-By: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Also-By: Colin Watson <cjwatson@debian.org>

Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00078.html
Last-Update: 2015-01-27

Patch-Name: ppc64el-disable-vsx.patch

Gbp-Pq: Name ppc64el-disable-vsx.patch
2019-06-25 10:11:12 +01:00
Paulo Flabiano Smorigo
a635249df4 Include a text attribute reset in the clear command for ppc
Always clear text attribute for clear command in order to avoid problems
after it boots.

* grub-core/term/terminfo.c: Add escape for text attribute reset

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1295255
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00076.html
Last-Update: 2014-09-26

Patch-Name: ieee1275-clear-reset.patch

Gbp-Pq: Name ieee1275-clear-reset.patch
2019-06-25 10:11:12 +01:00
Colin Watson
1c68d21520 Port yaboot logic for various powerpc machine types
Some powerpc machines require not updating the NVRAM.  This can be handled
by existing grub-install command-line options, but it's friendlier to detect
this automatically.

On chrp_ibm machines, use the nvram utility rather than nvsetenv.  (This
is possibly suitable for other machines too, but that needs to be
verified.)

Forwarded: no
Last-Update: 2014-10-15

Patch-Name: install_powerpc_machtypes.patch

Gbp-Pq: Name install_powerpc_machtypes.patch
2019-06-25 10:11:12 +01:00
Colin Watson
d20baaefa2 Don't run gettext_strings_test
This test is mainly useful as an upstream maintenance check.

Forwarded: not-needed
Last-Update: 2013-12-23

Patch-Name: skip_gettext_strings_test.patch

Gbp-Pq: Name skip_gettext_strings_test.patch
2019-06-25 10:11:12 +01:00
Colin Watson
d29e66b286 Add GRUB_RECOVERY_TITLE option
This allows the controversial "recovery mode" text to be customised.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1240360
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_recovery_title.patch

Gbp-Pq: Name mkconfig_recovery_title.patch
2019-06-25 10:11:12 +01:00
Colin Watson
a3fbea51f0 Ignore functional test failures for now as they are broken
See: https://lists.gnu.org/archive/html/grub-devel/2013-11/msg00242.html

Forwarded: not-needed
Last-Update: 2013-11-19

Patch-Name: ignore_grub_func_test_failures.patch

Gbp-Pq: Name ignore_grub_func_test_failures.patch
2019-06-25 10:11:12 +01:00
Colin Watson
f5c06b7fa6 Probe FusionIO devices
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1237519
Forwarded: no
Last-Update: 2016-09-18

Patch-Name: probe_fusionio.patch

Gbp-Pq: Name probe_fusionio.patch
2019-06-25 10:11:12 +01:00
Colin Watson
7cd73c101e Add configure option to use vt.handoff=7
This is used for non-recovery Linux entries only; it enables
flicker-free booting if gfxpayload=keep is in use and a suitable kernel
is present.

Author: Andy Whitcroft <apw@canonical.com>
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: vt_handoff.patch

Gbp-Pq: Name vt_handoff.patch
2019-06-25 10:11:12 +01:00
Evan Broder
4a84ea5a38 Add configure option to enable gfxpayload=keep dynamically
Set GRUB_GFXPAYLOAD_LINUX=keep unless it's known to be unsupported on
the current hardware.  See
https://blueprints.launchpad.net/ubuntu/+spec/packageselection-foundations-n-grub2-boot-framebuffer.

Author: Colin Watson <cjwatson@ubuntu.com>
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: gfxpayload_dynamic.patch

Gbp-Pq: Name gfxpayload_dynamic.patch
2019-06-25 10:11:12 +01:00
Colin Watson
dbaa08354b Add configure option to bypass boot menu if possible
If other operating systems are installed, then automatically unhide the
menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus if
available to check whether Shift is pressed.  If it is, show the menu,
otherwise boot immediately.  If keystatus is not available, then fall
back to a short delay interruptible with Escape.

This may or may not remain Ubuntu-specific, although it's not obviously
wanted upstream.  It implements a requirement of
https://wiki.ubuntu.com/DesktopExperienceTeam/KarmicBootExperienceDesignSpec#Bootloader.

If the previous boot failed (defined as failing to get to the end of one
of the normal runlevels), then show the boot menu regardless.

Author: Richard Laager <rlaager@wiktel.com>
Author: Robie Basak <robie.basak@ubuntu.com>
Forwarded: no
Last-Update: 2015-09-04

Patch-Name: quick_boot.patch

Gbp-Pq: Name quick_boot.patch
2019-06-25 10:11:12 +01:00
Colin Watson
8a9b6084c9 Cope with Kubuntu setting GRUB_DISTRIBUTOR
This is not a very good approach, and certainly not sanely upstreamable;
we probably need to split GRUB_DISTRIBUTOR into a couple of different
variables.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1242417
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_efi_ubuntu_flavours.patch

Gbp-Pq: Name install_efi_ubuntu_flavours.patch
2019-06-25 10:11:12 +01:00
Colin Watson
dc827a7454 Add configure option to reduce visual clutter at boot time
If this option is enabled, then do all of the following:

Don't display introductory message about line editing unless we're
actually offering a shell prompt.  (This is believed to be a workaround
for a different bug.  We'll go with this for now, but will drop this in
favour of a better fix upstream if somebody figures out what that is.)

Don't clear the screen just before booting if we never drew the menu in
the first place.

Remove verbose messages printed before reading configuration.  In some
ways this is awkward because it makes debugging harder, but it's a
requirement for a smooth-looking boot process; we may be able to do
better in future.  Upstream doesn't want this, though.

Disable the cursor as well, for similar reasons of tidiness.

Suppress kernel/initrd progress messages, except in recovery mode.

Suppress "GRUB loading" message unless Shift is held down.  Upstream
doesn't want this, as it makes debugging harder.  Ubuntu wants it to
provide a cleaner boot experience.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/386922
Bug-Ubuntu: https://bugs.launchpad.net/bugs/861048
Forwarded: (partial) http://lists.gnu.org/archive/html/grub-devel/2009-09/msg00056.html
Last-Update: 2014-01-03

Patch-Name: maybe_quiet.patch

Gbp-Pq: Name maybe_quiet.patch
2019-06-25 10:11:12 +01:00
Colin Watson
6348ae09be Skip Windows os-prober entries on Wubi systems
Since we're already being booted from the Windows boot loader, including
entries that take us back to it mostly just causes confusion, and stops
us from being able to hide the menu if there are no other OSes
installed.

https://blueprints.launchpad.net/ubuntu/+spec/foundations-o-wubi

Forwarded: not-needed
Last-Update: 2013-11-26

Patch-Name: wubi_no_windows.patch

Gbp-Pq: Name wubi_no_windows.patch
2019-06-25 10:11:12 +01:00
Colin Watson
348b522873 Allow Shift to interrupt 'sleep --interruptible'
Upstream would like to consider this at more length. See
http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00718.html, and
the rest of the thread for context.

Forwarded: http://lists.gnu.org/archive/html/grub-devel/2009-08/msg00694.html
Last-Update: 2013-12-04

Patch-Name: sleep_shift.patch

Gbp-Pq: Name sleep_shift.patch
2019-06-25 10:11:12 +01:00
Colin Watson
20048faffb Install signed images if UEFI Secure Boot is enabled
Author: Stéphane Graber <stgraber@ubuntu.com>
Author: Steve Langasek <steve.langasek@ubuntu.com>
Author: Linn Crosetto <linn@hpe.com>
Author: Mathieu Trudel-Lapierre <cyphermox@ubuntu.com>
Forwarded: no
Last-Update: 2016-11-01

Patch-Name: install_signed.patch

Gbp-Pq: Name install_signed.patch
2019-06-25 10:11:12 +01:00
Colin Watson
bfbd46a853 Generate configuration for signed UEFI kernels if available
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_signed_kernel.patch

Gbp-Pq: Name mkconfig_signed_kernel.patch
2019-06-25 10:11:12 +01:00
Colin Watson
6ab15acd65 If running under UEFI secure boot, attempt to use linuxefi loader
Author: Steve Langasek <steve.langasek@canonical.com>
Forwarded: no
Last-Update: 2013-12-20

Patch-Name: linuxefi_non_sb_fallback.patch

Gbp-Pq: Name linuxefi_non_sb_fallback.patch
2019-06-25 10:11:12 +01:00
Colin Watson
d47ac2a895 Make linuxefi refuse to boot without shim
This is only intended as a temporary measure.

Forwarded: not-needed
Last-Update: 2013-01-29

Patch-Name: linuxefi_require_shim.patch

Gbp-Pq: Name linuxefi_require_shim.patch
2019-06-25 10:11:12 +01:00
Colin Watson
59a0d5b3a7 Add more debugging to linuxefi
Forwarded: no
Last-Update: 2016-09-19

Patch-Name: linuxefi_debug.patch

Gbp-Pq: Name linuxefi_debug.patch
2019-06-25 10:11:12 +01:00
Matthew Garrett
13e560e999 Add "linuxefi" loader which avoids ExitBootServices
Origin: vendor, http://pkgs.fedoraproject.org/cgit/grub2.git/tree/grub2-linuxefi.patch
Forwarded: no
Last-Update: 2016-09-19

Patch-Name: linuxefi.patch

Gbp-Pq: Name linuxefi.patch
2019-06-25 10:11:12 +01:00
Mario Limonciello
57d86f15a7 Remove GNU/Linux from default distributor string for Ubuntu
Ubuntu is called "Ubuntu", not "Ubuntu GNU/Linux".

Author: Colin Watson <cjwatson@debian.org>
Author: Harald Sitter <apachelogger@kubuntu.org>
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: mkconfig_ubuntu_distributor.patch

Gbp-Pq: Name mkconfig_ubuntu_distributor.patch
2019-06-25 10:11:12 +01:00
Steve Langasek
7c70c1d3b7 Output a menu entry for firmware setup on UEFI FastBoot systems
Forwarded: no
Last-Update: 2015-09-04

Patch-Name: uefi_firmware_setup.patch

Gbp-Pq: Name uefi_firmware_setup.patch
2019-06-25 10:11:12 +01:00
Colin Watson
41d7e5e804 Blacklist 1440x900x32 from VBE preferred mode handling
Bug-Ubuntu: https://bugs.launchpad.net/bugs/701111
Forwarded: no
Last-Update: 2013-11-14

Patch-Name: blacklist_1440x900x32.patch

Gbp-Pq: Name blacklist_1440x900x32.patch
2019-06-25 10:11:12 +01:00
Colin Watson
bcffb75001 Read /etc/default/grub.d/*.cfg after /etc/default/grub
Bug-Ubuntu: https://bugs.launchpad.net/bugs/901600
Forwarded: no
Last-Update: 2014-01-28

Patch-Name: default_grub_d.patch

Gbp-Pq: Name default_grub_d.patch
2019-06-25 10:11:12 +01:00
Matthew Garrett
65a3057731 Don't permit loading modules on UEFI secure boot
Author: Colin Watson <cjwatson@ubuntu.com>
Origin: vendor, http://pkgs.fedoraproject.org/cgit/grub2.git/tree/grub-2.00-no-insmod-on-sb.patch
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: no_insmod_on_sb.patch

Gbp-Pq: Name no_insmod_on_sb.patch
2019-06-25 10:11:12 +01:00
Colin Watson
05408bc424 Avoid getting confused by inaccessible loop device backing paths
Bug-Ubuntu: https://bugs.launchpad.net/bugs/938724
Forwarded: no
Last-Update: 2013-12-20

Patch-Name: mkconfig_nonexistent_loopback.patch

Gbp-Pq: Name mkconfig_nonexistent_loopback.patch
2019-06-25 10:11:12 +01:00
Colin Watson
3fdff00237 Prefer translations from Ubuntu language packs if available
Bug-Ubuntu: https://bugs.launchpad.net/bugs/537998
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_locale_langpack.patch

Gbp-Pq: Name install_locale_langpack.patch
2019-06-25 10:11:12 +01:00
Colin Watson
007f48a84f "single" -> "recovery" when friendly-recovery is installed
If configured with --enable-ubuntu-recovery, also set nomodeset for
recovery mode, and disable 'set gfxpayload=keep' even if the system
normally supports it.  See
https://launchpad.net/ubuntu/+spec/desktop-o-xorg-tools-and-processes.

Author: Stéphane Graber <stgraber@ubuntu.com>
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_ubuntu_recovery.patch

Gbp-Pq: Name mkconfig_ubuntu_recovery.patch
2019-06-25 10:11:12 +01:00
Colin Watson
cbdcf2ddb4 Fall back to i386-pc if booted using EFI but -efi is missing
It may be possible, particularly in recovery situations, to be booted
using EFI on x86 when only the i386-pc target is installed.  There's
nothing actually stopping us installing i386-pc from an EFI environment,
and it's better than returning a confusing error.

Forwarded: no
Last-Update: 2013-12-20

Patch-Name: install_efi_fallback.patch

Gbp-Pq: Name install_efi_fallback.patch
2019-06-25 10:11:12 +01:00
Colin Watson
adab437497 Bail out if trying to run grub-mkconfig during upgrade to 2.00
Since files in /etc/grub.d/ are conffiles, they are not put in place
until grub-common is configured, meaning that they may be out of sync
with the parts of grub-mkconfig that reside in /usr/.  In GRUB 1.99,
/etc/grub.d/00_header contained a reference to ${GRUB_PREFIX}/video.lst.
This and other code from 1.99 breaks with 2.00's grub-mkconfig.
Deferring this to when grub-PLATFORM.postinst eventually runs is safe
and avoids this problem.

Forwarded: no
Last-Update: 2013-12-25

Patch-Name: mkconfig_mid_upgrade.patch

Gbp-Pq: Name mkconfig_mid_upgrade.patch
2019-06-25 10:11:12 +01:00
Colin Watson
a3b59940f9 Silence error messages when translations are unavailable
Bug: https://savannah.gnu.org/bugs/?35880
Forwarded: https://savannah.gnu.org/bugs/?35880
Last-Update: 2013-11-14

Patch-Name: gettext_quiet.patch

Gbp-Pq: Name gettext_quiet.patch
2019-06-25 10:11:12 +01:00
Colin Watson
06ea8f3215 Restore grub-mkdevicemap
This is kind of a mess, requiring lots of OS-specific code to iterate
over all possible devices.  However, we use it in a number of scripts to
discover devices and reimplementing those in terms of something else
would be very complicated.

Author: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Forwarded: no
Last-Update: 2018-03-16

Patch-Name: restore_mkdevicemap.patch

Gbp-Pq: Name restore_mkdevicemap.patch
2019-06-25 10:11:12 +01:00
Colin Watson
46ed381bb4 Handle filesystems loop-mounted on file images
Improve prepare_grub_to_access_device to emit appropriate commands for
such filesystems, and ignore them in Linux grub.d scripts.

This is needed for Ubuntu's Wubi installation method.

This patch isn't inherently Debian/Ubuntu-specific.  losetup and
/proc/mounts are Linux-specific, though, so we might need to refine this
before sending it upstream.  The changes to the Linux grub.d scripts
might be better handled by integrating 10_lupin properly instead.

Patch-Name: mkconfig_loopback.patch

Gbp-Pq: Name mkconfig_loopback.patch
2019-06-25 10:11:12 +01:00
Mario Limonciello
c184c47db0 Build vfat into EFI boot images
Author: Colin Watson <cjwatson@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/677758
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2011-01/msg00028.html
Last-Update: 2016-09-18

Patch-Name: mkrescue_efi_modules.patch

Gbp-Pq: Name mkrescue_efi_modules.patch
2019-06-25 10:11:12 +01:00
Colin Watson
5c4797f691 If GRUB Legacy is still around, tell packaging to ignore it
Bug-Debian: http://bugs.debian.org/586143
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: install_stage2_confusion.patch

Gbp-Pq: Name install_stage2_confusion.patch
2019-06-25 10:11:12 +01:00
Colin Watson
eb149f4b4e Disable gfxpayload=keep by default
Setting gfxpayload=keep has been known to cause efifb to be
inappropriately enabled.  In any case, with the current Linux kernel the
result of this option is that early kernelspace will be unable to print
anything to the console, so (for example) if boot fails and you end up
dumped to an initramfs prompt, you won't be able to see anything on the
screen.  As such it shouldn't be enabled by default in Debian, no matter
what kernel options are enabled.

gfxpayload=keep is a good idea but rather ahead of its time ...

Bug-Debian: http://bugs.debian.org/567245
Forwarded: no
Last-Update: 2013-12-25

Patch-Name: gfxpayload_keep_default.patch

Gbp-Pq: Name gfxpayload_keep_default.patch
2019-06-25 10:11:12 +01:00
Colin Watson
9a2aa77dcb Make grub.cfg world-readable if it contains no passwords
Patch-Name: grub.cfg_400.patch

Gbp-Pq: Name grub.cfg_400.patch
2019-06-25 10:11:12 +01:00
Colin Watson
9f03a5d556 Disable use of floppy devices
An ugly kludge.  Should this be merged upstream?

Author: Robert Millan

Patch-Name: disable_floppies.patch

Gbp-Pq: Name disable_floppies.patch
2019-06-25 10:11:12 +01:00
Robert Millan
b803afff93 Support running grub-probe in grub-legacy's update-grub
Author: Colin Watson <cjwatson@debian.org>
Forwarded: not-needed
Last-Update: 2013-12-25

Patch-Name: grub_legacy_0_based_partitions.patch

Gbp-Pq: Name grub_legacy_0_based_partitions.patch
2019-06-25 10:11:12 +01:00
Robert Millan
097982104c Improve handling of Debian kernel version numbers
Forwarded: not-needed
Last-Update: 2013-12-20

Patch-Name: dpkg_version_comparison.patch

Gbp-Pq: Name dpkg_version_comparison.patch
2019-06-25 10:11:12 +01:00
Colin Watson
159dd264b4 Write marker if core.img was written to filesystem
The Debian bug reporting script includes a warning in this case.

Patch-Name: core_in_fs.patch

Gbp-Pq: Name core_in_fs.patch
2019-06-25 10:11:12 +01:00
Colin Watson
80a306012f Hack prefix for OLPC
This sucks, but it's better than what OFW was giving us.

Patch-Name: olpc_prefix_hack.patch

Gbp-Pq: Name olpc_prefix_hack.patch
2019-06-25 10:11:12 +01:00
Colin Watson
e294123661 Import replacement CRC operations from libgcrypt
Mostly backported from
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=06e122baa3321483a47bbf82fd2a4540becfa0c9,
but importing bufhelp.h from libgcrypt 1.7.0 as well.  We can drop this
once GRUB updates to a newer import of libgcrypt.

The new implementation is not encumbered by the restrictive Internet
Society licence on RFCs.

Bug-Debian: https://bugs.debian.org/745409
Last-Update: 2018-02-16

Patch-Name: replace-libgcrypt-crc.patch

Gbp-Pq: Name replace-libgcrypt-crc.patch
2019-06-25 10:11:12 +01:00
Steve McIntyre
a26be82be3 grub2 (2.02+dfsg1-20) unstable; urgency=medium
[ Steve McIntyre ]
  * Make all the signed EFI arches have a Recommends: from
    grub-efi-ARCH-signed to shim-signed, not just amd64.
    Closes: #931038
  * Add myself to Uploaders

[dgit import unpatched grub2 2.02+dfsg1-20]
2019-06-25 10:11:12 +01:00
Steve McIntyre
c4c543fcc2 Import grub2_2.02+dfsg1-20.debian.tar.xz
[dgit import tarball grub2 2.02+dfsg1-20 grub2_2.02+dfsg1-20.debian.tar.xz]
2019-06-25 10:11:12 +01:00
Steve McIntyre
93796d40c7 Add Steve to uploaders list 2019-06-25 10:10:00 +01:00
Steve McIntyre
bcbfaaf101 Merge branch 'add-shim-signed-recommends' into 'master'
Make all the signed EFI arches have a Recommends: shim-signed

See merge request grub-team/grub!11
2019-06-25 09:07:51 +00:00
Steve McIntyre
00e557deed Make all the signed EFI arches have a Recommends: shim-signed
Not just amd64. Closes: #931038
2019-06-25 09:07:51 +00:00
Thomas Schmitt
f9811a92e6 docs: Document workaround for grub-mkrescue with older MacBooks
Add a description of the workaround for firmware of older MacBooks
which stalls with a grub-mkrescue ISO image for x86_64-efi target
on an USB stick.

Signed-off-by: Thomas Schmitt <scdbackup@gmx.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-06-24 12:11:25 +02:00
Eric Snowberg
ff999c803e docs: Bootstrap changes required for older distros
Some older distros do not contain gettext 0.18. Document the workaround
to use the bootstrap utility on these systems.

Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-06-24 12:02:20 +02:00