Should not display warning about modules directory for official kernels

Bug #10887 reported by Jan
6
Affects Status Importance Assigned to Milestone
kernel-package (Ubuntu)
Fix Released
High
Matt Zimmerman

Bug Description

It's about time to teach debconf to stop asking the following obsolete question
every time a new kernel is installed. It is triggered by the presence of
/lib/modules/2.6.9-1-686/build symlink added by the same script. It should be
able to tell the difference !

>You are attempting to install a kernel image (version 2.6.9-1-686)
>However, the directory /lib/modules/2.6.9-1-686 still exists. If this
>directory belongs to a previous linux-image-2.6.9-1-686 package, and if
>you have deselected some modules, or installed standalone modules
>packages, this could be bad. However, if this directory exists because
>you are also installing some stand alone modules right now, and they
>got unpacked before I did, then this is pretty benign. Unfortunately,
>I can not tell the difference.

>If /lib/modules/2.6.9-1-686 belongs to a old install of
>linux-image-2.6.9-1-686, then this is your last chance to abort the
>installation of this kernel image (nothing has been changed yet).

>If this directory is because of stand alone modules being installed
>right now, or if it does belong to an older linux-image-2.6.9-1-686
>package but you know what you are doing, and if you feel that this
>image should be installed despite this anomaly, Please answer n to the
>question.

>Otherwise, I suggest you move /lib/modules/2.6.9-1-686 out of the way,
>perhaps to /lib/modules/2.6.9-1-686.old or something, and then try
>re-installing this image.
>Do you want to stop now? [Y/n]

Revision history for this message
Matt Zimmerman (mdz) wrote :

This was fixed a long time ago for the right cases:

kernel-package (8.066) unstable; urgency=low

  * to default target for mips(el) changed between 2.4 and 2.5. Applied a
    patch from Guido Guenther <email address hidden> to fix this.
                                                       closes: Bug#214590
  * Disable the "out of the way" warning in image.preinst
    when these conditions are met:
       1. This is an official kernel (perhaps a substitution in the preinst?)
       2. This is an upgrade.
    The reason is that when I make bug fix releases that do not change the
    ABI, modules compiled for the previous kernel will continue to
    work. Unfortunately, the users tend to be scared off by the "out of
    the way" warning and end up aborting the install and filing a bug.
    Made it so. closes: Bug#214529

 -- Manoj Srivastava <email address hidden> Tue, 7 Oct 2003 11:23:43 -0500

Are you not using an official kernel?

Revision history for this message
Jan (debian-gepro) wrote :

Sorry. It was definitely not fixed. The same message popped yesterday when installing new 2.6.10 kernel image in
Hoary. As usual preinst creates the "build" symlink BEFORE checking the modules directory is empty.

Revision history for this message
Matt Zimmerman (mdz) wrote :

This doesn't happen to me, ever, with official kernels. Please attach your
/etc/kernel-img.conf, and send the output from "grep official
/var/lib/dpkg/info/linux-image-`uname -r`"

Revision history for this message
Jan (debian-gepro) wrote :

(In reply to comment #3)
> This doesn't happen to me, ever, with official kernels. Please attach your
> /etc/kernel-img.conf, and send the output from "grep official
> /var/lib/dpkg/info/linux-image-`uname -r`"

Here is it

kuznik@ubuntu:~ $ cat /etc/kernel-img.conf
# Do not create symbolic links in /
do_symlinks = yes
relative_links = yes
do_bootloader = yes
do_bootfloppy = no
do_initrd = yes
link_in_boot = no

kuznik@ubuntu:/var/lib/dpkg/info $ grep official linux-image-2.6.10-1-686.*
linux-image-2.6.10-1-686.postinst:my $official_image = "YES"; # only
true for official images
linux-image-2.6.10-1-686.postinst:if ($official_image =~ /^\s*YES\s*$/o && $arch
=~ m/powerpc/) {
linux-image-2.6.10-1-686.postrm:my $official_image = "YES"; # only true
for official images
linux-image-2.6.10-1-686.preinst:my $official_image = "YES"; # only true for
official images
linux-image-2.6.10-1-686.preinst:if ($official_image =~ /^\s*YES\s*$/o
linux-image-2.6.10-1-686.prerm:my $official_image = "YES"; # only true
for official images

It is a normal Warty installation now upgraded to Hoary.
I am using the LILO loader, installation was done in expert mode.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I don't see how this could happen; please include a complete transcript of the
upgrade process the next time this happens, showing the version numbers of all
kernel packages involved.

my $official_image = "YES"; # only true for official images
[...]
# Official images may silently upgrade
if ($official_image =~ /^\s*YES\s*$/o
    && ($ARGV[0] =~ /upgrade/ || $arch =~ m/powerpc/)) {
    $silent_modules = 'Yes';
  }
[...]
  elsif ($silent_modules !~ m/YES/i) {
    print STDERR <<EOF;
You are attempting to install a kernel image (version $version)
However, the directory /lib/modules/$version still exists. If this

Revision history for this message
Jan (debian-gepro) wrote :

I got it with today's kernel upgrade. Please note the output of the following
command
executed just before the installation of the package linux-image-2.6.10-2:

   root@ubuntu:~ # ls -l /lib/modules/2.6.10-2-686
   lrwxrwxrwx 1 root root 35 2005-01-14 01:26 build ->
/usr/src/linux-headers-2.6.10-2-686

   root@ubuntu:~ # dpkg -S /lib/modules/2.6.10-2-686/build
   linux-headers-2.6.10-2-686: /lib/modules/2.6.10-2-686/build

The problem is linux headers installs first and polutes the modules directory
with the
'build' symlink. This later triggers the response of linux-image installer.

Since Ubuntu developpers apparently do not install linux-headers, this problem
escaped detection up to now. I suggest the preinst script is taught to ignore
/lib/modules/.../build.

Revision history for this message
Matt Zimmerman (mdz) wrote :

(In reply to comment #6)
> I got it with today's kernel upgrade. Please note the output of the following
> command
> executed just before the installation of the package linux-image-2.6.10-2:

Please read comment #4; I requested some information from you.

> Since Ubuntu developpers apparently do not install linux-headers, this problem
> escaped detection up to now. I suggest the preinst script is taught to ignore
> /lib/modules/.../build.

I have three systems within as many feet of me which have linux-headers-<arch>
installed, and have never seen this problem. No one other than you has reported
this problem in Ubuntu.

So while this may seem simple to you, it is clear that there is more to the
problem than this, and you aren't helping to solve the problem by repeatedly
asserting the same things. Note (again) that the code in question is
conditionalized on $silent_modules, which should always be YES in official
Ubuntu kernels. What we need to find out is why this is not the case on your
system.

Revision history for this message
Jan (debian-gepro) wrote :

I am giving up. Saving one keystroke during upgrade is not worth the effort especialy if only me is
affected. I recon there are more important problems to solve.
Sorry for initiating this.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I have managed to reproduce this bug locally

Revision history for this message
Matt Zimmerman (mdz) wrote :

kernel-package (8.119ubuntu3) hoary; urgency=low

  * Use $silent_modules=Yes for official images on initial installation, not
    only on upgrade (Ubuntu bug #10887)

 -- Matt Zimmerman <email address hidden> Tue, 8 Feb 2005 12:29:07 -0800

This bug will be fixed with the next release of the linux kernel packages (they
need to be rebuilt with the new kernel-package)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.