diff options
author | Stew Benedict <stewb@mandriva.org> | 2001-03-14 21:45:42 +0000 |
---|---|---|
committer | Stew Benedict <stewb@mandriva.org> | 2001-03-14 21:45:42 +0000 |
commit | 75085b969b939ac9ca5ebdf1fe7c36ea4a36b8f5 (patch) | |
tree | cc1990314a60d37bd1d3b12b0dcb29fcb5f99892 /perl-install | |
parent | 5889d46fd238fbf99b0e7c52360466e7b9f086ce (diff) | |
download | drakx-75085b969b939ac9ca5ebdf1fe7c36ea4a36b8f5.tar drakx-75085b969b939ac9ca5ebdf1fe7c36ea4a36b8f5.tar.gz drakx-75085b969b939ac9ca5ebdf1fe7c36ea4a36b8f5.tar.bz2 drakx-75085b969b939ac9ca5ebdf1fe7c36ea4a36b8f5.tar.xz drakx-75085b969b939ac9ca5ebdf1fe7c36ea4a36b8f5.zip |
fix bootstrap partition creation/tracking
allow Xpmac to launch in 2 modes based on cmdline
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 6 | ||||
-rw-r--r-- | perl-install/install_steps_gtk.pm | 3 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 14 | ||||
-rw-r--r-- | perl-install/partition_table_mac.pm | 3 |
4 files changed, 23 insertions, 3 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index c7b01259e..b7e30f40d 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -501,6 +501,12 @@ sub install_yaboot($$$) { } } log::l("Installing boot loader..."); + close F; + my $f = "$prefix/tmp/of_boot_dev"; + open F, ">$f" or die "cannot create file: $f"; + my $of_dev = get_of_dev($prefix, $lilo->{boot}); + print F "$of_dev"; + close F; $::testing and return; run_program::rooted($prefix, "/sbin/ybin", "2>", "/tmp/.error") or die "ybin failed"; unlink "$prefix/tmp/.error"; diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 8b6e623a2..cdd84d41b 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -47,10 +47,11 @@ sub new($$) { my $launchX = sub { my $ok = 1; + my $xpmac_opts = cat_("/proc/cmdline"); local $SIG{CHLD} = sub { $ok = 0 if waitpid(-1, c::WNOHANG()) > 0 }; unless (fork) { exec $_[0], (arch() =~ /^sparc/ || arch() eq "ppc" ? () : ("-kb")), "-dpms","-s" ,"240", - ($_[0] =~ /Xpmac/ ? ("-mode", "17", "-depth", "32") : ()), + ($_[0] =~ /Xpmac/ ? $xpmac_opts !~ /ofonly/ ? ("-mode", "17", "-depth", "32") : ("-mach64"):()), ($_[0] =~ /Xsun/ || $_[0] =~ /Xpmac/ ? ("-fp", "/usr/X11R6/lib/X11/fonts:unscaled") : ("-allowMouseOpenFail", "-xf86config", $f)) or exit 1; } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index c5eed7281..a8fe951b7 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -331,7 +331,10 @@ Continue at your own risk!")); if (defined $partition_table_mac::freepart_start && $partition_table_mac::freepart_size >= 1) { my ($hd) = $partition_table_mac::freepart_device; log::l("creating bootstrap partition on drive /dev/$hd->{device}, block $partition_table_mac::freepart_start"); + $partition_table_mac::bootstrap_part = $partition_table_mac::freepart_part; + log::l("bootstrap now at $partition_table_mac::bootstrap_part"); fsedit::add($hd, { start => $partition_table_mac::freepart_start, size => 1 << 11, type => 0x401, mntpoint => '' }, $o->{hds}, { force => 1, primaryOrExtended => 'Primary' }); + run_program::run("hformat", $partition_table_mac::bootstrap_part) or die "hformat of $partition_table_mac::bootstrap_part failed"; } else { die "no free space for 1MB bootstrap"; } @@ -958,7 +961,16 @@ try to force installation even if that destroys the first partition?")); grep { !/^Warning:/ } cat_("$o->{prefix}/tmp/.error") ]); unlink "$o->{prefix}/tmp/.error"; die "already displayed"; - } + } elsif (arch() =~ /ppc/) { + open(FILE, "$o->{prefix}/tmp/of_boot_dev") || die "Can't open $o->{prefix}/tmp/of_boot_dev"; + my $of_boot = ""; + local $_ = ""; + while (<FILE>){ + $of_boot = $_; + } + unlink "$o->{prefix}/tmp/.error"; + $o->ask_warn('', _("You will need to change your Open Firmware boot-device to\n enable the bootloader. Hold down Command-Option-O-F\n at reboot and enter:\n setenv boot-device $of_boot,\\ofboot.b\n Then type: shut-down\nAt your next boot you should see the bootloader prompt.")); + } } } diff --git a/perl-install/partition_table_mac.pm b/perl-install/partition_table_mac.pm index c4c85d799..52486a776 100644 --- a/perl-install/partition_table_mac.pm +++ b/perl-install/partition_table_mac.pm @@ -2,7 +2,7 @@ package partition_table_mac; # $Id$ use diagnostics; #use strict; - fixed other PPC code to comply, but program bails on empty partition table - sbenedict -use vars qw(@ISA $freepart_device $bootstrap_part $freepart_start $freepart_size $macos_part); +use vars qw(@ISA $freepart_device $bootstrap_part $freepart_start $freepart_size $freepart_part $macos_part); @ISA = qw(partition_table_raw); @@ -144,6 +144,7 @@ sub read($$) { $freepart_start = $h{start}; $freepart_size = $h{size}/2048; $freepart_device = $hd; + $freepart_part = "/dev/" . $hd->{device} . ($i+1); log::l("free apple partition found on drive /dev/$freepart_device->{device}, block $freepart_start, size $freepart_size"); } next; |