Commit Graph

140 Commits

Author SHA1 Message Date
Philip Müller
5329b77df6 Merge branch 'master' of https://github.com/calamares/calamares into development 2019-05-15 06:18:59 +02:00
Kevin Kofler
ec7c5a4611 [bootloader] Fix sb-shim mode to write grub.cfg into the ESP
src/modules/bootloader/main.py (install_secureboot): Run the configured
grubMkconfig command (should be `grub-mkconfig` or `grub2-mkconfig`) to
create `/boot/efi/EFI/$efi_bootloader_id/grub.cfg`. The sb-shim is just
a chainloader to GRUB 2, which expects a grub.cfg in that location, so
something has to create it or the installed system will not boot beyond
the GRUB rescue shell.
(install_grub): Fix misleading comment above the grubMkconfig call: it
is not the file specified in grubCfg that should be already filled out
by the grubcfg job module, that file is written by `grub*-mkconfig`
using `/etc/default/grub` as the input file. It is that input file
`/etc/default/grub` that should already be filled out by the grubcfg job
module. (The same input file is used in install_secureboot.)
2019-05-12 16:11:35 +02:00
Philip Müller
c7aa9ba056 Merge branch 'master' of https://github.com/calamares/calamares into development 2019-05-11 09:23:17 +02:00
Adriaan de Groot
e972c175d8 [bootloader] Fix typo's
- There's a general "partititon" typo, but the variable
   name also is misused.
2019-05-10 18:26:59 -04:00
Adriaan de Groot
23ae6b77bd [bootloader] Convert to str
- The output of subprocess is a bytes object, which needs to
   be decoded so we can use it like a regular string (alternatively,
   we could have changed more code to manipulate bytes, but eventually
   we need a string to pass to a subsequent command anyway).
2019-05-10 15:35:00 -04:00
Adriaan de Groot
9bf1d83c2f [bootloader] Centralize the filename sanitizer
- Centralize the sanitizer so that it's consistent in different
   environments.
 - While here, add () to the sanitizer to avoid some distro's with
   parenthesized names from creating weird EFI dirs.
2019-05-10 15:28:37 -04:00
Philip Müller
c848867797 [merge] with upstream 2019-05-05 00:37:00 +02:00
Adriaan de Groot
dd5c0d1629 [bootloader] Log when the bootloader-module does nothing 2019-04-19 16:47:53 +02:00
Adriaan de Groot
333f0d9215 [bootloader] Simplify finding the ESP 2019-04-19 16:43:07 +02:00
Adriaan de Groot
df37c51c1e [bootloader] [hwclock] Translate module name 2019-04-19 16:39:41 +02:00
Philip Müller
4929a26e89 Merge branch 'master' of https://github.com/calamares/calamares into development 2019-03-12 08:15:35 +01:00
Adriaan de Groot
a93df6fcfb [bootloader] Requires partition before it. 2019-03-11 17:07:05 -04:00
Philip Müller
9baebce7fd Merge branch 'master' of https://github.com/calamares/calamares into development 2019-02-12 13:45:54 +01:00
Arnaud Ferraris
a14968a646 [bootloader] Fix systemd-boot installation
When choosing `systemd-boot` as the bootloader, numerous problems
occurred:

- the kernel and initrd were not copied to the EFI System Partition,
and therefore could not be reached by the bootloader
- the fallback entry used the default initramfs image instead of the
fallback image

`systemd-boot` provides the `kernel-install` utility, which
automatically copies the kernel + initramfs to the EFI partition, and
creates the corresponding bootloader entry.

Unfortunately, `kernel-install` cannot be used here as the module is not
executed in a chroot. As setting up one only for running a single
command would be overkill, this patch re-creates what `kernel-install`
usually does:

- copy the kernel and initramfs to their own subdirectory at the root of
the EFI partition
- create the corresponding entry configuration file

To this end, the `systemd-boot` installation code in the `bootloader`
module has been largely refactored, including removing a few duplicate
LOCs.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2019-02-08 18:00:58 +01:00
Philip Müller
62e065c52f [merge] sync with upstream 2018-06-29 08:25:08 +02:00
Adriaan de Groot
52f09f7f46 [modules] Minor documentation work on modules a-g 2018-06-26 05:47:23 -04:00
Philip Müller
92f2461337 Merge branch 'master' of https://github.com/calamares/calamares into development 2018-06-21 07:38:30 +02:00
Philip Müller
18bd455ae1 [bootloader] make paths for executable optional and adjustable 2018-06-17 07:47:58 +02:00
Philip Müller
5f78d49777 Merge branch 'master' of https://github.com/calamares/calamares into development 2018-06-16 08:14:07 +02:00
Adriaan de Groot
fdda1ef840 [bootloader] Mimic openSUSE's efibootmgr calls 2018-05-28 11:47:47 -04:00
Adriaan de Groot
dad3669eae [bootloader] Take a stab at determining the shim name 2018-05-28 09:26:20 -04:00
Adriaan de Groot
e4bda546cf [bootloader] factor our EFI-platform-bitness discovery 2018-05-28 09:24:43 -04:00
Adriaan de Groot
903e77a908 [bootloader] Adjust documentation 2018-03-06 07:11:10 -05:00
Philip
6590a06d93 Merge branch 'master' of https://github.com/calamares/calamares into development 2018-02-28 09:10:00 +01:00
Adriaan de Groot
06536b6a66 [bootloader] Refactor method for safe efi label 2018-02-20 10:47:14 -05:00
Adriaan de Groot
7f53e970fc [bootloader] Add secure-boot efiBootLoader
- add configuration option
 - check for sensible combinations of firmware, bootloader,
   and complain if it isn't.
2018-02-20 05:10:32 -05:00
Adriaan de Groot
533031b3ca [bootloader] print() does not log
- use the right logging method; print just vanishes.
2018-01-30 11:26:29 +01:00
Adriaan de Groot
f869a0f263 [bootloader] Log the EFI fallback action 2018-01-30 11:22:36 +01:00
Adriaan de Groot
78108c5cda [bootloader] Allow skipping the EFI fallback 2018-01-29 22:55:07 +01:00
Philip
bff6890358 [merge] with upstream master branch 2018-01-14 15:45:56 -05:00
Adriaan de Groot
28d61c406e [bootloader] Improve description of *efiBootloaderId* option 2018-01-08 16:14:28 +01:00
Philip
c1ffc18738 [merge] with upstream 2017-12-23 07:30:07 -05:00
Adriaan de Groot
762ad54344 Documentation: change http links to GitHub to https 2017-12-20 08:39:09 -05:00
Philip
04a8454fff [Merge] sync with upstream 2017-11-06 06:14:02 -05:00
Philip
b15d970845 [bootloader] fix regression introduced with d179a9e
- see also #840
2017-10-28 03:41:29 -04:00
Philip
4b4bd83a39 Merge branch 'master' of https://github.com/calamares/calamares into development 2017-10-27 06:17:25 -04:00
Bezzy1999
17fb91cda5 added my name 2017-10-25 18:47:23 +01:00
Bezzy1999
cc6db5b808 pep8 2017-10-25 18:45:58 +01:00
crispg72
d179a9e3b1 Tidied up bitness check 2017-10-24 20:32:15 +01:00
Philip
ee9860dc35 Merge branch 'master' of https://github.com/calamares/calamares into development 2017-10-24 08:26:09 -04:00
Philip
10ede796f8 [bootloader] use generic file names instead of grub
- this fixes #839
2017-10-23 12:52:40 -04:00
Philip
3275a33827 [bootloader] use generic file names instead of grub
- see also #839
2017-10-23 08:28:59 -04:00
Philip
35983e9e5f Merge branch 'master' of https://github.com/calamares/calamares into development 2017-09-07 11:00:57 +01:00
Adriaan de Groot
cec7132d2c Swap + LUKS configuration.
Based on patches from crazy@frugalware.org and V3n3RiX.

(presumably) FIXES #730
2017-09-07 03:43:42 -04:00
Philip
0407a699ea [bootloader] fix merge conflict 2017-03-31 08:12:42 +02:00
Alf Gaida
d62eecd71e Fixed two typos that leads to pep8 whining 2017-03-29 20:19:41 +02:00
Philip
9c3ada3e88 [bootloader] fix mkdirs -> makedirs 2017-03-24 23:05:41 +01:00
Alf Gaida
c12f7f1d4c fix mkdirs -> makedirs 2017-03-24 16:39:25 +01:00
Philip
60a19afeed [bootloader] pep8 optimization 2017-03-20 23:01:42 +01:00
Alf Gaida
50cefe2ca8 fixes #692 bootloader module fails when /EFI/Boot exists
- to make it short - it doesn't help much if one try to find and process any
  EFI related things in the live system. The better approach is to search in
  the chroot.
- use python builtins for mkdir and cp
- replacing some subprocess calls
- Some PEP8 changes
- added myself to the copyright section
2017-03-20 14:47:39 +01:00