summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-12-16 23:02:26 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-12-17 18:17:09 +0000
commit3903717238342e11f144964dbf97a0605b58c942 (patch)
treefd6a2e63c9067742a86bdc0a3e58fb78fdb5daf5 /perl-install/bootloader.pm
parent5ac101a075536b1f6ceea2a335423c18b2ca2269 (diff)
downloaddrakx-3903717238342e11f144964dbf97a0605b58c942.tar
drakx-3903717238342e11f144964dbf97a0605b58c942.tar.gz
drakx-3903717238342e11f144964dbf97a0605b58c942.tar.bz2
drakx-3903717238342e11f144964dbf97a0605b58c942.tar.xz
drakx-3903717238342e11f144964dbf97a0605b58c942.zip
Support 32-bit UEFI with 64-bit O/S.
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 0bc156b67..a9bb1e73d 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2498,8 +2498,19 @@ sub ensure_pkg_is_installed {
);
my $main_method = main_method($bootloader->{method});
if ($main_method eq 'grub2') {
- my $pkg = is_uefi() ? 'grub2-efi' : 'grub2';
- my $prefix = is_uefi() ? (arch() eq 'x86_64' ? 'x86_64-efi' : 'i386-efi') : 'i386-pc';
+ my ($prefix, $pkg);
+ if (is_uefi()) {
+ if (uefi_type() eq 'ia32') {
+ $prefix = 'i386-efi';
+ $pkg = 'grub2-efi(x86-32)';
+ } else {
+ $prefix = 'x86_64-efi';
+ $pkg = 'grub2-efi(x86-64)';
+ }
+ } else {
+ $prefix = 'i386-pc';
+ $pkg = 'grub2';
+ }
$do_pkgs->ensure_is_installed($pkg, "/usr/lib/grub/$prefix/ext2.mod", 1) or return 0;
} elsif ($main_method eq 'refind') {
$do_pkgs->ensure_is_installed('refind', '/sbin/refind-install', 1) or return 0;