Results 1 to 3 of 3

Thread: Broken restricted modules removal

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Beans
    3
    Distro
    Ubuntu 9.10 Karmic Koala

    Broken restricted modules removal

    Last week I upgraded the kernel from 2.6.28 to 2.6.31. I mistakenly removed the 2.6.28 directory from lib/modules without first actually removing them through apt-get. I completely forgot about this and recently tried removing the linux-image package for 2.6.28 through synaptic which also included the restricted drivers package. Since obviously the directory doesn't exist now, it failed. Now everytime I try any apt-get operation, like installing another package, it first tries to remove that restricted drivers package, fails and aborts without installing the packages I requested[1]. Please help me out of this sticky situation.

    [1]An example listing:

    Code:
    $ sudo apt-get install mit-scheme
    [sudo] password for anomit: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      libmcrypt4 libmhash2
    Suggested packages:
      libmcrypt-dev mcrypt mit-scheme-dbg
    The following packages will be REMOVED:
      linux-restricted-modules-2.6.28-18-generic
    The following NEW packages will be installed:
      libmcrypt4 libmhash2 mit-scheme
    0 upgraded, 3 newly installed, 1 to remove and 10 not upgraded.
    1 not fully installed or removed.
    Need to get 7,023kB of archives.
    After this operation, 16.9MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://archive.ubuntu.com karmic/universe libmcrypt4 2.5.8-3 [85.7kB]
    Get:2 http://archive.ubuntu.com karmic/main libmhash2 0.9.9-1build1 [114kB]
    Get:3 http://archive.ubuntu.com karmic/universe mit-scheme 7.7.90+20090107-1ubuntu1 [6,823kB]
    Fetched 7,023kB in 2min 1s (57.7kB/s)                                                                                         
    (Reading database ... 189334 files and directories currently installed.)
    Removing linux-restricted-modules-2.6.28-18-generic ...
    rmdir: failed to remove `/lib/modules/2.6.28-18-generic/volatile/': No such file or directory
    WARNING: Couldn't open directory /lib/modules/2.6.28-18-generic: No such file or directory
    FATAL: Could not open /lib/modules/2.6.28-18-generic/modules.dep.temp for writing: No such file or directory
    update-initramfs: Generating /boot/initrd.img-2.6.28-18-generic
    Cannot find /lib/modules/2.6.28-18-generic
    update-initramfs: failed for /boot/initrd.img-2.6.28-18-generic
    dpkg: error processing linux-restricted-modules-2.6.28-18-generic (--remove):
     subprocess installed post-removal script returned error exit status 1
    Errors were encountered while processing:
     linux-restricted-modules-2.6.28-18-generic
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Last edited by anomit; April 30th, 2010 at 09:22 AM.

  2. #2
    Join Date
    Apr 2006
    Beans
    21

    Re: Broken restricted modules removal

    Try making an empty directory in /lib/modules:
    Code:
    sudo mkdir /lib/modules/2.6.28-18-generic

  3. #3
    Join Date
    May 2010
    Beans
    1

    Re: Broken restricted modules removal

    I got the same trouble. To solve it just copy another folder like 2.6.32-22-generic to /lib/modules and rename it to what you need, then try remove the package by apt-get.

    paul

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •