From 675d2b62098dd84c35c37944a1e8bd65114c37a1 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 27 Mar 2015 07:53:37 -0400 Subject: fix tagging LVM/raid as "linux filesystem" with GPT --- perl-install/partition_table/gpt.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'perl-install/partition_table') diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index dde111151..6b302017b 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -148,9 +148,17 @@ sub write { local $part->{fs_type} = 'linux-swap(v1)' if isSwap($part->{fs_type}); local $part->{fs_type} = 'ntfs' if $part->{fs_type} eq 'ntfs-3g'; c::disk_add_partition($hd->{file}, $o_start, $o_size, $part->{fs_type}) or die "failed to add partition #$part_number on $hd->{file}"; + my $flag; if (isESP($part)) { - c::set_partition_flag($hd->{file}, $part_number, 'ESP') - or die "failed to set type for $part->{file} on $part->{mntpoint}"; + $flag = 'ESP'; + } elsif (isRawLVM($part)) { + $flag = 'LVM'; + } elsif (isRawRAID($part)) { + $flag = 'RAID'; + } + if ($flag) { + c::set_partition_flag($hd->{file}, $part_number, $flag) + or die "failed to set type for $part->{file} on $part->{mntpoint}"; } } elsif ($action eq 'del' && !$partitions_killed) { c::disk_del_partition($hd->{file}, $part_number) or die "failed to del partition #$part_number on $hd->{file}"; -- cgit v1.2.1