diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-03-17 18:09:12 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-03-17 18:09:12 +0000 |
commit | 5abfffe151381e8a83a2437c78169c12918d28d5 (patch) | |
tree | 8903309fd3282ed7f4a1d910ccb7d4fd8879ae72 /perl-install/standalone | |
parent | 80b6b5d6cbcc7157abfcda55226c6b3a30766ebe (diff) | |
download | drakx-5abfffe151381e8a83a2437c78169c12918d28d5.tar drakx-5abfffe151381e8a83a2437c78169c12918d28d5.tar.gz drakx-5abfffe151381e8a83a2437c78169c12918d28d5.tar.bz2 drakx-5abfffe151381e8a83a2437c78169c12918d28d5.tar.xz drakx-5abfffe151381e8a83a2437c78169c12918d28d5.zip |
add "diskdrake --change-geometry=<device>=[<cylinders>,]<heads>,<sectors>" to
allow forcing the geometry used in the partition table. This allows helping
poor Windows booting using old int13 function 2. This should work when Windows
has not been resized.
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/diskdrake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index c539d3225..c7ad56590 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -45,7 +45,7 @@ while (my $e = shift @l) { } } -my @types = qw(hd nfs smb dav removable fileshare list-hd); +my @types = qw(hd nfs smb dav removable fileshare list-hd change-geometry); my ($type, $para) = ('hd', ''); foreach (@types) { if (exists $options{$_}) { @@ -80,6 +80,13 @@ $all_hds->{current_fstab} = fs::fstab_to_string($all_hds, ''); if ($type eq 'list-hd') { print partition_table::description($_), "\n" foreach fsedit::get_all_fstab($all_hds); +} elsif ($type eq 'change-geometry') { + $para =~ s|^/dev/||; + my ($device, undef, $heads, $sectors) = $para =~ /(.+)=(\d+,)?(\d+),(\d+)$/ or die "usage: diskdrake --change-geometry=<device>=[<cylinders>,]<heads>,<sectors>\n"; + my $hd = find { $_->{device} eq $device } @{$all_hds->{hds}}; + put_in_hash($hd->{geom}, { heads => $heads, sectors => $sectors }); + $hd->{isDirty} = 1; + partition_table::write($hd); } elsif ($type eq 'hd') { require diskdrake::interactive; diskdrake::interactive::main($in, $all_hds, 0, '', sub { |