Ubuntu do-release-upgrade fails with

/dev/mapper/glw–oee–serv–vg-root 100750768 3442692  92183572   4% /
udev                                  1012076       4   1012072   1% /dev
tmpfs                                  204388     264    204124   1% /run
none                                     5120       0      5120   0% /run/lock
none                                  1021920       0   1021920   0% /run/shm
/dev/sda1                              233191  212670      8080  97% /boot

The main reason is that the  /boot partition is filled with old kernels.  First check uname -a to check your current version as we are going to clean-up some of the old packages.  The run the following command to get a list of install kernel packages.

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'

The output will look something like this:

server:~$ dpkg -l ‘linux-*’ | sed ‘/^ii/!d;/'”$(uname -r | sed “s/\(.*\)-\([^0-9]\+\)/\1/”)”‘/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d’
linux-headers-3.8.0-29
linux-headers-3.8.0-29-generic
linux-headers-3.8.0-30
linux-headers-3.8.0-30-generic
linux-headers-3.8.0-32
linux-headers-3.8.0-32-generic
linux-headers-3.8.0-33
linux-headers-3.8.0-33-generic
linux-headers-3.8.0-34
linux-headers-3.8.0-34-generic
linux-headers-3.8.0-35
linux-headers-3.8.0-35-generic
linux-headers-3.8.0-37
linux-headers-3.8.0-37-generic
linux-image-3.8.0-29-generic
linux-image-3.8.0-30-generic
linux-image-3.8.0-32-generic
linux-image-3.8.0-33-generic
linux-image-3.8.0-34-generic
linux-image-3.8.0-35-generic

Now use the following command to clean-up up some of those packages and free up space on /boot.

sudo apt-get -y purge some-kernel-package

Example: sudo apt-get -y purge linux-image-3.8.0-29-generic

Pages: 1 | 2 | Single Page

Leave a Reply

Your email address will not be published. Required fields are marked *