2

I am trying to Update my server

navin@ubuntu:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
linux-image-generic : Depends: linux-image-3.2.0-67-generic but it is not installed
E: Unmet dependencies. Try using -f.

When i tried with the apt-get -f install

navin@ubuntu:~$ sudo apt-get -f install linux-image-3.2.0-67-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools
The following NEW packages will be installed:
linux-image-3.2.0-67-generic
0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
15 not fully installed or removed.
Need to get 0 B/38.8 MB of archives.
After this operation, 150 MB of additional disk space will be used.
(Reading database ... 147902 files and directories currently installed.)
Unpacking linux-image-3.2.0-67-generic (from .../linux-image-3.2.0-67-generic_3.2.0- 67.101_amd64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-67-generic_3.2.0-   67.101_amd64.deb (--unpack):
failed in write on buffer copy for backend dpkg-deb during `./boot/vmlinuz-3.2.0-67-generic': No space left on device
No apport report written because MaxReports is reached already
                                                          dpkg-deb: error: subprocess   paste was killed by signal (Broken pipe)
  Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-67-generic /boot/vmlinuz-3.2.0-67-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-67-generic /boot/vmlinuz-3.2.0-67-generic
 Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.2.0-67-generic_3.2.0-67.101_amd64.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)

When i tried to remove the clean out old kernel files in /boot

root@ubuntu: apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 linux-image-generic : Depends: linux-image-3.2.0-67-generic but it is not installed
E: Unmet dependencies. Try using -f.

Please provide some solution for this

2 Answers2

1

That's the main problem:

No space left on device

It's your /boot partition that has no more space left. Try to do this:

Delete the unused kernel images manually. But, take care to not delete the used one or you will not be able to boot anymore. Type uname -r in a terminal. All that contains this version string must not be deleted.

When you cleaned the boot partition, use apt-get -f install linux-image-3.2.0-67-generic again.

Then update your system cleanly with:

apt-get dist-upgrade
chaos
  • 27,506
  • 12
  • 74
  • 77
  • navin@ubuntu:~$ sudo apt-get remove linux-image-2.6.32-40-generic [sudo] password for navin: Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-image-generic : Depends: linux-image-3.2.0-67-generic but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). – navinjeth Aug 20 '14 at 09:04
  • I am not able to remove the old kernel files – navinjeth Aug 20 '14 at 09:05
  • That's why I wrote manually in my answer. remove them by rm /boot/vmlinuz-[here_old_unused_kernel_version]-generic and also the initrd: rm /boot/initrd.img-[here_old_unused_kernel_version]-generic – chaos Aug 20 '14 at 09:23
0

I think it's better to install Ubuntu tweak and remove old kernels through it.

It does it automatically for you.

You have to go to Janitor tab and select old kernel.

Then hit clean button and you are ready... :)