Tag Archives: /boot

How to Solve Ubuntu Server /boot full Issue Tips, Tricks and Tutorials 19 FEB 2016

If you manage an older Ubuntu server and do a lot of updates/upgrades, inevitably you’ll hit the annoying /boot full issue, which is essentially what happens when the ridiculously tiny /boot folder gets filled up with older kernel version as a result of all your upgrading.

To spot if this is in fact what currently plagues you, simply run the following command to get a quick snapshot of disk space usage:

sudo df -h

If your /boot directory is indeed full or close to 100%, you can run the following command that automatically locates and removes older kernels and headers from the system:

sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")

With those gone, you can now clean up a bit further by removing packages that aren’t necessarily needed any more (because they were automatically installed to satisfy dependencies for the newly removed packages):

sudo apt-get autoremove
sudo apt-get --purge remove && sudo apt-get autoclean

This should solve your issue.

cat using laptop

Note: If you can’t use apt-get at all because of this problem, you can try to manually delete the kernels yourself. Run the following to get an idea of what can be removed:

dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')"

With that list now in your possession, craft a remove operation using those version numbers listed above, followed by an attempt to solve the new dependency issue with apt-get e.g.

sudo rm -rf /boot/*-3.2.0-{101,102,103}-*
sudo apt-get -f install

(As always though, tread with care though when it comes to messing with this part of your server install…)

Clear Up Some Space on your Ubuntu Server Install Tips, Tricks and Tutorials 25 NOV 2013

ubuntu orange logoI ran into an issue the other day installing VMWare Tools on a virtual server whereby the installer was moaning about not having enough space in the /boot directory in order to continue with the installation.

(Now of course, unless you’re a seasoned Linux pro, you don’t really want to be messing about with your /boot folder, even if you’re confident that after running uname -r you’re kind of 100% sure which kernel files you can safely remove! In other words, tread carefully and always have backups on hand.)

Thankfully there are some pretty useful commands that you can run in order to help you free up some much needed space, commands that remove unused kernels, left over dependencies, and just plain old cached .deb files!

To remove old kernels, inspect your /boot folder. If you run uname -r you’ll see your currently used kernel version. This is the one you want to keep, so make a note. (Oh, and it’s also usually a good idea to hang on one older one for just in case.)

The Ubuntu Forums offered up this particularly handy little command to list all the kernels and headers that can be removed, excluding the current running kernel:

dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')"

Now you can remove unneeded kernels one by one using the apt-get purge command (e.g. sudo apt-get purge linux-image-x.x.x-x), or you can make use of the above snippet to blast everything away at once:

sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")

(Risky, I know, but it is a time saver if you have a lot of unused kernels lying around)

Next up in terms of clearing up some space on your Ubuntu install is making use of the sudo apt-get commands ‘autoclean’, ‘clean’ and ‘autoremove’.

From the apt-get MAN pages:

clean: clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.

autoclean: Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it growing out of control.

autoremove: is used to remove packages that were automatically installed to satisfy dependencies for some package and that are no longer needed.

First, run the autoclean package command that essentially removes partial package from the system, followed by the clean command that removes .deb packages that apt caches when you install, update, or upgrade:

sudo apt-get autoclean
sudo apt-get clean

Now run the autoremove command to remove any packages that should technically no longer be needed:

sudo apt-get autoremove

There, that should have freed up some space for you!

(Reminder to myself: I tend to Google this to get here: ubuntu server /dev/sda1 full)

Come Heel and High Water My Life 12 JUN 2007

I couldn’t help but laugh to myself today as I returned from the tuckshop for the second time today, clutching my second custard mini Danish for the morning shameful I know. But winter was made for nibbling!

As I was approaching the Leslie Commerce Building a student approached from the side, heading up the two steps to enter through the main entrance. What made this particularly funny were this girls shoes. Obviously a victim of fashion, she was wearing long high-heeled boots I’m assuming they are in fashion nowadays the heel of which was particularly slim. Now with every step she took, her whole ankle shuddered, causing her leg to give and her body to wobble. Every step!

I don’t even want to know the amount of concentration it takes to get that right without falling over like a beached whale. And if one falls, how on earth does one get up again in those impractical things? Unfortunately I turned a different corner to get to my office, but I couldn’t help but wonder how in the world she was going to climb that flight of stairs before her!

high heel boot

Insurance brokers must hate those shoemakers.