I run Ubuntu 14.04 LTS servers on Hyper-V.

If you do a fairly routine install you will end up with an anemic ~250 MB boot partition. The boot partition (located at /boot) stores your Linux Kernel and everything the system needs to boot. I am sure you could have guessed that.

Next, if you have automatic security update downloading enabled, then your system is downloading new versions of the ubuntu/linux kernel on a regular basis to this partition.

What should happen is that only a few versions of the kernel should be kept on hand and there is supposed to be some kind of job that cleans this up from time to time.

In reality that cleanup function seems to be bugged in Ubuntu 14.04 LTS so the boot partition will hit 100% full frequently and it is a constant game of manually keeping that partition clean… or else! (or else it turns into a real headache when it hits 100% full).

So, I wanted to resize the boot partition. However when I loaded up an ubuntu desktop live CD and went to resize there isn’t an easy way to do it. I couldn’t first shrink my primary system partition by all that much. I don’t know why and I was short on time so I found this rather quick (and perhaps dirty) work around.

Disclaimer: Gparted is a pretty reliable tool but anytime you are messing with drive partitions you should make sure you have some form of backup of your system first. I usually perform a hyper-v export before I mess with this kind of stuff. I don’t like relying solely on snapshots when messing with disk/partition changes.

  1. Take the VM offline
  2. Resize the VHD and add like 5 GB of space
  3. Boot the VM from an ubuntu live CD.
  4. Open up Gparted
  5. Right-Click on your boot partition and hit “copy”
  6. Click in the 5 GB of empty space and hit paste.
  7. Have Gparted apply the changes
  8. Now right-click on your newly copied 5 GB boot partition and select “manage flags”.
  9. Tick “boot” and then close.
  10. Shutdown the live CD and eject the ISO.
  11. Reboot and now you are done!

Very simple and quick. Perhaps not the best solution but it is an easy one.


1 of 1

This post has no comments. Be the first to leave one!

Leave a Reply