the k-p legacy code seems to assume that bootloaders have no initrd/initramfs support: http://piuparts.debian.org/sid/fail/linux-image-2.6.30-1-amd64_2.6.30-3.log
i propose to nuke that hole section, as any recent (e)lilo.conf has an initrd support. also any recent bootloader must just support initrd/initramfs. as bonus linux-2.6 images are easily installed in chroots without stupid do_initrd set in /etc/kernel-img.conf also gets rid of 4 ambigous debconf templates. -- maks proposed patch with ETA next week monday diff --git a/linux-2.6/debian/templates/temp.image.plain/preinst b/linux-2.6/debian/templates/temp.image.plain/preinst index f7f9184..2774e42 100755 --- a/linux-2.6/debian/templates/temp.image.plain/preinst +++ b/linux-2.6/debian/templates/temp.image.plain/preinst @@ -34,8 +34,6 @@ my $do_bootfloppy = "Yes"; # target machine defined my $do_bootloader = "Yes"; # target machine defined my $move_image = ''; # target machine defined my $mkimage = "=M"; # command to generate the initrd image -my $do_initrd = ''; # target machine defined -my $warn_initrd = 'YES'; # target machine defined my $kimage = "=K"; # Should be empty, mostly my $loader = "=L"; # lilo, silo, quik, palo, vmelilo, nettrom # or elilo @@ -121,8 +119,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) { $do_boot_enable = '' if /do_boot_enable\s*=\s*(no|false|0)\s*$/ig; $do_bootfloppy = '' if /do_bootfloppy\s*=\s*(no|false|0)\s*$/ig; $do_bootloader = '' if /do_bootloader\s*=\s*(no|false|0)\s*$/ig; - $do_initrd = '' if /do_initrd\s*=\s*(no|false|0)\s*$/ig; - $warn_initrd = '' if /warn_initrd\s*=\s*(no|false|0)\s*$/ig; $relative_links = '' if /relative_links \s*=\s*(no|false|0)\s*$/ig; $use_hard_links = '' if /use_hard_links\s*=\s*(no|false|0)\s*$/ig; $silent_modules = '' if /silent_modules\s*=\s*(no|false|0)\s*$/ig; @@ -143,8 +139,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) { $do_bootfloppy = "Yes" if /do_bootfloppy\s*=\s*(yes|true|1)\s*$/ig; $do_bootloader = "Yes" if /do_bootloader\s*=\s*(yes|true|1)\s*$/ig; $relative_links = "Yes" if /relative_links\s*=\s*(yes|true|1)\s*$/ig; - $do_initrd = "Yes" if /do_initrd\s*=\s*(yes|true|1)\s*$/ig; - $warn_initrd = "Yes" if /warn_initrd\s*=\s*(yes|true|1)\s*$/ig; $use_hard_links = "Yes" if /use_hard_links\s*=\s*(yes|true|1)\s*$/ig; $silent_modules = 'Yes' if /silent_modules\s*=\s*(yes|true|1)\s*$/ig; $silent_loader = 'Yes' if /silent_loader\s*=\s*(yes|true|1)\s*$/ig; @@ -168,9 +162,6 @@ if (-r "$CONF_LOC" && -f "$CONF_LOC" ) { } } -if ($do_initrd) { $warn_initrd = ''; } -if (!$warn_initrd) { $do_initrd = "YES";} - $ENV{KERNEL_ARCH}=$kernel_arch if $kernel_arch; # About to upgrade this package from version $2 TO THIS VERSION. @@ -232,91 +223,6 @@ if ($initrd) { } -if ($initrd && !$do_initrd) { - my $ret; - my $seen; - my $answer; - my $invisible = 0; - my $question = "${package_name}/preinst/bootloader-initrd-$version"; - if ($loader =~ m/^lilo/i) { - $question = "${package_name}/preinst/lilo-initrd-$version"; - } - elsif ($loader =~ m/^elilo/i) { - $question = "${package_name}/preinst/elilo-initrd-$version"; - } - ($ret,$seen) = fset ("$question", 'seen', 'false'); - die "Error setting debconf flags in $question: $seen" if $ret; - - ($ret,$seen) = input('critical', "$question"); - if ($ret && $ret != 30 ) { - die "Error setting debconf question $question: $seen"; - } - $invisible = $ret if $ret == 30; - - ($ret,$seen) = go (); - if ($ret && $ret != 30 ) { - die "Error asking debconf question $question: $seen"; - } - - ($ret,$answer) = get("$question"); - die "Error retreiving answer for $question: $answer" if $ret; - - my $note = "${package_name}/preinst/lilo-has-ramdisk"; - if (-f "/etc/lilo.conf"){ - my $ramdisk_found = 0; - open (CONF, "/etc/lilo.conf") or warn "Can't open /etc/lilo.conf: $!"; - while (<CONF>) { - chomp; - if (m/^(\s*ramdisk\s*=\s*0)/g) { - my $line = $1; - - ($ret,$seen) = fset ("$note", 'seen', 'false'); - die "Error setting debconf flags in $note: $seen" if $ret; - - $ret = subst("$note", 'LINE', "$line"); - die "Error setting debconf substitutions in $note: $seen" if $ret; - - ($ret,$seen) = input('medium', "$note"); - if ($ret && $ret != 30 ) { - die "Error setting debconf note $note: $seen"; - } - - ($ret,$seen) = go (); - if ($ret && $ret != 30 ) { - die "Error asking debconf question $note: $seen"; - } - last; - } - } - close CONF; - } - $answer =~ s/^\s+//; - $answer =~ s/\s+$//; - print STDERR "Ok, Aborting, since the bootloader might not handle " . - "an initrd/initramfs image.\n" unless $answer =~ /^(f|n)/i; - if ($answer !~ /^(f|n)/i && $invisible) { - my $note = "${package_name}/preinst/abort-install-$version"; - - ($ret,$seen) = fset ("$note", 'seen', 'false'); - die "Error setting debconf flags in $note: $seen" if $ret; - - ($ret,$seen) = fset ("$note", 'seen', 'false'); - die "Error setting debconf flags in $note: $seen" if $ret; - - ($ret,$seen) = input('critical', "$note"); - if ($ret && $ret != 30 ) { - die "Error setting debconf note $note: $seen"; - } - - ($ret,$seen) = go (); - if ($ret && $ret != 30 ) { - die "Error asking debconf question $note: $seen"; - } - } - exit 1 unless $answer =~ /^(f|n)/i; -} - - sub check { my $version = shift; my $lib_modules="$modules_base/$version"; diff --git a/linux-2.6/debian/templates/temp.image.plain/templates b/linux-2.6/debian/templates/temp.image.plain/templates index c34d00f..f9a747e 100644 --- a/linux-2.6/debian/templates/temp.image.plain/templates +++ b/linux-2.6/debian/templates/temp.image.plain/templates @@ -12,86 +12,6 @@ Description: Initial RAMdisk image generation impossible . ${initrddep} -Template: =ST-image-=V/preinst/bootloader-initrd-=V -Type: boolean -Default: true -Description: Abort initrd kernel image installation? - You are attempting to install an initrd kernel image (version =V). - This will not work unless the boot loader is configured to use an - initrd. - . - An initrd image is a kernel image that expects to use an INITial - Ram Disk to mount a minimal root file system into RAM and use that for - booting. - . - The boot loader must be configured to use such images and the system will not - boot until this is done. - . - This message will appear for any new kernel installation unless the - following is added to /etc/kernel-img.conf: - . - "do_initrd = Yes" - -Template: =ST-image-=V/preinst/lilo-initrd-=V -Type: boolean -Default: true -Description: Abort initrd kernel image installation? - You are attempting to install an initrd kernel image (version =V). - This will not work unless the boot loader is configured to use an - initrd. - . - In order to configure LILO, you need to add - 'initrd=/initrd.img' to the image=/vmlinuz stanza of /etc/lilo.conf. - . - The boot loader must be configured to use such images and the system will not - boot until this is done. - . - This message will appear for any new kernel installation unless the - following is added to /etc/kernel-img.conf: - . - "do_initrd = Yes" - -Template: =ST-image-=V/preinst/elilo-initrd-=V -Type: boolean -Default: true -Description: Abort initrd kernel image installation? - You are attempting to install an initrd kernel image (version =V). - This will not work unless the boot loader is configured to use an - initrd. - . - In order to configure LILO, you need to add - 'initrd=/initrd.img' to the image=/vmlinuz stanza of /etc/elilo.conf. - . - The boot loader must be configured to use such images and the system will not - boot until this is done. - . - This message will appear for any new kernel installation unless the - following is added to /etc/kernel-img.conf: - . - "do_initrd = Yes" - -Template: =ST-image-=V/preinst/lilo-has-ramdisk -Type: text -Description: Removal of 'ramdisk' in /etc/lilo.conf - The following line in /etc/lilo.conf should be removed or commented out, - since the system uses initrd (or initramfs): - . - ${LINE} - -Template: =ST-image-=V/preinst/abort-install-=V -Type: note -Description: Aborting install of unsupported initrd kernel image - You are attempting to install an initrd kernel image (version =V). - This will not work unless the boot loader is configured to use an - initrd. - . - An initrd image is a kernel image that expects to use an INITial - Ram Disk to mount a minimal root file system into RAM and use that for - booting. - . - As the question that's relevant for this situation - was not shown, =ST-image-=V installation has been aborted. - Template: =ST-image-=V/preinst/failed-to-move-modules-=V Type: note Description: Modules removal failure -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org