From 5efd89130d82b9e6f2f6e77654cc323a364ed413 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 9 Sep 2004 03:30:58 +0000 Subject: handles the lilo case where it wants to assign a new Volume ID: prompt the user, then - if it doesn't want to modify the Volume ID, use static-bios-codes to be able to install lilo - otherwise call lilo with answer "n" to the question "Is the above disk an NT boot disk?" so that it assigns a new Volume ID --- perl-install/any.pm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/any.pm b/perl-install/any.pm index 7ac2be7c2..515914210 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -111,6 +111,7 @@ sub installBootloader { eval { run_program::rooted($::prefix, 'lilo', '-u') } if $::isInstall && !$::o->{isUpgrade} && -e "$::prefix/etc/lilo.conf" && glob("$::prefix/boot/boot.*"); + retry: eval { my $_w = $in->wait_message(N("Please wait"), N("Bootloader installation in progress")); bootloader::install($b, $all_hds); @@ -121,8 +122,22 @@ sub installBootloader { $err =~ s/^\w+ failed// or die; $err = formatError($err); while ($err =~ s/^Warning:.*//m) {} - $in->ask_warn('', [ N("Installation of bootloader failed. The following error occurred:"), $err ]); - return; + if (my ($dev) = $err =~ /^Reference:\s+disk\s+"(.*?)".*^Is the above disk an NT boot disk?/ms) { + if ($in->ask_yesorno('', +formatAlaTeX(N("LILO wants to assign a new Volume ID to drive %s. However, changing +the Volume ID of a Windows NT, 2000, or XP boot disk is a fatal Windows error. +This caution does not apply to Windows 95 or 98, or to NT data disks. + +Assign a new Volume ID?", $dev)))) { + $b->{force_lilo_answer} = 'n'; + } else { + $b->{'static-bios-codes'} = 1; + } + goto retry; + } else { + $in->ask_warn('', [ N("Installation of bootloader failed. The following error occurred:"), $err ]); + return; + } } elsif (arch() =~ /ppc/) { my $of_boot = cat_("$::prefix/tmp/of_boot_dev") || die "Can't open $::prefix/tmp/of_boot_dev"; chop($of_boot); -- cgit v1.2.1