lost and found ( for me ? )

Ubuntu 12.04 error while upgrading kernel via apt-get

While upgrading kernel, I have faced the following errors.
# apt-get install -y  linux-headers-server linux-image-serv
er linux-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-server is already the newest version.
linux-image-server is already the newest version.
linux-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-3.2.0-65-generic (3.2.0-65.99) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-65-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.2.0-65-generic /boot/vmlinuz-3.2.0-65-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-65-generic /boot/vmlinuz-3.2.0-65-generic
update-initramfs: Generating /boot/initrd.img-3.2.0-65-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.2.0-65-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-65-generic.postinst line 1010.
dpkg: error processing linux-image-3.2.0-65-generic (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-server:
linux-image-server depends on linux-image-3.2.0-65-generic; however:
 Package linux-image-3.2.0-65-generic is not configured yet.
dpkg: error processing linux-image-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
            dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.65.77); however:
 Package linux-image-server is not configured yet.
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
            Errors were encountered while processing:
linux-image-3.2.0-65-generic
linux-image-server
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

this seems to be caused by no disk space available of /boot directory
# df -h
Filesystem                        Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu1204--vm1-root   14G  5.8G  7.1G  45% /
udev                              489M  4.0K  489M   1% /dev
tmpfs                             100M  280K  100M   1% /run
none                              5.0M     0  5.0M   0% /run/lock
none                              498M     0  498M   0% /run/shm
/dev/vda1                         228M  217M     0 100% /boot

# ls
System.map-3.2.0-29-generic  abi-3.2.0-64-generic         initrd.img-3.2.0-59-generic
System.map-3.2.0-51-generic  abi-3.2.0-65-generic         initrd.img-3.2.0-60-generic
System.map-3.2.0-53-generic  config-3.2.0-29-generic      initrd.img-3.2.0-61-generic
System.map-3.2.0-57-generic  config-3.2.0-51-generic      initrd.img-3.2.0-64-generic
System.map-3.2.0-58-generic  config-3.2.0-53-generic      lost+found
System.map-3.2.0-59-generic  config-3.2.0-57-generic      memtest86+.bin
System.map-3.2.0-60-generic  config-3.2.0-58-generic      memtest86+_multiboot.bin
System.map-3.2.0-61-generic  config-3.2.0-59-generic      vmlinuz-3.2.0-29-generic
System.map-3.2.0-64-generic  config-3.2.0-60-generic      vmlinuz-3.2.0-51-generic
System.map-3.2.0-65-generic  config-3.2.0-61-generic      vmlinuz-3.2.0-53-generic
abi-3.2.0-29-generic         config-3.2.0-64-generic      vmlinuz-3.2.0-57-generic
abi-3.2.0-51-generic         config-3.2.0-65-generic      vmlinuz-3.2.0-58-generic
abi-3.2.0-53-generic         grub                         vmlinuz-3.2.0-59-generic
abi-3.2.0-57-generic         initrd.img-3.2.0-29-generic  vmlinuz-3.2.0-60-generic
abi-3.2.0-58-generic         initrd.img-3.2.0-51-generic  vmlinuz-3.2.0-61-generic
abi-3.2.0-59-generic         initrd.img-3.2.0-53-generic  vmlinuz-3.2.0-64-generic
abi-3.2.0-60-generic         initrd.img-3.2.0-57-generic  vmlinuz-3.2.0-65-generic
abi-3.2.0-61-generic         initrd.img-3.2.0-58-generic


# cd /boot
# rm *5[1-9]*

# df -h
Filesystem                        Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu1204--vm1-root   14G  5.8G  7.1G  45% /
udev                              489M  4.0K  489M   1% /dev
tmpfs                             100M  280K  100M   1% /run
none                              5.0M     0  5.0M   0% /run/lock
none                              498M     0  498M   0% /run/shm
/dev/vda1                         228M   99M  118M  46% /boot

upgrade the kernel.
# apt-get install -y  linux-headers-server linux-image-server linux-server

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.