LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubuntu boot disk nearly full. How do I prune (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-boot-disk-nearly-full-how-do-i-prune-4175557884/)

Mike Fisher 11-03-2015 11:59 AM

Ubuntu boot disk nearly full. How do I prune
 
I use Ubuntu (14.16 light?) and at start up I get a message that there is only 2.9MB free space on boot disk. When I press the examine key no details appear. How do I get access and prune?

yancek 11-03-2015 12:18 PM

You could run df -h from a terminal. It will show the size, amount used and amount available of mounted partitions. Do you have a separate boot partition or is it all on the / partition? With a separate boot partition you could use the option explained in the first post at the link below. If the / filesystem is close to full, you need to move some data.

rtmistler 11-03-2015 12:20 PM

Firstly, do you have any idea what content is taking up space? Meaning do you save a lot of files, documents, large things like movies? Or do you just use your system, save nothing more major than written documents, and thus have no starting clues on this subject?

rtmistler 11-03-2015 12:23 PM

Command line, a.k.a. Terminal? Or Desktop GUI? For instance on the command line there are commands such as the df which was raised by yancek, on the UI you can view your file folders and get properties. You should also right mouse to get a general menu and enable viewing of hidden files and folders. The initial things people are going to try and assist you with are to ascertain the total disk size you have, and whether or not disk usage is system files and applications or personal files which are pure data that you can consider backing up somewhere else.

Mike Fisher 11-03-2015 12:53 PM

the files system looks like this
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root 913G 13G 854G 2% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.7G 4.0K 1.7G 1% /dev
tmpfs 334M 1.3M 333M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.7G 288K 1.7G 1% /run/shm
none 100M 28K 100M 1% /run/user
/dev/sda2 237M 222M 2.8M 99% /boot
/dev/sda1 511M 3.4M 508M 1% /boot/efi

presumably the message refers to /dev/sda2 ???
Whatever that is! Does this shed any light on the problem.

Thanks for the replies so far.

Mike

rtmistler 11-03-2015 12:55 PM

Quote:

Originally Posted by Mike Fisher (Post 5444172)
the files system looks like this
Filesystem Size Used Avail Use Mounted on
/dev/mapper/ubuntu--vg-root 913G 13G 854G 2 /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.7G 4.0K 1.7G 1% /dev
tmpfs 334M 1.3M 333M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.7G 288K 1.7G 1% /run/shm
none 100M 28K 100M 1% /run/user
/dev/sda2 237M 222M 2.8M 99% /boot
/dev/sda1 511M 3.4M 508M 1% /boot/efi

presumably the message refers to /dev/sda2 ???
Whatever that is! Does this shed any light on the problem.

Thanks for the replies so far.

Mike

So what that says is that you are only using 2% of your disk. You're reading it incorrectly.

For your root file system that is. The boot partition is largely full, but that should not matter, it should be solely to contain the boot information which will not change. Root is "/", the first one. 854G available. And that is likely where your /home/[your username] directory is located.

Mike Fisher 11-03-2015 01:08 PM

Thanks all, especially rtmistler

rtmistler 11-03-2015 01:12 PM

No problem. Just realizing though that the whole reason you raised the question was because your system was complaining. Yes, there's 2.8'ish Meg left on the /boot partition. That really should not be a problem. I do wonder why it complains. It should not even be mounting /boot except to start up.

If you run a "mount" command, just that word from the terminal, does it show that /dev/sda2 is mounted anywhere? If mounted, at the very least it should be read-only "ro". Once again I do wonder why the system is complaining...

suicidaleggroll 11-03-2015 02:02 PM

It may cause a problem the next time he updates his kernel. If it tries to keep the older ones or if the new one is a few MB bigger than the one it removes, it'll cause trouble.

yancek 11-03-2015 04:12 PM

Ubuntu doesn't or doesn't always remove old kernels and people who have a separate boot partition often see this problem and have to manually remove older kernels. Lots of posts about this problem at the various Ubuntu forums. Posting the link I forgot in my earlier post.

http://ubuntuforums.org/showthread.php?t=2240697

Mike Fisher 11-04-2015 04:54 AM

Thanks all,

after following the link to the UBUNTU forum supplied by yancek (thanks) forum I executed the instruction

sudo apt-get autoremove

this freed up loads of space (presumably redundant old kernel stuff).

I then restarted and voila! no warnings so problem solved.

It is very comforting to know how helpful people want to be.

Much obliged.

Mike

yancek 11-04-2015 07:24 AM

You might want to bookmark that page or make a note of the command(s) as it is likely to happen again if you are doing regular updates of kernels. In some cases, a separate boot partition is useful or necessary but for the average user, it's not anymore.


All times are GMT -5. The time now is 10:14 AM.