1

This question already has an answer here:

EDIT: As in the suggested question: How do I remove old kernel versions to clean up the boot menu? I deleted old kernels, leaving two besides my current kernel. This freed up 65.6 MB, so /boot has 123.8 MB of free space now. The updates waiting need some 300 MB of space...

EDIT: So the question now is this: Is there any other way to either free more space on /boot or expand the /boot partition?

EDIT: As stated below I've tried shrinking my main partition from a live CD, but couldn't shrink it more than about 18 MB; also it appears that my main partition is a sub-partition within a larger primary partition, while /boot is yet another completely separate primary partition. Is there anyway to get around this and safely shrink my main partition and then grow the /boot partition?

My /boot partition is nearly full, and does not have enough space to allow my OS (Ubuntu 14.04) to install updates; there is 58.2 megabytes of free space.

sudo apt-get autoremove freed most of the currently available 58.2 MB, but no more than that.

This answer https://askubuntu.com/a/90219/391024 gave a method to manually remove old kernels, but I'm not sure which kernels are old, nor what exactly to enter to delete my old kernels (if any are old).

I have also tried Synaptic Package Manager, but the kernels older than the latest (4.2.0-41 I think) are listed under Installed (manual) and Not-Installed (residual config).

I've tried shrinking my main partition and expanding /boot with gparted from a live CD, but it would not let me shrink the main partition. It appears that the main partition is a logical partition under a primary partition while /boot is a primary partition. The main partition could be shrunk a few megabytes only, but I could not transfer the unallocated space to the /boot partition.

Here is a list of files on my /boot partition (updated):

:~$ ls /boot
abi-4.2.0-36-generic         lost+found
abi-4.2.0-38-generic         memtest86+.bin
abi-4.2.0-41-generic         memtest86+.elf
config-4.2.0-36-generic      memtest86+_multiboot.bin
config-4.2.0-38-generic      System.map-4.2.0-36-generic
config-4.2.0-41-generic      System.map-4.2.0-38-generic
grub                         System.map-4.2.0-41-generic
initrd.img-4.2.0-36-generic  vmlinuz-4.2.0-36-generic
initrd.img-4.2.0-38-generic  vmlinuz-4.2.0-38-generic
initrd.img-4.2.0-41-generic  vmlinuz-4.2.0-41-generic

Thanks in advance for your help!

marked as duplicate by Terrance, Pilot6, Zanna, Eric Carvalho, Kevin Bowen Aug 27 '16 at 1:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The command uname -r from a terminal will tell you what kernel you are using. Chances are you are on kernel version: 4.2.0-41-generic – Terrance Aug 24 '16 at 23:33
  • Alrighty, I made an edit to clarify how the question is different. – Laharon Aug 25 '16 at 20:06
  • It looks like you use rm to delete kernels. That never should be done, but when locked up, you may have to delete one, so then you can use the correct method of dpkg or synaptic. When you use dpkg or synaptic, you do not delete just kernel, but the other supporting files like config, initrd, abi etc. You may need to reinstall one kernel at a time, and then using synaptic do a full purge of that kernel which will delete everything. Keep only current and only older version. – oldfred Aug 25 '16 at 20:21
  • I used Ubuntu Tweak to delete the kernels. Does it delete supporting files? – Laharon Aug 25 '16 at 20:27
  • Since files are still there, I would guess it does not. Never used Tweak, but it seems like it just did a delete. – oldfred Aug 25 '16 at 21:16
0

If you want to make the /boot partition bigger, I'd suggest you boot from a USB key that has linux installed on it and just resize your main partition to a smaller size(let's say 1 gb smaller) and give that free space to your /boot partition instead.

The reason to use a bootable USB key is mainly because you just can't/shouldn't do it directly from a live system.

The extra space should give you more breathing room for installing multiple kernels, but keep in mind that you should remove older unused kernels form time to time as well.

  • 1
    I tried this before with a live CD, but gparted wouldn't let me shrink my main partition - which appears to be a sub-partition within a primary partition. – Laharon Aug 26 '16 at 6:55
  • you have to shrink your sub partition first, apply changes.then shrink the partition your sub main partition is in apply that then you should be able to give back the free space to your boot partition. – marc-andre benoit Aug 27 '16 at 18:07
  • You may need to reboot each time after applying changes. if you see it doesn't let you do more changes after you apply one step. reboot and do the next step. – marc-andre benoit Aug 27 '16 at 18:15
  • 1
    I'll try that thanks. I did shrink the sub partition and save changes before trying to grow /boot. Perhaps a reboot would help. – Laharon Aug 27 '16 at 19:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.