Steve McIntyre [Wed, 3 Dec 2014 01:25:12 +0000 (01:25 +0000)]
Add support for forcing EFI installation to the removable media path
Add an extra option to grub-install "--force-extra-removable". On EFI
platforms, this will cause an extra copy of the grub-efi image to be
written to the appropriate removable media patch
/boot/efi/EFI/BOOT/BOOT$ARCH.EFI as well. This will help with broken
UEFI implementations where the firmware does not work when configured
with new boot paths.
Signed-off-by: Steve McIntyre <93sam@debian.org>
Bug-Debian: https://bugs.debian.org/767037 https://bugs.debian.org/773092
Forwarded: Not yet
Last-Update: 2014-12-20
Ian Campbell [Sun, 14 Dec 2014 09:04:38 +0000 (09:04 +0000)]
Updated translations from second CFT after -18
Updates those which were updated in response to the first CFT in a7e952a41630
with the updates in the second CFT corresponding to English updates in e02e48232bac.
Steve McIntyre [Sun, 7 Dec 2014 16:07:13 +0000 (16:07 +0000)]
Add support for forcing EFI installation to the removable media path
Add an extra option to grub-install "--force-extra-removable". On EFI
platforms, this will cause an extra copy of the grub-efi image to be
written to the appropriate removable media patch
/boot/efi/EFI/BOOT/BOOT$ARCH.EFI as well. This will help with broken
UEFI implementations where the firmware does not work when configured
with new boot paths.
Also added new debconf logic to add this extra option to grub-install
calls when grub2/force_efi_extra_removable is set true. This allows
other programs like d-i / grub-installer to configure this for general
use.
Steve McIntyre [Wed, 3 Dec 2014 01:25:12 +0000 (01:25 +0000)]
Add support for forcing EFI installation to the removable media path
Add an extra option to grub-install "--force-extra-removable". On EFI
platforms, this will cause an extra copy of the grub-efi image to be
written to the appropriate removable media patch
/boot/efi/EFI/BOOT/BOOT$ARCH.EFI as well. This will help with broken
UEFI implementations where the firmware does not work when configured
with new boot paths.
Signed-off-by: Steve McIntyre <93sam@debian.org>
Bug-Debian: https://bugs.debian.org/767037
Forwarded: Not yet
Last-Update: 2014-12-03
Ian Campbell [Sun, 30 Nov 2014 12:12:52 +0000 (12:12 +0000)]
Arrange to insmod xzio and lzopio when booting a kernel as a Xen guest
This is needed in case the Linux kernel is compiled with CONFIG_KERNEL_XZ or
CONFIG_KERNEL_LZO rather than CONFIG_KERNEL_GZ (gzio is already loaded by
grub.cfg today).
Signed-off-by: Ian Campbell <ijc@debian.org>
Bug-Debian: https://bugs.debian.org/755256
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2014-11/msg00091.html
Last-Update: 2014-11-30
Ian Campbell [Sat, 6 Sep 2014 11:20:12 +0000 (12:20 +0100)]
grub-install: Install PV Xen binaries into the upstream specified path
Upstream have defined a specification for where guests ought to place their
xenpv grub binaries in order to facilitate chainloading from a stage 1 grub
loaded from dom0.
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.
Colin Watson [Tue, 23 Sep 2014 11:11:58 +0000 (12:11 +0100)]
Add a new "none" platform that only builds utilities
This makes it possible to build generally-useful utilities such as
grub-mount even if the rest of GRUB has not been ported to the target
CPU.
* configure.ac: Add "none" platform. Default to it for unsupported
CPUs rather than stopping with a fatal error. Don't downgrade
x86_64-none to i386. Define COND_real_platform Automake conditional
if the platform is anything other than "none". Don't do any include
directory linking for "none".
* Makefile.am: Skip building grub-core and all bootcheck targets if
!COND_real_platform.
* include/grub/time.h: Don't include <grub/cpu/time.h> if GRUB_UTIL
is defined.
Colin Watson [Sun, 7 Sep 2014 22:06:49 +0000 (23:06 +0100)]
Support grub-emu on x32 (ILP32 but with x86-64 instruction set)
* configure.ac: Remove -m64 from checks for -mcmodel=large and
-mno-red-zone. These are always either unnecessary (x86_64-emu) or
already in TARGET_CFLAGS at this point, and they produce incorrect
results when building for x32.
* grub-core/kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Cast
pointers to Elf64_Xword via grub_addr_t, in order to work on x32.
* include/grub/x86_64/types.h (GRUB_TARGET_SIZEOF_VOID_P,
GRUB_TARGET_SIZEOF_LONG): Define to 4 on x32.
In net/net.c there is a while (1) that only exits if there is a stop
condition and more then 10 packages or if there is no package received.
If GRUB is idle and enter in this loop, the only condition to leave is
if it doesn't have incoming packages. In a network with heavy traffic
this never happens.
Colin Watson [Thu, 10 Apr 2014 15:54:33 +0000 (16:54 +0100)]
Tolerate devices with no filesystem UUID returned by os-prober
* util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
UUID. Other parts of grub-mkconfig tolerate these, they were
previously allowed here up to commit 55e706c918922def17f5012c23cfe88c4c645208, and they can arise in
practice when the system has active LVM snapshots.
Fixes Ubuntu bug #1287436.
Colin Watson [Mon, 31 Mar 2014 13:48:33 +0000 (14:48 +0100)]
Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig.
Commit 588744d0dc655177d5883bdcb8f72ff5160109ed caused grub-mkconfig
no longer to be forgiving of trailing spaces on grub-probe output
lines, which among other things means that util/grub.d/10_linux.in
no longer detects LVM. To fix this, make grub-probe's output
delimiting more consistent. As a bonus, this improves the coverage
of the -0 option.
is_qemu is not being set lead to disabling of feature like
GRUB_IEEE1275_FLAG_HAS_CURSORONOFF. This resulted in cursor not being
displayed during the grub-menu edit.
Andrey Borzenkov [Mon, 10 Mar 2014 13:34:10 +0000 (13:34 +0000)]
use {grub,boot}aa64.efi for boot images on AArch64
According to UEFI 2.4 specification, default boot file name on AArch64
is BOOTAA64.EFI (3.4.1.1 Removable Media Boot Behavior). Also set default
GRUB image name to grubaa64.efi to match it.
Colin Watson [Tue, 28 Jan 2014 14:40:02 +0000 (14:40 +0000)]
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.)
Colin Watson [Fri, 17 Jan 2014 02:55:58 +0000 (02:55 +0000)]
Ignore EPERM when modifying kern.geom.debugflags
Many tests fail when run as a non-root user on FreeBSD. The failures
all amount to an inability to open files using grub_util_fd_open,
because we cannot set the kern.geom.debugflags sysctl. This sysctl is
indeed important to allow us to do such things as installing GRUB to the
MBR, but if we need to do that and can't then we will get an error
later. Enforcing it here is unnecessary and prevents otherwise
perfectly reasonable operations.
Colin Watson [Thu, 16 Jan 2014 12:51:23 +0000 (12:51 +0000)]
grub-shell: Pass -no-pad to xorriso when building floppy images
The floppy images built by grub-shell are currently just over the
floppy limit, and the Debian patch set plus the 915resolution extra
bring this up to the point where GRUB tries to actually read past
the floppy limit, breaking fddboot_test. Passing -no-pad buys us
300KiB, which should keep us going for a while.
* tests/util/grub-shell.in: Pass -no-pad to xorriso when building
floppy images, saving 300KiB.
Tomohiro B Berry [Tue, 14 Jan 2014 17:43:25 +0000 (17:43 +0000)]
Add bi-endian support to ELF parser
This patch adds bi-endian support for both 32-bit and 64-bit elf files.
It compares the native endianness to the endianness of the elf file, and
swaps the header bytes if necessary. This will allow, for example,
32-bit Big Endian grub to load a 64-bit Little Endian kernel.
Evan Broder [Mon, 13 Jan 2014 12:13:29 +0000 (12:13 +0000)]
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
Colin Watson [Mon, 13 Jan 2014 12:13:28 +0000 (12:13 +0000)]
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>
Forwarded: no
Last-Update: 2014-01-17
Colin Watson [Mon, 13 Jan 2014 12:13:27 +0000 (12:13 +0000)]
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.
Colin Watson [Mon, 13 Jan 2014 12:13:26 +0000 (12:13 +0000)]
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.
Colin Watson [Mon, 13 Jan 2014 12:13:24 +0000 (12:13 +0000)]
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.
Colin Watson [Mon, 13 Jan 2014 12:13:23 +0000 (12:13 +0000)]
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.
Ian Campbell [Sat, 6 Sep 2014 11:20:12 +0000 (12:20 +0100)]
grub-install: Install PV Xen binaries into the upstream specified path
Upstream have defined a specification for where guests ought to place their
xenpv grub binaries in order to facilitate chainloading from a stage 1 grub
loaded from dom0.
Ian Campbell [Sun, 19 Oct 2014 15:39:51 +0000 (16:39 +0100)]
Provide prebuilt grub-xen binaries for host use in a new grub-xen-host package.
These can be referenced via kernel= in guest cfg to boot a guest using grub2.
debian/grub-xen-host_grub.cfg is the same as the qemu-firmware variant,
although I'm not sure what the best content is so it's more of a placeholder
for now.
---
v3: Use EXTRA_PACKAGES, drop unnecessary debian/grub-xen-host.dirs, use
"normal" command/shell to interpret the grub.cfg which allows proper use of
"if" etc., use proposed spec paths. http://lists.xen.org/archives/html/xen-devel/2014-08/msg02964.html
v2: Include a usable grub.cfg
Ian Campbell [Sat, 6 Sep 2014 11:20:12 +0000 (12:20 +0100)]
grub-install: Install PV Xen binaries into the upstream specified path
Upstream have defined a specification for where guests ought to place their
xenpv grub binaries in order to facilitate chainloading from a stage 1 grub
loaded from dom0.
Colin Watson [Wed, 15 Oct 2014 12:28:08 +0000 (13:28 +0100)]
Fix installation failure on chrp_ibm/qemu
Disable nvram installation again on chrp_ibm machines that are
emulated by qemu; that doesn't have nvram devices so the nvram
utility inevitably fails.
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.
Colin Watson [Tue, 23 Sep 2014 11:11:58 +0000 (12:11 +0100)]
Add a new "none" platform that only builds utilities
This makes it possible to build generally-useful utilities such as
grub-mount even if the rest of GRUB has not been ported to the target
CPU.
* configure.ac: Add "none" platform. Default to it for unsupported
CPUs rather than stopping with a fatal error. Don't downgrade
x86_64-none to i386. Define COND_real_platform Automake conditional
if the platform is anything other than "none". Don't do any include
directory linking for "none".
* Makefile.am: Skip building grub-core and all bootcheck targets if
!COND_real_platform.
* include/grub/time.h: Don't include <grub/cpu/time.h> if GRUB_UTIL
is defined.
Colin Watson [Sun, 7 Sep 2014 22:06:49 +0000 (23:06 +0100)]
Support grub-emu on x32 (ILP32 but with x86-64 instruction set)
* configure.ac: Remove -m64 from checks for -mcmodel=large and
-mno-red-zone. These are always either unnecessary (x86_64-emu) or
already in TARGET_CFLAGS at this point, and they produce incorrect
results when building for x32.
* grub-core/kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Cast
pointers to Elf64_Xword via grub_addr_t, in order to work on x32.
* include/grub/x86_64/types.h (GRUB_TARGET_SIZEOF_VOID_P,
GRUB_TARGET_SIZEOF_LONG): Define to 4 on x32.
In net/net.c there is a while (1) that only exits if there is a stop
condition and more then 10 packages or if there is no package received.
If GRUB is idle and enter in this loop, the only condition to leave is
if it doesn't have incoming packages. In a network with heavy traffic
this never happens.
Colin Watson [Thu, 10 Apr 2014 15:54:33 +0000 (16:54 +0100)]
Tolerate devices with no filesystem UUID returned by os-prober
* util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
UUID. Other parts of grub-mkconfig tolerate these, they were
previously allowed here up to commit 55e706c918922def17f5012c23cfe88c4c645208, and they can arise in
practice when the system has active LVM snapshots.
Fixes Ubuntu bug #1287436.
Colin Watson [Mon, 31 Mar 2014 13:48:33 +0000 (14:48 +0100)]
Fix partmap, cryptodisk, and abstraction handling in grub-mkconfig.
Commit 588744d0dc655177d5883bdcb8f72ff5160109ed caused grub-mkconfig
no longer to be forgiving of trailing spaces on grub-probe output
lines, which among other things means that util/grub.d/10_linux.in
no longer detects LVM. To fix this, make grub-probe's output
delimiting more consistent. As a bonus, this improves the coverage
of the -0 option.
is_qemu is not being set lead to disabling of feature like
GRUB_IEEE1275_FLAG_HAS_CURSORONOFF. This resulted in cursor not being
displayed during the grub-menu edit.
Andrey Borzenkov [Mon, 10 Mar 2014 13:34:10 +0000 (13:34 +0000)]
use {grub,boot}aa64.efi for boot images on AArch64
According to UEFI 2.4 specification, default boot file name on AArch64
is BOOTAA64.EFI (3.4.1.1 Removable Media Boot Behavior). Also set default
GRUB image name to grubaa64.efi to match it.
Colin Watson [Tue, 28 Jan 2014 14:40:02 +0000 (14:40 +0000)]
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.)
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.
Colin Watson [Tue, 23 Sep 2014 11:11:58 +0000 (12:11 +0100)]
Add a new "none" platform that only builds utilities
This makes it possible to build generally-useful utilities such as
grub-mount even if the rest of GRUB has not been ported to the target
CPU.
* configure.ac: Add "none" platform. Default to it for unsupported
CPUs rather than stopping with a fatal error. Don't downgrade
x86_64-none to i386. Define COND_real_platform Automake conditional
if the platform is anything other than "none". Don't do any include
directory linking for "none".
* Makefile.am: Skip building grub-core and all bootcheck targets if
!COND_real_platform.
* include/grub/time.h: Don't include <grub/cpu/time.h> if GRUB_UTIL
is defined.