Commit Graph

11 Commits

Author SHA1 Message Date
Arnaud Rebillout 6dbb8d2598 efi-image: Fix <platform>/grub.cfg, variables must NOT be expanded
The test 'if [ x$grub_platform == xefi -a x$lockdown != xy ]' is meant
to be done by GRUB at runtime, so this line should appear verbatim in
the grub.cfg file.

However the variables are expanded at build-time by the script, because
the dollar symbol is not escaped.

Here's the result on a 12.1.0 live image:

    $ cat <<debian-live-12.1.0>>/boot/grub/x86_64-efi/grub.cfg
    if [ x == xefi -a x != xy ] ; then
    insmod part_acorn
    insmod part_amiga
    insmod part_apple
    insmod part_bsd
    insmod part_dfly
    insmod part_dvh
    insmod part_gpt
    insmod part_msdos
    insmod part_plan
    insmod part_sun
    insmod part_sunpc
    fi
    source /boot/grub/grub.cfg

Note that this mistake would have been caught if only the nounset option
had been used (ie. 'set -u').

Fixes commit: 7b36f5b0ad
2023-09-18 08:39:38 +07:00
Arnaud Rebillout a3f7a33f95 efi-image: Fix missing part_* modules in boot<platform>.efi
Setting the value of PARTITIONLIST in a sub-shell is scoped to the
sub-shell, it will not change the value of the variable in the parent
shell.

In other words:

    #!/bin/sh
    FOOBAR=
    (FOOBAR=foo)
    echo FOOBAR=$FOOBAR

gives the output:

    FOOBAR=

As a consequence, PARTITIONLIST being empty, there are no part_*
modules embedded in the boot<platform>.efi binary. This is clearly a
regression, introduced in 7b36f5b0ad.

Somehow, Debian doesn't seem to be impacted. Kali Linux is impacted, but
only under very special conditions, leading to this bug report:
<https://bugs.kali.org/view.php?id=8441>

This commit fixes it, by setting the PARTITIONLIST variable first, and
then using it where needs be. As a consequence it greatly simplifies the
next part of the code, as we can just use a heredoc to create the grub
config.
2023-09-18 08:38:52 +07:00
Roland Clobus 7b36f5b0ad
UEFI-secure: Don't attempt to load unsigned modules
The part_*.mod modules are not inside the signed .efi-file, so they must
not be 'insmod'ed in secure boot mode.
2023-04-30 12:59:36 +02:00
Roland Clobus 2c7c90487a
mkfs.msdos needs at most 32 bits for the -i argument.
Use the hexadecimal version of SOURCE_DATE_EPOCH, limited to the lower 32 bits
2021-02-16 21:22:12 +01:00
Roland Clobus 15fab34ea2 Set timestamp embedded in EFI files 2021-01-15 09:22:29 +00:00
Roland Clobus 760684b1e2 Use SOURCE_DATE_EPOCH for the partition-id of /efi.img 2021-01-15 09:22:29 +00:00
Roland Clobus 037e93fe37 Preserve timestamps 2021-01-01 16:51:02 +00:00
Lyndon Brown 7a4a9f94b8 amend copyright & licensing blocks
Current versions of the project files are built upon versions published
and licensed by Daniel Baumann, but are modified copies of those files and
thus need to be marked as such per licensing requirements (afaik he did
not pass along ownership / licensing rights to anyone when he left the
project). We should also be careful to not be misrepresenting such
modified copies as being attributed to Daniel.

Adding a new copyright line referring to "The Debian Live team" should
suffice for this.

The authorship block in man pages has also similarly been updated.

Notes:
 - tweaked a copy of daniel copyright lines stating 2014 instead of 2015.
   both of these cases were in files that i had personally introduced in
   some of my past merged commits that moved some code around. i don't know
   why they stated 2014.
 - binary_onie was introduced in 2018, so that has a 2018 date instead of
   2016 unlike the rest.
 - 'efi-image' is a 3rd-party (Canonical Ltd) work that we bundle, but it
   has been modified by 674794a8f4 and
   36a3ba7634 so I similarly added a
   debian live copyright line.
 - 'grub-cpmodules' is similar. it was only changed by the indentation fix
   of 36a3ba7634 but modification is
   modification, and this does help cover any possible future changes that
   might be made.
2020-03-11 13:51:19 +00:00
Lyndon Brown 36a3ba7634 fix indentation
including:
 - spaces replaced with tabs for consistency
 - alignment of `;;` in some case statements changed for consistency

Gbp-Dch: Short
Closes: #952857
2020-03-05 11:29:01 +00:00
Raphaël Hertzog 674794a8f4 Try to reuse /isolinux/splash.png in default grub configuration. 2016-11-28 20:58:18 +01:00
Adrian Gibanel Lopez 58a97219c9 Stolen efi-image and grub-cpmodules from src:live-installer
These two scripts simplify the creation of efi images based on grub-efi.
I have decided to simply steal them. If I had to include them thanks to a source package that would have mean that an src repo would have to be defined by default.
TODO: Ask in a bug a RFE so that these two scripts are put into a binary that could be consumed by both live-installer and live-build packages.
2016-07-31 15:09:13 +02:00