4

I recently had the warning that /boot was running out of space and I found this solution. Having rebooted and confirmed that I didn't fubar my system, I'm looking at why it happened in the first place?

Okay so evidently there were a lot of kernels installed. That's not something I did manually (I don't even know what a kernel is!) so I guess there's an automatic update process that keeps my system in ship shape. I'm fine with that.

Looking at the Disks utility I see that the /boot partition is only 255MB out of my 128GB SSD. Again, I didn't configure this - it must be the default setting of the Ubuntu installer.

--> Why isn't the /boot partition bigger by default? It seems silly to create a partition that's less than 2% of the drive size. I know that increasing the partition would merely postpone the problem, so perhalps I should really be asking: Why can't Ubuntu solve this problem automatically? All it would need was to keep track of which kernels haven't been used for a long time, and auto-remove those?

1 Answers1

2

Okay, what is a kernel?

In computing, the kernel is a computer program that manages I/O requests from software, and translates them into data processing instructions for the central processing unit and other electronic components of a computer. The kernel is a fundamental part of a modern computer's operating system.

Source, Wikipedia

When does this update?

I think it is lumped in with the Ubuntu Base updates:

The base package is (a) ubuntu-desktop if it is installed, otherwise (b) the alphabetically first of any of the metapackages that are installed, for example, kubuntu-desktop or lubuntu-desktop.

It also seems to have the kernel as part of it - but of course there aren't always kernel updates.

It is normally the kernel that needs the restart when you update (although from 4.0+ it wont).

Source, Ubuntu Wiki

Now to your main question.

I have 6 kernels installed at the moment:

linux-image-3.13.0-32-generic
linux-image-3.13.0-46-generic
linux-image-3.13.0-48-generic
linux-image-3.13.0-49-generic
linux-image-3.13.0-51-generic
linux-image-3.13.0-53-generic

You can find out with this command:

dpkg --list | grep linux-image

Why doesn't ubuntu just remove them?

Well, I sometimes use a different kernel. For example, in the current one I have, linux-image-3.13.0-53-generic, there is a strange bug I got when I broke my xorg.conf file - I couldn't access tty easily. linux-image-3.13.0-51-generic fixed this for me, so I could undo my meddlings.

This is the same for lots of people - Ubuntu isn't in the business to remove packages you might need (even if you haven't used it for years, you may want it). I could do something different, with asking if it needs removing, but it doesn't.

Why is /boot so small?

Why does it need to be big? My current kernel is 5.6 MB:

-rw-------  1 root root 5.6M May 20 12:11 vmlinuz-3.13.0-53-generic

And the total "stuff" for the -53 version is 37.1 MB. You can fit 4 kernels in there, normally enough.

Also, note that the recommended size for /boot is now 500-600 MB.

Do I need it?

You don't - I don't have it. It's not compulsory, but there are some advantages:

  • as a rescue partition
  • rootfs is on a LVM, RAID, is encrypted, or unsupported by GRUB
  • maybe saves a few seconds of boot time

Source, Server Fault

Tim
  • 33,500