Current drakboot and lilo do no work together. there are several problems.
bor@localhost% rpm -q lilo
lilo-0.21.7-11mdk
bor@localhost% rpm -q drakxtools-1.1.5-101mdk
drakxtools-1.1.5-101mdk
1. lilo layout has changed. drakboot expects files /boot/boot-menu.b,
/boot/boo-graphic.b, /boot/message-graphic.
Instead, current lilo has directories /boot/lilo-{text,menu,graphic}
2. If you switch from graphic to text-menu, drakboot will reuse old
graphic message with very funny effects. It happens because drakboot first
reads old configuration, and as part it reads current message file. It
then simply puts this file back when creating configuration.
The atached patch is just a proof of concept. It assumes, that we have
/boot/boo.b -> lilo/boot
/boot/message -> lilo/message
and
lilo -> lilo-{menu,text,graphic} (that is controlled by drakboot). It
needs new lilo RPM which include correct link for /boot/message
The patch just tests if /boot/lilo/message exists and is using default
text if not. So, it will never reuse old one. If it is accepted it could
be optimized a bit more. It works here (after I've created message link).
-andrej
--- any.pm.org Wed Apr 25 16:36:37 2001
+++ any.pm Sat May 5 22:56:33 2001
@@ -127,13 +127,13 @@
my %bootloaders = (if_(exists $b->{methods}{silo},
__("SILO") => sub {
$b->{methods}{silo} = 1 }),
if_(exists $b->{methods}{lilo},
- __("LILO with text menu") => sub {
$b->{methods}{lilo} = "boot-menu.b" },
- __("LILO with graphical menu") => sub {
$b->{methods}{lilo} = "boot-graphic.b" }),
+ __("LILO with text menu") => sub {
+$b->{methods}{lilo} = "lilo-menu" },
+ __("LILO with graphical menu") => sub {
+$b->{methods}{lilo} = "lilo-graphic" }),
if_(exists $b->{methods}{grub},
#- put lilo if grub is chosen, so that /etc/lilo.conf
is generated
__("Grub") => sub {
$b->{methods}{grub} = 1;
exists
$b->{methods}{lilo}
- and
$b->{methods}{lilo} = "boot-menu.b" }),
+ and
+$b->{methods}{lilo} = "lilo-menu" }),
if_(exists $b->{methods}{loadlin},
__("Boot from DOS/Windows (loadlin)") => sub {
$b->{methods}{loadlin} = 1 }),
if_(exists $b->{methods}{yaboot},
--- bootloader.pm.org Wed Apr 25 16:36:37 2001
+++ bootloader.pm Sat May 5 23:30:34 2001
@@ -380,8 +380,8 @@
);
unless ($lilo->{methods}) {
$lilo->{methods} ||= { map { $_ => 1 } grep { $l{$_} } keys %l };
- if ($lilo->{methods}{lilo} && -e "$prefix/boot/boot-graphic.b") {
- $lilo->{methods}{lilo} = "boot-graphic.b";
+ if ($lilo->{methods}{lilo} && -e "$prefix/boot/lilo-graphic") {
+ $lilo->{methods}{lilo} = "lilo-graphic";
exists $lilo->{methods}{grub} and $lilo->{methods}{grub} = undef;
}
}
@@ -590,9 +590,24 @@
my ($prefix, $lilo, $fstab, $hds) = @_;
$lilo->{prompt} = $lilo->{timeout};
- if ($lilo->{message}) {
+ #- try to use a specific stage2 if defined and present.
+ -d "$prefix/boot/$lilo->{methods}{lilo}" and symlinkf $lilo->{methods}{lilo},
+"$prefix/boot/lilo";
+ log::l("stage2 of lilo used is " . readlink "$prefix/boot/lilo");
+ if (! -e "$prefix/boot/lilo/message") {
+ my $msg_en =
+#-PO: these messages will be displayed at boot time in the BIOS, use only ASCII
+(7bit)
+__("Welcome to %s the operating system chooser!
+
+Choose an operating system in the list above or
+wait %d seconds for default boot.
+
+");
+ my $msg = translate($msg_en);
+ #- use the english version if more than 20% of 8bits chars
+ $msg = $msg_en if int(grep { $_ & 0x80 } unpack "c*", $msg) / length($msg) >
+0.2;
+ $msg = sprintf $msg, arch() =~ /sparc/ ? "SILO" : "LILO", $lilo->{timeout};
local *F;
- open F, ">$prefix/boot/message" and print F $lilo->{message} or
$lilo->{message} = 0;
+ open F, ">$prefix/boot/message" and print F $msg;
}
{
local *F;
@@ -616,13 +631,7 @@
print F "disk=/dev/$dev bios=0x80";
}
- if ($lilo->{message}) {
- if (-e "$prefix/boot/$lilo->{methods}{lilo}" && $lilo->{methods}{lilo} eq
"boot-graphic.b") {
- print F "message=/boot/message-graphic";
- } else {
- print F "message=/boot/message";
- }
- }
+ print F "message=/boot/message";
print F "menu-scheme=wb:bw:wb:bw";
foreach (@{$lilo->{entries}}) {
@@ -656,9 +665,6 @@
}
}
}
- #- try to use a specific stage2 if defined and present.
- -e "$prefix/boot/$lilo->{methods}{lilo}" and symlinkf $lilo->{methods}{lilo},
"$prefix/boot/boot.b";
- log::l("stage2 of lilo used is " . readlink "$prefix/boot/boot.b");
log::l("Installing boot loader...");
$::testing and return;
run_program::rooted_or_die($prefix, "lilo", "2>", "/tmp/.error");