summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Backlund <tmb@mageia.org>2014-01-11 03:21:37 +0159
committerThomas Backlund <tmb@mageia.org>2014-01-11 03:21:37 +0159
commit1d643f59e5a37a5042d8c18e057544a72d7da05e (patch)
treea7c4694cf915cf78cc76a900cce21643e6b08dc9
parentc22547139d163ab3e19194916abc4069ee536ef6 (diff)
downloaddrakx-1d643f59e5a37a5042d8c18e057544a72d7da05e.tar
drakx-1d643f59e5a37a5042d8c18e057544a72d7da05e.tar.gz
drakx-1d643f59e5a37a5042d8c18e057544a72d7da05e.tar.bz2
drakx-1d643f59e5a37a5042d8c18e057544a72d7da05e.tar.xz
drakx-1d643f59e5a37a5042d8c18e057544a72d7da05e.zip
initial efi support
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/fs/type.pm8
-rw-r--r--perl-install/fsedit.pm4
-rw-r--r--perl-install/partition_table.pm1
4 files changed, 11 insertions, 3 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 4a8515049..5633e18df 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,4 @@
+- initial efi support
- drakboot:
o add minimal/experimental lightdm autologin support (mga#11746)
- harddrake, logdrake:
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index 4cbf0c496..6acb98e89 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -36,6 +36,10 @@ if_(arch() =~ /i.86|ia64|x86_64/,
0x07 => 'ntfs-3g', 'NTFS-3G',
0x07 => 'ntfs', 'NTFS',
),
+if_(arch() =~ /x86_64/,
+ 0xee => '', 'EFI GPT',
+ 0xef => 'vfat', 'EFI (FAT-12/16/32)',
+),
if_(arch() =~ /ppc/,
0x401 => '', 'Apple Bootstrap',
0x402 => 'hfs', 'Apple HFS Partition',
@@ -151,8 +155,10 @@ if_(arch() !~ /ppc/,
0xe3 => '', 'DOS R/O',
0xe4 => '', 'SpeedStor (FAT-16)',
0xeb => 'befs', 'BeOS fs',
+if_(arch() !~ /x86_64/,
0xee => '', 'EFI GPT',
0xef => 'vfat', 'EFI (FAT-12/16/32)',
+),
0xf0 => '', 'Linux/PA-RISC boot',
0xf4 => '', 'SpeedStor (large part.)',
0xf2 => '', 'DOS secondary',
@@ -313,7 +319,7 @@ sub defaultFS() { 'ext4' }
sub true_local_fs_types() { qw(btrfs ext3 ext2 ext4 reiserfs xfs jfs) }
sub isEmpty { !$_[0]{fs_type} && $_[0]{pt_type} == 0 }
-sub isEfi { arch() =~ /ia64/ && $_[0]{pt_type} == 0xef }
+sub isEfi { arch() =~ /ia64|x86_64/ && $_[0]{pt_type} == 0xef }
sub isWholedisk { arch() =~ /^sparc/ && $_[0]{pt_type} == 5 }
sub isExtended { arch() !~ /^sparc/ && ($_[0]{pt_type} == 5 || $_[0]{pt_type} == 0xf || $_[0]{pt_type} == 0x85) }
sub isRawLVM { $_[0]{pt_type} == 0x8e || $_[0]{type_name} eq 'Linux Logical Volume Manager' }
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index d6c9a16ad..537837a52 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -40,8 +40,8 @@ use fs;
],
);
foreach (values %suggestions) {
- if (arch() =~ /ia64/) {
- @$_ = ({ mntpoint => "/boot/efi", size => MB(50), pt_type => 0xef, ratio => 1, maxsize => MB(150) }, @$_);
+ if (arch() =~ /ia64|x86_64/ && (-e "/sys/firmware/efi") {
+ @$_ = ({ mntpoint => "/boot/EFI", size => MB(100), pt_type => 0xef, ratio => 1, maxsize => MB(500) }, @$_);
}
}
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index a11318bea..d2bd7a1d5 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -247,6 +247,7 @@ sub _default_type {
arch() eq "alpha" ? "bsd" :
arch() =~ /^sparc/ ? "sun" :
arch() eq "ppc" && detect_devices::get_mac_model() !~ /^IBM/ ? "mac" :
+ arch() eq "x86_64" && (-e "/sys/firmware/efi/") ? "gpt" :
$hd->{totalsectors} > 4 * 1024 * 1024 * 2048 ? 'lvm' : "dos"; #- default to LVM on full disk when >4TB
}