[clue-tech] apt cleanup after jaunty upgrade

Angelo Bertolli angelo.bertolli at gmail.com
Sun Sep 6 16:32:38 MDT 2009


Jed S. Baer wrote:
> Hi Folks.
>
> I'm guessing my jaunty upgrade left me with a corrupted apt database.
> When I run apt operations, I get errors complaining about:
>
> Errors were encountered while processing:
>  linux-ubuntu-modules-2.6.24-17-generic
>  linux-ubuntu-modules-2.6.24-18-generic
>  linux-ubuntu-modules-2.6.24-19-generic
>
> I think it's trying to autoclean them, but ...
>
> jbaer at robinson:~/tmp$ ls -1 /lib/modules
> 2.6.24-21-generic
> 2.6.24-22-generic
> 2.6.24-23-generic
> 2.6.24-24-generic
> 2.6.28-15-generic
>
> ... they aren't there.
>
> Okay, long paste here, sorry.
>
> $ sudo apt-get purge linux-ubuntu-modules-2.6.24-17-generic
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following packages were automatically installed and are no longer
> required: libglib1.2ldbl libdb4.6++ libavutil1d libk3b3 libgtk1.2
> libpostproc1d libamrnb3 k3b-data libk3b3-extracodecs libamrwb3
> libswscale1d libgtk1.2-common imlib-base gdk-imlib11 libpoppler-qt2 Use
> 'apt-get autoremove' to remove them. The following packages will be
> REMOVED: linux-ubuntu-modules-2.6.24-17-generic
> linux-ubuntu-modules-2.6.24-18-generic
> linux-ubuntu-modules-2.6.24-19-generic 0 upgraded, 0 newly installed, 3
> to remove and 4 not upgraded. 3 not fully installed or removed. After
> this operation, 46.3MB disk space will be freed. Do you want to continue
> [Y/n]? y (Reading database ... 165948 files and directories currently
> installed.) Removing linux-ubuntu-modules-2.6.24-17-generic ...
> FATAL: Could not open '/boot/System.map-2.6.24-17-generic': No such file
> or directory update-initramfs:
> Generating /boot/initrd.img-2.6.24-17-generic Cannot
> find /lib/modules/2.6.24-17-generic update-initramfs: failed
> for /boot/initrd.img-2.6.24-17-generic dpkg: error processing
> linux-ubuntu-modules-2.6.24-17-generic (--remove): subprocess
> post-removal script returned error exit status 1 Removing
> linux-ubuntu-modules-2.6.24-18-generic ... FATAL: Could not open
> '/boot/System.map-2.6.24-18-generic': No such file or directory
> update-initramfs: Generating /boot/initrd.img-2.6.24-18-generic Cannot
> find /lib/modules/2.6.24-18-generic update-initramfs: failed
> for /boot/initrd.img-2.6.24-18-generic dpkg: error processing
> linux-ubuntu-modules-2.6.24-18-generic (--remove): subprocess
> post-removal script returned error exit status 1 Removing
> linux-ubuntu-modules-2.6.24-19-generic ... FATAL: Could not open
> '/boot/System.map-2.6.24-19-generic': No such file or directory
> update-initramfs: Generating /boot/initrd.img-2.6.24-19-generic Cannot
> find /lib/modules/2.6.24-19-generic update-initramfs: failed
> for /boot/initrd.img-2.6.24-19-generic dpkg: error processing
> linux-ubuntu-modules-2.6.24-19-generic (--remove): subprocess
> post-removal script returned error exit status 1 Errors were encountered
> while processing: linux-ubuntu-modules-2.6.24-17-generic
>  linux-ubuntu-modules-2.6.24-18-generic
>  linux-ubuntu-modules-2.6.24-19-generic
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> jbaer at robinson:~$
>
> So, it can't complete its script, because the files/directories aren't
> there.
>
> I pretty much have a full plate right now working on recovering from
> KDE4, so help with the above appreciated.
>   

You're not trying to upgrade from something before intrepid, right?  
I've seen this kind of thing happen when you skip a version.  I think 
the upgrade paths are only tested from previous to current.

If it's a kernel you're not using, and don't intend to use, you can just 
copy an existing System.map file to the one it's looking for.  (You're 
removing it anyway.)



Angelo



More information about the clue-tech mailing list