I have recently noticed that my /boot partition was full so it didn’t allow me upgrade VMware Agent on Ubuntu Server. I was getting the following error during the VMware Agent installation
Creating a new initrd boot image for the kernel.
No module BusLogic found for kernel 2.6.18-92.el5PAE, aborting.
ERROR: "/sbin/mkinitrd -f --with=vmxnet --with=vmxnet3 --with=pvscsi /boot/initrd-2.6.18-92.el5PAE.img 2.6.18-92.el5PAE" exited with non-zero status.
Your system currently may not have a functioning init image and may not boot properly. DO NOT REBOOT! Please ensure that you have enough free space available in your /boot directory and run this configuration script again.
In order to resolve this problem I did following:
- Checked space on the Linux server with
df -fcommand, I got got the following output
/dev/sda1 228M 228M 0M 100% /boot
- Then run:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'This command will list all the packages which are not longer needed i.e:
uname -ato check kernel version. On Ubuntu server you should see something similar to:
Linux SERVER03 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
- And finally I removed all not needed packages apart the one which corresponds the kernel version, which is in my case 3.2.0-32-generic. I used the following command to remove the packages ver. 3.2.0-18 :
sudo apt-get -y purge linux-headers-3.2.0-38 linux-headers-3.2.0-38-generic
- After I removed all no longer needed packages I checked the size of the /boot partition again with
df -hcommand. Now my /boot partition shows:
/dev/sda1 228M 25M 192M 12% /boot