Registration is now invite-only. Any user can make an invite, you need to create it here and give resulting link to someone to register.
avatar
mikhailnov has added 8deb00736f
Do not create useless /boot/efi/EFI/rosa/grub.cfg
view file @ 8deb00736f
... ... --- a/0008-Configure-efi-bootload.patch
... ... +++ b/0008-Configure-efi-bootload.patch
... ... @@ -1,15 +1,14 @@
1
From 76cc95b57c9e3ffbe3f2f42f415fbdb72fb9336e Mon Sep 17 00:00:00 2001
1
From 961cdd35fa59b54e34a55b53cf4732470d5a0e9d Mon Sep 17 00:00:00 2001
2 2
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
3 3
Date: Fri, 11 Dec 2020 00:06:32 +0000
4
Subject: [PATCH 08/27] Configure efi bootload
4
Subject: [PATCH] Configure efi bootload
5 5
6
Rediffed by gel0 <leshikne@gmail.com>
7 6
---
8
 pyanaconda/modules/storage/bootloader/efi.py | 40 +++++++++++++++++---
9
 1 file changed, 35 insertions(+), 5 deletions(-)
7
 pyanaconda/modules/storage/bootloader/efi.py | 49 +++++++++++++++++---
8
 1 file changed, 42 insertions(+), 7 deletions(-)
10 9
11 10
diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py
12
index 82f60e4c4..47b00db25 100644
11
index 82f60e4c40..793428e86d 100644
13 12
--- a/pyanaconda/modules/storage/bootloader/efi.py
14 13
+++ b/pyanaconda/modules/storage/bootloader/efi.py
15 14
@@ -34,6 +34,11 @@ __all__ = ["EFIBase", "EFIGRUB", "Aarch64EFIGRUB", "ArmEFIGRUB", "MacEFIGRUB"]
... ... @@ -33,7 +32,18 @@ index 82f60e4c4..47b00db25 100644
32 32
         if "noefi" in kernel_arguments:
33 33
             log.info("Skipping efibootmgr for noefi")
34 34
             return ""
35
@@ -129,10 +136,13 @@ class EFIBase(object):
35
@@ -114,9 +121,8 @@ class EFIBase(object):
36
         try:
37
             os.sync()
38
             self.stage2_device.format.sync(root=conf.target.physical_root) # pylint: disable=no-member
39
-            self.install()
40
         finally:
41
-            self.write_config()  # pylint: disable=no-member
42
+            self.install()  # pylint: disable=no-member
43
 
44
     def check(self):
45
         return True
46
@@ -129,10 +135,13 @@ class EFIBase(object):
36 47
 
37 48
 class EFIGRUB(EFIBase, GRUB2):
38 49
     """EFI GRUBv2"""
... ... @@ -49,7 +59,20 @@ index 82f60e4c4..47b00db25 100644
59 59
 
60 60
     _is_32bit_firmware = False
61 61
 
62
@@ -192,6 +202,26 @@ class EFIGRUB(EFIBase, GRUB2):
62
@@ -172,6 +181,12 @@ class EFIGRUB(EFIBase, GRUB2):
63
 
64
         with open(config_path, "w") as fd:
65
             grub_dir = self.config_dir
66
+            # XXX Sometimes uuid/vol_uuid is None for some reasons.
67
+            # But this config is useless because grub2-install inserts
68
+            # a needed path into the bootloader:
69
+            # $ strings /boot/efi/EFI/rosa/grubx64.efi | tail -n1
70
+            # (,gpt2)/root_xfce/boot/grub2
71
+            # Call of this function is removed, this code is not used.
72
             if self.stage2_device.format.type != "btrfs":
73
                 fs_uuid = self.stage2_device.format.uuid
74
             else:
75
@@ -192,6 +207,26 @@ class EFIGRUB(EFIBase, GRUB2):
63 76
 
64 77
         super().write_config()
65 78
 
... ... @@ -76,7 +99,7 @@ index 82f60e4c4..47b00db25 100644
99 99
 
100 100
 class Aarch64EFIGRUB(EFIGRUB):
101 101
     _serial_consoles = ["ttyAMA", "ttyS"]
102
@@ -199,7 +229,7 @@ class Aarch64EFIGRUB(EFIGRUB):
102
@@ -199,7 +234,7 @@ class Aarch64EFIGRUB(EFIGRUB):
103 103
 
104 104
     def __init__(self):
105 105
         super().__init__()
... ... @@ -85,7 +108,7 @@ index 82f60e4c4..47b00db25 100644
108 108
 
109 109
 
110 110
 class ArmEFIGRUB(EFIGRUB):
111
@@ -208,14 +238,14 @@ class ArmEFIGRUB(EFIGRUB):
111
@@ -208,14 +243,14 @@ class ArmEFIGRUB(EFIGRUB):
112 112
 
113 113
     def __init__(self):
114 114
         super().__init__()
... ... @@ -103,5 +126,5 @@ index 82f60e4c4..47b00db25 100644
126 126
     def mactel_config(self):
127 127
         if os.path.exists(conf.target.system_root + "/usr/libexec/mactel-boot-setup"):
128 128
-- 
129
2.31.1
129
2.35.2
130 130
view file @ 8deb00736f
... ... --- a/0023-Write-bootloader-config-before-installing-it.patch
... ... +++ b/0023-Write-bootloader-config-before-installing-it.patch
... ... @@ -6,26 +6,7 @@ Subject: [PATCH 23/27] Write bootloader config before installing it
6 6
It is required for grub to read /etc/default/grub written in write_config() in EFI mode as well.
7 7
rosa.diff executes update-grub2 (grub2-mkconfig) for EFI grub in install().
8 8
---
9
 pyanaconda/modules/storage/bootloader/efi.py   | 4 ++--
10
 pyanaconda/modules/storage/bootloader/grub2.py | 2 +-
11
 2 files changed, 3 insertions(+), 3 deletions(-)
12 9
13
diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py
14
index 47b00db25..40bab052e 100644
15
--- a/pyanaconda/modules/storage/bootloader/efi.py
16
+++ b/pyanaconda/modules/storage/bootloader/efi.py
17
@@ -121,9 +121,9 @@ class EFIBase(object):
18
         try:
19
             os.sync()
20
             self.stage2_device.format.sync(root=conf.target.physical_root) # pylint: disable=no-member
21
-            self.install()
22
+            self.write_config()
23
         finally:
24
-            self.write_config()  # pylint: disable=no-member
25
+            self.install()  # pylint: disable=no-member
26
 
27
     def check(self):
28
         return True
29 10
diff --git a/pyanaconda/modules/storage/bootloader/grub2.py b/pyanaconda/modules/storage/bootloader/grub2.py
30 11
index 059bc7162..47d86e7d1 100644
31 12
--- a/pyanaconda/modules/storage/bootloader/grub2.py

Comments