kernel install errors updating any package

Asked by Wm Franklin

I have a standard 8.04 LTS desktop installation. Starting about a week ago, Synaptic starting giving an error on every update installation:

     E: linux-image-2.6.24-21-generic: subprocess post-installation script returned error exit status 2
     E: linux-ubuntu-modules-2.6.24-21-generic: dependency problems - leaving unconfigured

This culminated when I received the -22 kernel update, with the following set of errors:

     E: linux-image-2.6.24-21-generic: subprocess post-installation script returned error exit status 2
     E: linux-ubuntu-modules-2.6.24-21-generic: dependency problems - leaving unconfigured
     E: linux-image-2.6.24-22-generic: subprocess post-installation script returned error exit status 2
     E: linux-ubuntu-modules-2.6.24-22-generic: dependency problems - leaving unconfigured
     E: linux-image-generic: dependency problems - leaving unconfigured
     E: linux-restricted-modules-2.6.24-22-generic: dependency problems - leaving unconfigured
     E: linux-restricted-modules-generic: dependency problems - leaving unconfigured
     E: linux-generic: dependency problems - leaving unconfigured

Upon reboot, the -21 kernel was still active, and the -22 kernel was not to be offered by Grub. This bothers me for obvious reasons, and I'd like it fixed. Based on another Launchpad entry, I verified that the linux-restricted-modules-generic (version 2.6.24.22.24) is installed.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
marcobra (Marco Braida)
Solved:
Last query:
Last reply:
Revision history for this message
Florian Diesch (diesch) said :
#1

Please open a terminal window, type
 sudo apt-get upgrade > apt-upgrade.log
and post the content of apt-upgrade.log.

Revision history for this message
Florian Diesch (diesch) said :
#2

Please open a terminal window, type
 sudo apt-get upgrade > apt-upgrade.log
and post the content of apt-upgrade.log.

Revision history for this message
Wm Franklin (wjfranklin) said :
#3

Thanks for the information - here's what I did

1. tried to run the commend exactly as you specified, but nothing happened

2. reran it without the redirection, and saw that it hung because it was
asking me a question (which I couldn't answer because the question went into
the log file). But I did a Copy of all the terminal output, and here's what
I got:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up linux-image-2.6.24-21-generic (2.6.24-21.43) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.24-21-generic

*gzip: stdout: No space left on device*
update-initramfs: failed for /boot/initrd.img-2.6.24-21-generic
Failed to create initrd image.
dpkg: error processing linux-image-2.6.24-21-generic (--configure):
 subprocess post-installation script returned error exit status 2
Setting up linux-image-2.6.24-22-generic (2.6.24-22.45) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.24-22-generic

gzip: stdout: No space left on device
update-initramfs: failed for /boot/initrd.img-2.6.24-22-generic
Failed to create initrd image.
dpkg: error processing linux-image-2.6.24-22-generic (--configure):
 subprocess post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of
linux-ubuntu-modules-2.6.24-21-generic:
 linux-ubuntu-modules-2.6.24-21-generic depends on
linux-image-2.6.24-21-generic; however:
  Package linux-image-2.6.24-21-generic is not configured yet.
dpkg: error processing linux-ubuntu-modules-2.6.24-21-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of
linux-ubuntu-modules-2.6.24-22-generic:
 linux-ubuntu-modules-2.6.24-22-generic depends on
linux-image-2.6.24-22-generic; however:
  Package linux-image-2.6.24-22-generic is not configured yet.
dpkg: error processing linux-ubuntu-modules-2.6.24-22-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-2.6.24-22-generic; however:
  Package linux-image-2.6.24-22-generic is not configured yet.
 linux-image-generic depends on linux-ubuntu-modules-2.6.24-22-generic;
however:
  Package linux-ubuntu-modules-2.6.24-22-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of
linux-restricted-modules-2.6.24-22-generic:
 linux-restricted-modules-2.6.24-22-generic depends on
linux-image-2.6.24-22-generic; however:
  Package linux-image-2.6.24-22-generic is not configured yet.
dpkg: error processing linux-restricted-modules-2.6.24-22-generic
(--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of
linux-restricted-modules-generic:
 linux-restricted-modules-generic depends on
linux-restricted-modules-2.6.24-22-generic; however:
  Package linux-restricted-modules-2.6.24-22-generic is not configured yet.
dpkg: error processing linux-restricted-modules-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 2.6.24.22.24); however:
  Package linux-image-generic is not configured yet.
 linux-generic depends on linux-restricted-modules-generic (= 2.6.24.22.24);
however:
  Package linux-restricted-modules-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-2.6.24-21-generic
 linux-image-2.6.24-22-generic
 linux-ubuntu-modules-2.6.24-21-generic
 linux-ubuntu-modules-2.6.24-22-generic
 linux-image-generic
 linux-restricted-modules-2.6.24-22-generic
 linux-restricted-modules-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
bill@FamilyRmLinux:~$

I have *bolded* the line where the first error occurred. Since this relates
to disk space, here are sizes and free space on all my partitions:

bill@FamilyRmLinux:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 9.3G 3.8G 5.1G 43% /
varrun 506M 220K 506M 1% /var/run
varlock 506M 0 506M 0% /var/lock
udev 506M 68K 506M 1% /dev
devshm 506M 20K 506M 1% /dev/shm
lrm 506M 39M 467M 8%
/lib/modules/2.6.24-21-generic/volatile
/dev/sdb1 46M 44M 0 100% /boot
/dev/sdb4 61G 3.4G 55G 6% /home
/dev/sda1 75G 55G 20G 74% /mnt/FamRm_HD <== this is
a dual-boot WinXP partition
gvfs-fuse-daemon 9.3G 3.8G 5.1G 43% /home/bill/.gvfs
bill@FamilyRmLinux:~$

If I were to guess, I'd suspect the /boot partition (/dev/sdb1) is the
problem. If so, how to I free up some space there? Just delete some older
Linux kernels? Or should I expand that partition at the expense of /home?
To what size?

Here is the complete contents of /boot:

bill@FamilyRmLinux:~$ ls -ahl /boot
total 39M
drwxr-xr-x 4 root root 1.0K 2008-11-30 11:49 .
drwxr-xr-x 22 root root 4.0K 2008-10-29 16:20 ..
-rw-r--r-- 1 root root 413K 2008-08-21 00:46 abi-2.6.24-19-generic
-rw-r--r-- 1 root root 413K 2008-10-21 23:12 abi-2.6.24-21-generic
-rw-r--r-- 1 root root 413K 2008-11-24 17:47 abi-2.6.24-22-generic
-rw-r--r-- 1 root root 79K 2008-08-21 00:46 config-2.6.24-19-generic
-rw-r--r-- 1 root root 79K 2008-10-21 23:12 config-2.6.24-21-generic
-rw-r--r-- 1 root root 79K 2008-11-24 17:47 config-2.6.24-22-generic
drwxr-xr-x 2 root root 1.0K 2008-10-29 11:00 grub
-rw-r--r-- 1 root root 7.2M 2008-10-04 20:18 initrd.img-2.6.24-19-generic
-rw-r--r-- 1 root root 7.6M 2008-10-04 10:00
initrd.img-2.6.24-19-generic.bak
-rw-r--r-- 1 root root 7.2M 2008-10-15 12:08 initrd.img-2.6.24-21-generic
-rw-r--r-- 1 root root 7.2M 2008-10-15 12:07
initrd.img-2.6.24-21-generic.bak
drwx------ 2 root root 12K 2008-10-04 13:49 lost+found
-rw-r--r-- 1 root root 101K 2007-09-28 06:06 memtest86+.bin
-rw-r--r-- 1 root root 884K 2008-08-21 00:46 System.map-2.6.24-19-generic
-rw-r--r-- 1 root root 885K 2008-10-21 23:12 System.map-2.6.24-21-generic
-rw-r--r-- 1 root root 885K 2008-11-24 17:47 System.map-2.6.24-22-generic
-rw-r--r-- 1 root root 1.9M 2008-08-21 00:46 vmlinuz-2.6.24-19-generic
-rw-r--r-- 1 root root 1.9M 2008-10-21 23:12 vmlinuz-2.6.24-21-generic
-rw-r--r-- 1 root root 1.9M 2008-11-24 17:47 vmlinuz-2.6.24-22-generic
bill@FamilyRmLinux:~$

Thanks for your help. Bill Franklin

On Sun, Nov 30, 2008 at 5:48 AM, Florian Diesch <
<email address hidden>> wrote:

> Your question #52992 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/52992
>
> Florian Diesch requested for more information:
> Please open a terminal window, type
> sudo apt-get upgrade > apt-upgrade.log
> and post the content of apt-upgrade.log.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/52992
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

You need to remove old unused kernels to create space on the /boot device...
they are stored into your /boot partition

Please, give some info, open a terminal and type:

dpkg -l | grep -i linux-image | grep -i ii

and

uname -a

copy and paste result here

Thank you

Revision history for this message
Wm Franklin (wjfranklin) said :
#5

Here's what you asked for:

bill@FamilyRmLinux:~$ dpkg -l | grep -i linux-image | grep -i ii
ii linux-image-2.6.24-19-generic
2.6.24-19.41 Linux kernel image for version 2.6.24
on x86
bill@FamilyRmLinux:~$

bill@FamilyRmLinux:~$ uname -a
Linux FamilyRmLinux 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008
i686 GNU/Linux
bill@FamilyRmLinux:~$

Just for my learning, what's the significance of the "ii"?

Bill Franklin

On Sun, Nov 30, 2008 at 12:43 PM, marcobra <
<email address hidden>> wrote:

> Your question #52992 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/52992
>
> Status: Open => Needs information
>
> marcobra requested for more information:
> You need to remove old unused kernels to create space on the /boot
> device...
> they are stored into your /boot partition
>
> Please, give some info, open a terminal and type:
>
> dpkg -l | grep -i linux-image | grep -i ii
>
> and
>
> uname -a
>
> copy and paste result here
>
> Thank you
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/52992
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#6

ii → installed

Strange, you have this: linux-image-2.6.24-19-generic kernel installed
and you are running with this 2.6.24-21-generic kernel...

so please try to remove the apparently unused one open a terminal and type:

sudo dpkg purge linux-image linux-image-2.6.24-19-generic

Then try to autoremove related packages, type:

sudo apt-get autoremove

Then try to perform a

sudo dpkg --configure -a

Please report only errors message here.

Thank you

Revision history for this message
Best marcobra (Marco Braida) (marcobra) said :
#7

Better...

ii → installed

Strange, you have this: linux-image-2.6.24-19-generic kernel installed
and you are running with this 2.6.24-21-generic kernel...

so please try to remove the apparently unused one open a terminal and type:

sudo dpkg purge linux-image-2.6.24-19-generic

Then try to autoremove related packages, type:

sudo apt-get autoremove

Then try to perform a

sudo dpkg --configure -a

Please report only errors message here.

Thank you

Revision history for this message
Wm Franklin (wjfranklin) said :
#8

The diagnostic process which both the commenters supplied led me to the conclusion that my root partition was full, due to kernel updates. Removing the oldest kernel (outlined here) probably would have solved the problem.

But hard-drive sizes being what they are (big), and linux disk requirements being what they are (small), I solved the problem by expanding the root partition from 50 MB (1.5 MB free) to 500 MB, and verified the fix by running "sudo apt-get upgrade", and rebooting successfully. This is probably overkill, in any realistic sense, but I'm confident that I won't face this problem again, if at all.

Thanks all.

Bill Franklin