Commit Graph

85 Commits

Author SHA1 Message Date
Philip Müller
cdbd9eb8eb [merge] with upstream 2020-02-24 19:44:30 +01:00
Matti Hyttinen
717b8947d5
Update main.py
Unset GRUB_SAVEDEFAULT if / or /boot is in btrfs or f2fs partition. This avoids the error "sparse file not allowed" at boot time. Btrfs and f2fs do not support saving default entry in grub.
2020-02-24 17:49:56 +02:00
Philip Müller
c50726de2d Merge branch 'master' of https://github.com/calamares/calamares into development 2020-02-21 11:52:23 +01:00
Adriaan de Groot
50161cdab9 [grubcfg] Use own swap
- In situations where there are more swap partitions, only use
  partitions this install "owns".
2020-02-20 16:59:05 +01:00
Philip Müller
0e6c414150 Merge branch 'master' of https://github.com/calamares/calamares into development 2019-12-02 10:56:44 +01:00
Adriaan de Groot
1a13704c71 [grubcfg] HOTFIX typo in function call 2019-11-30 21:46:45 +01:00
Philip Müller
a9d9a19e35 Merge branch 'master' of https://github.com/calamares/calamares into development 2019-11-18 11:11:33 +01:00
Adriaan de Groot
42425e4030 [grubcfg] False is case-sensitive in Python 2019-11-18 10:48:33 +01:00
Philip Müller
5989d6aa5a Merge branch 'master' of https://github.com/calamares/calamares into development 2019-11-16 16:50:48 +01:00
Adriaan de Groot
67de4af4a4 [grubcfg] Add some test configurations 2019-11-04 16:40:49 +01:00
Adriaan de Groot
f727362a90 [grubcfg] Guard against stupid configurations
- Scenario: *keepDistribution* is true, and the existing file contains
   a GRUB_DISTRIBUTION line **followed** by a commented-out GRUB_DISTRIBUTION
   line.
 - In that case, the commented-out line would change the flag back to
   False, and we'd end up writing a second GRUB_DISTRIBUTION line at the end.

Prevent that: the flag can only go to "True" and then stays there.

Editorial: If your grub configuration would have tripped this up, then
you're doing something wrong. Clean up the configuration file first.
2019-11-04 16:36:57 +01:00
Adriaan de Groot
4a0a8083f3 [grubcfg] If we only see #GRUB_DISTRIBUTION, it's not been set
- If we update the line, then GRUB_DISTRIBUTION has been set
 - If we don't update the line (e.g. because of *keepDistribution*)
   then a comment doesn't count as "have seen that line".

This means that if we get to the end of the file, with only commented-
out GRUB_DISTRIBUTION lines, and *keepDistribution* is set, then we'll
still write a distribution line -- because otherwise it's not set at all.
2019-11-04 16:34:15 +01:00
Adriaan de Groot
c6c861654d [grubcfg] Update GRUB_DISTRIBUTION as needed
- Previous fix would erase the distribution information (using an
   empty string to flag 'preserve existing GRUB_DISTRIBUTION lines'),
   but that is fragile. A distro might set that, and yet **not**
   set a GRUB_DISTRIBUTION line, in which case it would end up with
   a setup without any GRUB_DISTRIBUTION set.
 - When a GRUB_DISTRIBUTION line is found, **then** check if it should
   update the line or not. This way, we have a suitable distribution
   to write if no GRUB_DISTRIBUTION is found at all.
2019-11-04 16:06:59 +01:00
Adriaan de Groot
ac3b50fabb [grubcfg] Only replace a GRUB_DISTRIBUTOR line if wanted 2019-11-04 16:02:36 +01:00
Adriaan de Groot
aae7d7dd0a [grubcfg] Update documentation of config file
- add some more general description
 - document new-to-implement *keepDistributor* flag

SEE #1201
2019-11-04 11:05:18 +01:00
Philip Müller
945cc0ef23 [grubcfg] add apparmor support 2019-06-16 11:17:48 +02:00
Philip Müller
c848867797 [merge] with upstream 2019-05-05 00:37:00 +02:00
Adriaan de Groot
e326b658ef Enable translation in Python modules
- covers all the remaining Python modules
 - most only get a translatable pretty name, some also return
   error messages
2019-04-20 11:22:32 +02:00
Philip Müller
3f70007410 Merge branch 'master' of https://github.com/calamares/calamares into development 2019-02-24 10:54:03 +01:00
Adriaan de Groot
e50c2bcb44 [grubcfg] REVERT d775cee4cf
This is causing issue #1073 and needs further thought.
2019-02-23 16:52:10 -05:00
Philip Müller
1cbeefbf50 [grubcfg] remove loglevel settings
- with systemd 239.3-1 we have quiet really quiet
2018-10-26 18:25:33 +02:00
Philip Müller
fb8e1ad6cd [grubcfg] reduce bootflags 2018-10-25 17:44:00 +02:00
Philip Müller
85fcf11804 [grubcfg] remove vga 2018-10-23 19:15:57 +02:00
Philip Müller
040c5cdf67 [grubcfg] fix grub.params 2018-09-27 20:56:17 +02:00
Philip Müller
2e6dd6a075 [grubcfg] fix syntax 2018-09-26 23:00:19 +02:00
Philip Müller
d39bd34baf [grubcfg] fix syntax 2018-09-26 22:45:41 +02:00
Philip Müller
4f8309d41c [grubcfg] fix syntax 2018-09-26 22:43:28 +02:00
Philip Müller
b48a026061 [grubcfg] fix syntax 2018-09-26 22:40:53 +02:00
Philip Müller
e9f3c88844 [grubcfg] fix syntax 2018-09-26 22:35:35 +02:00
Philip Müller
b4ca18177f [grubcfg] fix syntax 2018-09-26 22:32:04 +02:00
Philip Müller
1f52bfac4e [grubcfg] fix syntax 2018-09-26 22:22:21 +02:00
Philip Müller
b7d993d211 [initcpiocfg] fix syntax 2018-09-26 22:14:12 +02:00
Philip Müller
c89a55fc83 [initcpiocfg] fix syntax 2018-09-26 22:08:02 +02:00
Philip Müller
8a2c5c1727 [initcpiocfg] fix syntax 2018-09-26 21:52:41 +02:00
Philip Müller
5c6ae3f1b0 [modules] adopt for silent boot 2018-09-26 19:25:03 +02:00
Matthias Klumpp
d775cee4cf grubcfg: Only try to decrypt disk that /boot is on 2018-08-25 15:21:40 +02:00
Adriaan de Groot
63c03068c0 [modules] Documentation for fstab, grubcfg, mkinitcpio
- These modules were entirely documented as "use the source",
 - The sources aren't terribly clear either.
2018-06-26 06:39:30 -04:00
Adriaan de Groot
52f09f7f46 [modules] Minor documentation work on modules a-g 2018-06-26 05:47:23 -04:00
Adriaan de Groot
dd8e53dc22 Copyright: update copyright lines on files touched in 2018
Contributions from:
  Adriaan de Groot <groot@kde.org>
  Gabriel Craciunescu <crazy@frugalware.org>
  AlmAck <gluca86@gmail.com>
  Andrius Štikonas <andrius@stikonas.eu>
  Caio Carvalho <caiojcarvalho@gmail.com>
  Raul Rodrigo Segura <raurodse@gmail.com>
2018-06-15 05:59:11 -04:00
Gabriel Craciunescu
0ccca6902b [grubcfg] fix inter-module dependency with plymouthcfg modules
The plymouthcfg Calamares module is optional. Distributions which
  write filesystems with a full plymouth configuration won't even
  want to use it (see plymouthcfg docs).

  However, now grubcfg depends on plymouthcfg to run because
  the globalstorage value to trigger setting  'splash' in grub,
  is set in the plymouthcfg module.

  Just check for plymouth existence separately in the grub module.

  Fixes ea1c8a0e5d
2018-06-14 06:58:24 -04:00
Adriaan de Groot
762ad54344 Documentation: change http links to GitHub to https 2017-12-20 08:39:09 -05: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
Adriaan de Groot
ec265c073a One more have_dracut check (thanks to @crazy) 2017-09-05 06:09:50 -04:00
Adriaan de Groot
e13f7898ac Make check for dracut more readable 2017-09-04 06:42:51 -04:00
Alf Gaida
4eb0e70984 Fixed pep8 whining in module grubcfg
added myself to copyright
2017-06-04 13:57:49 +02:00
Teo Mrnjavac
9c4819592f Improve EFI configuration check in grubcfg. 2017-02-17 16:21:02 +01:00
Kevin Kofler
668284f5f1 [grubcfg] Compare integers to integers, not strings.
target_env_call returns an integer, so do not compare its result to the
string "0".
2016-10-21 00:19:22 +02:00
V3n3RiX
11c9e87fd0 dracut : unlock encrypted swap if exists (#267)
* dracut : unlock encrypted swap if exists
* only check for swap_outer_uuid if dracut exists
2016-10-20 17:00:15 +02:00
V3n3RiX
0bde162a9c Only write rd.luks.uuid if dracut is present and leave other initramfs generators clean (#266)
* add rd.luks.uuid to GRUB_CMDLINE (fixes unbootable system with dracut --nohostonly, and doesn't affect any other initramfs generators)

* typo

* only write rd.luks.uuid line if dracut is present, and leave other initramfs generators alone :D

* add missing = operator
2016-10-19 17:41:35 +02:00
V3n3RiX
7e74d48fb6 add rd.luks.uuid to GRUB_CMDLINE (fixes unbootable system with dracut… (#265)
* add rd.luks.uuid to GRUB_CMDLINE (fixes unbootable system with dracut --nohostonly, and doesn't affect any other initramfs generators)

* typo
2016-10-18 18:59:51 +02:00