summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-02-23 18:51:22 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-02-23 18:51:22 +0000
commit0010e0c26d8674bd8a49babfbe84958d30ea4be6 (patch)
tree9d3066c7b4ed867fa7c1bf543cfb8ab07a8e9d5f /perl-install/install_any.pm
parent24f8b57f04273cbfab21ba00b01c828a91506b9b (diff)
downloaddrakx-0010e0c26d8674bd8a49babfbe84958d30ea4be6.tar
drakx-0010e0c26d8674bd8a49babfbe84958d30ea4be6.tar.gz
drakx-0010e0c26d8674bd8a49babfbe84958d30ea4be6.tar.bz2
drakx-0010e0c26d8674bd8a49babfbe84958d30ea4be6.tar.xz
drakx-0010e0c26d8674bd8a49babfbe84958d30ea4be6.zip
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm62
1 files changed, 62 insertions, 0 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 4e6464a2e..10572a2e1 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -706,4 +706,66 @@ sub move_desktop_file($) {
}
}
+sub ultra66 {
+ my ($o) = @_;
+
+ if (cat_("/proc/cmdline") !~ /ide2=/) {
+ require pci_probing::main;
+ my @l = map { $_->[0] } grep { $_->[1] =~ /(HPT|Ultra66)/ } pci_probing::main::probe('STORAGE_OTHER', 'more');
+ if (@l && $o->ask_yesorno('',
+_("Linux does not yet fully support ultra dma 66.
+As a work-around i can make a custom floppy giving access the hard drive on ide2 and ide3"), 1)) {
+ log::l("HPT|Ultra66: found");
+ my $ide = sprintf "ide2=0x%x,0x%x ide3=0x%x,0x%x",
+ map_index { hex($_) + (odd($::i) ? 1 : -1) } do {
+ if (@l == 2) {
+ map { (split ' ')[3..4] } @l
+ } else {
+ map { (split ' ')[3..6] } @l
+ }
+ };
+ log::l("HPT|Ultra66: gonna add ($ide)");
+
+ my $dev = devices::make("fd0");
+ my $image = $o->{pcmcia} ? "pcmcia" :
+ ${{ hd => 'hd', cdrom => 'cdrom',
+ ftp => 'network', nfs => 'network', http => 'network' }}{$o->{method}};
+
+ my $nb_try;
+ for ($nb_try = 0; $nb_try <= 1; $nb_try++) {
+ eval { fs::mount($dev, "/floppy", "vfat", 0) };
+ last if !$@ && -e "/floppy/syslinux.cfg";
+
+ eval { fs::umount("/floppy") };
+ $o->ask_warn('',
+_("Enter a floppy to create an HTP enabled boot
+(all data on floppy will be lost)"));
+ if (my $fd = getFile("$image.img")) {
+ my $w = $o->wait_message('', _("Creating bootdisk"));
+ local *OUT;
+ open OUT, ">$dev" or log::l("failed to write $dev"), return;
+ local $/ = \ (16 * 1024);
+ print OUT foreach <$fd>;
+ }
+ }
+ if (-e "/floppy/syslinux.cfg") {
+ log::l("HTP: modifying syslinux.cfg");
+ substInFile { s/(?=$)/ $ide/ if /^\s*append\s/ } "/floppy/syslinux.cfg";
+ fs::umount("/floppy");
+ log::l("HPT|Ultra66: all done");
+
+ $o->ask_warn('', $nb_try ?
+ _("It is necessary to restart installation booting on the floppy") :
+ _("It is necessary to restart installation with the new parameters"));
+ install_steps::rebootNeeded ($o);
+ } else {
+ $o->ask_warn('',
+_("Failed to create an HTP boot floppy.
+You may have to restart installation and give ``%s'' at the prompt", $ide));
+ }
+ }
+ }
+}
+
+
1;