Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have /boot/ on a separate partition from /, and /boot/ is 98% full. How do I make more space on it?

share|improve this question

2 Answers 2

You can free space by uninstalling unneeded (old) versions the Linux Kernel.

  1. Get a list of installed Kernels like this:

    confus@confusion:~$ dpkg --list | grep -E "linux-header|linux-image"
    ii  linux-headers-3.5.0-18-generic            3.5.0-18.29                                amd64        Linux kernel headers for version 3.5.0 on 64 bit x86 SMP
    ii  linux-headers-3.5.0-23-generic            3.5.0-23.35                                amd64        Linux kernel headers for version 3.5.0 on 64 bit x86 SMP
    ii  linux-image-3.5.0-18-generic              3.5.0-18.29                                amd64        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
    ii  linux-image-3.5.0-23-generic        3.5.0-23.35                                amd64        Linux kernel image for version 3.5.0 on 64 bit x86 SMP                               amd64        Generic Linux kernel image
    
  2. Find out, what kernel you are running. E.g. by running the command:

    confus@confusion:~$ uname -r
    3.5.0-23-generic
    

    In this example my kernel version is "3.5.0-23-generic".

  3. Provided this kernel works perfectly for you and you don't have any bugs, remove everything BUT this kernel. In my example this would be accomplished by:

    sudo apt-get remove linux-image-3.5.0-18-generic linux-headers-3.5.0-18-generic
    

Remove obsolete linux-images using synaptic

If you want a graphical tool use synaptic package manager (you might need to install it in Software Center. You can search for "linux-headers" and "linux-image" and sort them, installed packages first. Then mark them for removal.

share|improve this answer
    
I was hoping for a smarter way to handle it than just this, but I'm willing to try this, thank you. –  Ian N Feb 2 '13 at 15:22
    
There is really just the two options: Risky resizing of the boot partition or remove old kernel versions. I'd recommend just to leave the oldest and the latest kernel version to be safe. –  con-f-use Feb 2 '13 at 15:24
1  
@con-f-use, removing old kernel versions is not risky at all and is something that should be done periodically anyway. –  psusi Feb 2 '13 at 16:13
    
You misunderstood me and you are wrong. I used risky in conjunction with resizing the boot partition and NOT regarding old kernel versions. Though it is always a good idea to leave the oldest kernel version (or one that is confirmed to work flawlessly) in case the latest causes any hidden bugs or gets damaged. Also there is no sense in removing old kernels as long there's still space in /boot/ for one more. –  con-f-use Feb 10 '13 at 1:06

You normally don't need to resize your boot partition, as this can be risky and you may lose your data. Please consider reinstalling Ubuntu with a larger boot partition, or leaving your boot partition untouched.

Disclaimer: Please make a backup of your data on an external drive before following these steps. If you are wondering how to do this, there are plenty of tutorials online.

Here are some example of how to make backups: (Ubuntu Forums) (Community Documentation).


Resize a partition with GParted and Live CD:

  1. Check the partition of your /boot/ partition with lsblk. The mount point is listed on the right-hand side. As an example, you may look at mine (but note I have no separate /boot/ partition). Be sure to write this down.
  2. Boot into a Desktop Live CD, and start a desktop sessions with the "Try Ubuntu" option.
  3. Open gparted (if not installed, run sudo apt-get install gparted)
  4. Select a partition that you are willing to shrink which is adjacent to your boot partition (for example, if it is /dev/sda4, you can shrink either /dev/sda3 or /dev/sda5.
  5. Select Resize/Move, resize the partition. so that you there is extra space immediately adjacent to your /boot partition. Do not move the partition, as you will risk losing your data.
  6. Resize your boot partition (the one you wrote down), to occupy this space. Be careful not to move it, otherwise you will risk losing data.
  7. Click the green check mark with says "Apply". This will make changes to your hard drive. Be patient, as this can take a while.

For more information you can check out this answer.

share|improve this answer
    
A resize that moves the start of the partition implicitly performs a move, which will take a very long time. –  psusi Feb 2 '13 at 16:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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