diff options
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 5 | ||||
-rw-r--r-- | perl-install/fs/type.pm | 1 | ||||
-rw-r--r-- | perl-install/partition_table/raw.pm | 5 |
3 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index ef78889a1..bead96915 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -316,7 +316,7 @@ sub hd_possible_actions_interactive { sub Clear_all { my ($in, $hd, $all_hds) = @_; - + return if is_xbox(); #- do not let them wipe the OS my @parts = partition_table::get_normal_parts($hd); foreach (@parts) { RemoveFromLVM($in, $hd, $_, $all_hds) if isPartOfLVM($_); @@ -457,6 +457,9 @@ sub part_possible_actions { ); if (isEmpty($part)) { if_(!$hd->{readonly}, N_("Create")); + } elsif ($part->{pt_type} == 0xbf) { + #- XBox OS partitions, do not allow anything + return; } else { grep { my $cond = $actions{$_}; diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index caada6dfb..841d6e12b 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -138,6 +138,7 @@ if_(arch() !~ /ppc/, 0xb8 => '', 'BSDI swap', 0xbb => '', 'Boot Wizard hidden', 0xbe => '', 'Solaris boot', + 0xbf => '', 'Microsoft XBox OS Partitions', 0xc1 => '', 'DRDOS/sec (FAT-12)', 0xc4 => '', 'DRDOS/sec (FAT-16 < 32M)', 0xc6 => '', 'DRDOS/sec (FAT-16)', diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm index 28f0fc797..db1d40584 100644 --- a/perl-install/partition_table/raw.pm +++ b/perl-install/partition_table/raw.pm @@ -201,6 +201,11 @@ sub zero_MBR { bless $hd, "partition_table::$type"; $hd->{primary} = $hd->clear_raw; delete $hd->{extended}; + if (is_xbox()) { + my $part = { start => 1, size => 15632048, pt_type => 0x0bf, isFormatted => 1 }; + partition_table::dos::compute_CHS($hd, $part); + $hd->{primary}{raw}[0] = $part; + } } sub zero_MBR_and_dirty { |