postinst: depmod needs version info

Bug #239062 reported by John Simon
20
Affects Status Importance Assigned to Milestone
virtualbox-ose-modules (Ubuntu)
Fix Released
Medium
Daniel Hahler
Hardy
Fix Released
Undecided
Unassigned

Bug Description

module postinst script need to run depmod to update module.dep: current postinst reads like this:

  /sbin/depmod -q || true

but if the user is running different version of the kernel during install, e.g. running 2.6.24-17 when installing 2.6.24-18, depmod creates modules.dep in /lib/modules/2.6.24-17-generic, not in /lib/modules/2.6.24-18-generic

it would be better put version infomation to depmod line, e.g.

  /sbin/depmod 2.6.24-18-generic -q || true

Revision history for this message
Paul Rensing (paulrensing) wrote :

I am seeing the affect of this, too. In the last 2-3 kernel updates, I have updated the kernel, but the VirtualBox modules lag by a couple of days. Once the VB modules are installed, I reboot to the new kernel. When I try to run VB, it fails because the kernel is not installed. Running "depmod -a" fixes the problem. Somehow, this should be done automatically.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Thank you for this bug report.
It makes sense a lot and I'll add that info.
Somehow I believe bug 210127 may have been caused by this, too.

Changed in virtualbox-ose-modules:
assignee: nobody → blueyed
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox-ose-modules - 25

---------------
virtualbox-ose-modules (25) intrepid; urgency=low

  * Use kernel version in call to depmod (LP: #239062)
    - Move debian/vboxadd.postinst{,.in}, debian/vboxdrv.postinst{,.in}
    - debian/rules: substitute @@KVER@@ in the new postinst.in files
  * Remove debian/get-control-field.pl: added in 24.2, but not used

 -- Daniel Hahler <email address hidden> Wed, 11 Jun 2008 23:17:40 +0200

Changed in virtualbox-ose-modules:
status: In Progress → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

I'm proposing this for Hardy (see the attached diff, which is quite large, because of the renaming of the two postinst files).

There have been several bug reports, where users had to run "depmod" after installation, so this fix makes the package a lot more usable, given the scenario, where you're installing a new kernel along with the modules (using the old kernel).

TEST CASE: install virtualbox-ose-modules in another kernel than the one it's intended for. Reboot to the new kernel for the modules. vboxdrv should be available, without running depmod manually.

The regression potential is low.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 239062] [NEW] postinst: depmod needs version info

Is this a regression or does it cause a crash (i.e. What SRU criteria do
you think this meets)?

...... Original Message .......
On Wed, 11 Jun 2008 22:32:16 -0000 Launchpad Bug Tracker
<email address hidden> wrote:
>You have been subscribed to a public bug by Daniel Hahler (blueyed):
>
>module postinst script need to run depmod to update module.dep: current
>postinst reads like this:
>
> /sbin/depmod -q || true
>
>but if the user is running different version of the kernel during
>install, e.g. running 2.6.24-17 when installing 2.6.24-18, depmod
>creates modules.dep in /lib/modules/2.6.24-17-generic, not in
>/lib/modules/2.6.24-18-generic
>
>it would be better put version infomation to depmod line, e.g.
>
> /sbin/depmod 2.6.24-18-generic -q || true
>
>** Affects: virtualbox-ose-modules (Ubuntu)
> Importance: Medium
> Assignee: Daniel Hahler (blueyed)
> Status: Fix Released
>
>** Affects: virtualbox-ose-modules (Ubuntu Hardy)
> Importance: Undecided
> Status: New
>
>--
>postinst: depmod needs version info
>https://bugs.edge.launchpad.net/bugs/239062
>You received this bug notification because you are a member of MOTU Stable
Release Updates, which is a direct subscriber.
>

Revision history for this message
Daniel Hahler (blueyed) wrote :

It's neither a regression or a crash, so it fits:
"Bugs which do not fit under above categories, but (1) have an obviously safe patch and (2) affect an application rather than critical infrastructure packages (like X.org or the kernel)."

It does not really rectify a SRU by itself probably, but given that there's a new v-o-m in hardy-proposed already (for the new kernel ABI), I think adding this fix to it makes a lot of sense. Otherwise the next push of the kernel to -updates (if the modules and kernel should get finally copied together) will cause above mentioned problems.

Revision history for this message
Luke Yelavich (themuso) wrote :

ACK.

Changed in virtualbox-ose-modules:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into hardy-proposed; please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in virtualbox-ose-modules (Ubuntu Hardy):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Paul Elliott (omahn) wrote :

virtualbox-ose-modules in hardy-proposed verified, these are the steps I took to verify:

HARDY
1. Booted into 2.6.24-21-generic
2. apt-get install virtualbox virtualbox-ose-modules-2.6.24-23-generic
3. Rebooted into 2.6.24-23-generic
4. Attempt to run virtualbox gives:
WARNING: The character device /dev/vboxdrv does not exist.
  Please install the virtualbox-ose-modules package for your kernel,
  which is likely virtualbox-ose-modules-generic.

  You will not be able to start VMs until this problem is fixed.
5. Manually running 'depmod -a' followed by 'modprobe vboxdrv' resolves the problem.

PROPOSED
1. Booted into 2.6.24-21-generic
2. Installed 2.6.24-24-generic kernel from hardy-proposed to test the hardy-proposed version of virtualbox-ose-modules (no 2.6.24-23 version is available)
3. apt-get install virtualbox virtualbox-ose-modules-2.6.24-24-generic
4. Rebooted into 2.6.24-24-generic
5. Running virtualbox works successfully.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox-ose-modules - 24.0.10

---------------
virtualbox-ose-modules (24.0.10) hardy-proposed; urgency=low

  * Rebuild for 2.6.24-24 (LP: #349622)
    - debian/control: s/2.6.24-23/2.6.24-24/g
  * Use kernel version in call to depmod (LP: #239062)
    - Move debian/vboxadd.postinst{,.in}, debian/vboxdrv.postinst{,.in}
    - debian/rules: substitute @@KVER@@ in the new postinst.in files

 -- Daniel Hahler <email address hidden> Mon, 30 Mar 2009 23:16:26 +0200

Changed in virtualbox-ose-modules (Ubuntu Hardy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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