I have an Ubuntu 14.04 installation that I'm trying to do-release-upgrade
to 16.04. When I try, I get the error
Not enough free disk space
The upgrade has aborted. The upgrade needs a total of 76.2 M free space on disk '/boot'. Please free at least an additional 58.8 M of
disk space on '/boot'.
apt-get autoremove
and apt-get clean
did not remove any files. From web searching, it looks like the standard solution to this problem is provided by Alaa Ali's answer to this AskUbuntu question, which is to apt-get purge
unused kernel images. Following this advice, I removed 41 kernel images. This did not free up any space on /boot
, however.
Before apt-get purge
ing the 41 images, the output of df -h
was
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 4.0K 3.9G 1% /dev
tmpfs 785M 1012K 784M 1% /run
/dev/sda2 47G 28G 17G 62% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 88K 3.9G 1% /run/shm
none 100M 20K 100M 1% /run/user
/dev/sdb1 459G 121G 338G 27% /data
/dev/sda1 114M 89M 17M 85% /boot
/dev/sda4 404G 90G 295G 24% /home
After purging, the output of df -h
is
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 4.0K 3.9G 1% /dev
tmpfs 785M 1012K 784M 1% /run
/dev/sda2 47G 28G 17G 62% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 3.9G 88K 3.9G 1% /run/shm
none 100M 20K 100M 1% /run/user
/dev/sdb1 459G 121G 338G 27% /data
/dev/sda1 114M 89M 17M 85% /boot
/dev/sda4 404G 90G 295G 24% /home
Nothing has changed. I still get the same error when I try to do-release-upgrade
.
Comparing the output of dpkg -l | grep linux-image
before and after purging images confirms that the kernel images were removed.
Every answer on this that I've found has boiled down to autoremove
, clean
, or purging kernel images, and none of those have worked. What do I do now?
Edit: Additional Information
Here is the output of dpkg -l | grep linux-image
before purging:
$ dpkg -l | grep linux-image
rc linux-image-2.6.32-21-generic 2.6.32-21.32 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-23-generic 2.6.32-23.37 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-24-generic 2.6.32-24.43 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-25-generic 2.6.32-25.45 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-26-generic 2.6.32-26.48 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-27-generic 2.6.32-27.49 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-29-generic 2.6.32-29.58 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-30-generic 2.6.32-30.59 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-31-generic 2.6.32-31.61 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-32-generic 2.6.32-32.62 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-34-generic 2.6.32-34.77 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-37-generic 2.6.32-37.81 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-38-generic 2.6.32-38.83 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-39-generic 2.6.32-39.86 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-40-generic 2.6.32-40.87 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-41-generic 2.6.32-41.94 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-2.6.32-44-generic 2.6.32-44.98 amd64 Linux kernel image for version 2.6.32 on x86/x86_64
rc linux-image-3.13.0-107-generic 3.13.0-107.154 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc linux-image-3.13.0-116-generic 3.13.0-116.163 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc linux-image-3.13.0-157-generic 3.13.0-157.207 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.13.0-164-generic 3.13.0-164.214 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.13.0-170-generic 3.13.0-170.220 amd64 Signed kernel image generic
rc linux-image-3.13.0-66-generic 3.13.0-66.108 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
rc linux-image-3.2.0-32-generic 3.2.0-32.51 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-33-generic 3.2.0-33.52 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-34-generic 3.2.0-34.53 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-35-generic 3.2.0-35.55 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-36-generic 3.2.0-36.57 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-37-generic 3.2.0-37.58 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-38-generic 3.2.0-38.61 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-39-generic 3.2.0-39.62 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-40-generic 3.2.0-40.64 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-41-generic 3.2.0-41.66 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-45-generic 3.2.0-45.70 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-48-generic 3.2.0-48.74 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-49-generic 3.2.0-49.75 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-53-generic 3.2.0-53.81 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-58-generic 3.2.0-58.88 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-88-generic 3.2.0-88.126 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-89-generic 3.2.0-89.127 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-3.2.0-92-generic 3.2.0-92.131 amd64 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc linux-image-extra-3.13.0-107-generic 3.13.0-107.154 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc linux-image-extra-3.13.0-116-generic 3.13.0-116.163 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc linux-image-extra-3.13.0-157-generic 3.13.0-157.207 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-164-generic 3.13.0-164.214 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
rc linux-image-extra-3.13.0-66-generic 3.13.0-66.108 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-generic 3.13.0.170.181 amd64 Generic Linux kernel image
Here are the commands I used to purge images:
$ sudo apt-get purge linux-image-2.6.32-{21,23,24,25,26,27,29,30,31,32,34,37,38,39,40,41,44}-generic
$ sudo apt-get purge linux-image-3.2.0-{32,33,34,35,36,37,38,39,40,41,45,48,49,53,58,88,89,92}-generic
$ sudo apt-get purge linux-image-3.13.0-107-generic
$ sudo apt-get purge linux-image-3.13.0-116-generic
$ sudo apt-get purge linux-image-extra-3.13.0-107-generic
$ sudo apt-get purge linux-image-extra-3.13.0-116-generic
$ sudo apt-get purge linux-image-3.13.0-66-generic
$ sudo apt-get purge linux-image-extra-3.13.0-66-generic
Here is the output of dpkg -l | grep linux-image
after running the above purge commands:
$ dpkg -l | grep linux-image
rc linux-image-3.13.0-157-generic 3.13.0-157.207 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.13.0-164-generic 3.13.0-164.214 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-3.13.0-170-generic 3.13.0-170.220 amd64 Signed kernel image generic
rc linux-image-extra-3.13.0-157-generic 3.13.0-157.207 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-164-generic 3.13.0-164.214 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-generic 3.13.0.170.181 amd64 Generic Linux kernel image
Here are the current contents of /boot
:
$ ls -l /boot
total 81817
-rw-r--r-- 1 root root 1169147 Dec 5 2018 abi-3.13.0-164-generic
-rw-r--r-- 1 root root 166221 Dec 5 2018 config-3.13.0-164-generic
-rw-r--r-- 1 root root 166221 May 9 09:35 config-3.13.0-170-generic
drwxr-xr-x 5 root root 1024 Jul 19 14:43 grub
-rw-r--r-- 1 root root 31803728 Jul 9 13:28 initrd.img-3.13.0-164-generic
-rw-r--r-- 1 root root 31804631 Jul 9 13:28 initrd.img-3.13.0-170-generic
drwx------ 2 root root 12288 Jul 22 2010 lost+found
-rw-r--r-- 1 root root 254 Dec 5 2018 retpoline-3.13.0-164-generic
-rw------- 1 root root 3417774 Dec 5 2018 System.map-3.13.0-164-generic
-rw------- 1 root root 3418683 May 9 09:35 System.map-3.13.0-170-generic
-rw------- 1 root root 5905712 Dec 5 2018 vmlinuz-3.13.0-164-generic
-rw------- 1 root root 5909496 May 14 15:03 vmlinuz-3.13.0-170-generic
Here is uname -r
:
$ uname -r
3.13.0-170-generic
Edit: Summary
I've managed to get /boot
to have 58M available by removing one more kernel image. do-release-upgrade
needs 77M, so I still need around ~20M.
The remaining kernel image (the one that I'm currently using) is 31M. Beyond that, everything else in /boot
totals ~15.9M. There doesn't seem to be a way to free enough space to run do-release-upgrade
without deleting my current kernel image. Does anyone see anything I'm missing?
Data to tally up disk space:
$ sudo du -h -d 1 /boot/
12K /boot/lost+found
6.7M /boot/grub
47M /boot/
$ ls -lh /boot
total 40M
-rw-r--r-- 1 root root 163K May 9 09:35 config-3.13.0-170-generic
drwxr-xr-x 5 root root 1.0K Jul 23 13:41 grub
-rw-r--r-- 1 root root 31M Jul 9 13:28 initrd.img-3.13.0-170-generic
drwx------ 2 root root 12K Jul 22 2010 lost+found
-rw------- 1 root root 3.3M May 9 09:35 System.map-3.13.0-170-generic
-rw------- 1 root root 5.7M May 14 15:03 vmlinuz-3.13.0-170-generic
Edit: Resolution
It seems clear that I'm not capable of resolving this issue. Thank you to everyone who kindly offered information and advice!
No comments:
Post a Comment