From 5abfffe151381e8a83a2437c78169c12918d28d5 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 17 Mar 2004 18:09:12 +0000 Subject: add "diskdrake --change-geometry==[,]," 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. --- perl-install/standalone/diskdrake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install') 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==[,],\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 { -- cgit v1.2.1