Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Calamares
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
Calamares
Commits
90bb6910
Commit
90bb6910
authored
May 10, 2019
by
Adriaan de Groot
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue-1145'
FIXES #1145
parents
5b8a54ed
e972c175
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/bootloader/main.py
+9
-8
9 additions, 8 deletions
src/modules/bootloader/main.py
with
9 additions
and
8 deletions
src/modules/bootloader/main.py
+
9
−
8
View file @
90bb6910
...
...
@@ -43,6 +43,9 @@ _ = gettext.translation("calamares-python",
languages
=
libcalamares
.
utils
.
gettext_languages
(),
fallback
=
True
).
gettext
# This is the sanitizer used all over to tidy up filenames
# to make identifiers (or to clean up names to make filenames).
file_name_sanitizer
=
str
.
maketrans
(
"
/()
"
,
"
_-__
"
)
def
pretty_name
():
return
_
(
"
Install bootloader.
"
)
...
...
@@ -211,7 +214,6 @@ def efi_label():
branding
=
libcalamares
.
globalstorage
.
value
(
"
branding
"
)
efi_bootloader_id
=
branding
[
"
bootloaderEntryName
"
]
file_name_sanitizer
=
str
.
maketrans
(
"
/
"
,
"
_-
"
)
return
efi_bootloader_id
.
translate
(
file_name_sanitizer
)
...
...
@@ -238,7 +240,6 @@ def install_systemd_boot(efi_directory):
install_efi_directory
=
install_path
+
efi_directory
uuid
=
get_uuid
()
distribution
=
get_bootloader_entry_name
()
file_name_sanitizer
=
str
.
maketrans
(
"
/
"
,
"
_-
"
)
distribution_translated
=
distribution
.
translate
(
file_name_sanitizer
)
loader_path
=
os
.
path
.
join
(
install_efi_directory
,
"
loader
"
,
...
...
@@ -365,24 +366,24 @@ def install_secureboot(efi_directory):
# of that tuple.
efi_drive
=
subprocess
.
check_output
([
libcalamares
.
job
.
configuration
[
"
grubProbe
"
],
"
-t
"
,
"
drive
"
,
"
--device-map=
"
,
install_efi_directory
])
"
-t
"
,
"
drive
"
,
"
--device-map=
"
,
install_efi_directory
])
.
decode
(
"
ascii
"
)
efi_disk
=
subprocess
.
check_output
([
libcalamares
.
job
.
configuration
[
"
grubProbe
"
],
"
-t
"
,
"
disk
"
,
"
--device-map=
"
,
install_efi_directory
])
"
-t
"
,
"
disk
"
,
"
--device-map=
"
,
install_efi_directory
])
.
decode
(
"
ascii
"
)
efi_drive_partition
=
efi_drive
.
replace
(
"
(
"
,
""
).
replace
(
"
)
"
,
""
).
split
(
"
,
"
)[
1
]
# Get the first run of digits from the partition
efi_partiti
t
on_number
=
None
efi_partition_number
=
None
c
=
0
start
=
None
while
c
<
len
(
efi_drive_partition
):
if
efi_drive_partition
[
c
].
isdigit
()
and
start
is
None
:
start
=
c
if
not
efi_drive_partition
[
c
].
isdigit
()
and
start
is
not
None
:
efi_
drive
_number
=
efi_drive_partition
[
start
:
c
]
efi_
partition
_number
=
efi_drive_partition
[
start
:
c
]
break
c
+=
1
if
efi_partiti
t
on_number
is
None
:
if
efi_partition_number
is
None
:
raise
ValueError
(
"
No partition number found for %s
"
%
install_efi_directory
)
subprocess
.
call
([
...
...
@@ -391,7 +392,7 @@ def install_secureboot(efi_directory):
"
-w
"
,
"
-L
"
,
efi_bootloader_id
,
"
-d
"
,
efi_disk
,
"
-p
"
,
efi_partiti
t
on_number
,
"
-p
"
,
efi_partition_number
,
"
-l
"
,
install_efi_directory
+
"
/
"
+
install_efi_bin
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment