Linux Lite Forums

Software - Support => Other => Topic started by: mandoran on July 31, 2015, 10:27:57 AM

Title: 'Not enough free disk space' for updates
Post by: mandoran on July 31, 2015, 10:27:57 AM
I've encountered a problem with regular updates for LL 2.4 - I am supposedly 21.2 MB short on "disk /boot" for an 82.8MB download and despite following instructions (emptying trash and running sudo apt-get clean) the update insists the lack of space remains.

What can I do?
Title: Re: 'Not enough free disk space' for updates
Post by: UltraCookie on July 31, 2015, 11:43:24 AM
Are you sure you have enough free space on the /boot partition?

try this
Code: [Select]
df -h
Title: Re: 'Not enough free disk space' for updates
Post by: mandoran on July 31, 2015, 11:46:04 AM
Thanks - the info there is: /dev/sda1                   236M  165M   59M  74% /boot
so I do seem a bit short, which doesn't surprise me.

I guess the correct question is how I can create more space?
Title: Re: 'Not enough free disk space' for updates
Post by: UltraCookie on July 31, 2015, 12:32:03 PM
I found this one-liner

Code: [Select]
dpkg --get-selections|grep 'linux-image*'|awk '{print $1}'|egrep -v "linux-image-$(uname -r)|linux-image-generic" |while read n;do apt-get -y remove $n;done
from here (http://ubuntuforums.org/showthread.php?t=1435818)

maybe it helps.

PS: you need to run the command in a root terminal. just adding sudo does not work.
Title: Re: 'Not enough free disk space' for updates
Post by: mandoran on July 31, 2015, 12:47:25 PM
Something i used to do which I think would help, was to search on Linux-generic in Synaptic and then completely remove everything but the current and previous versions. Am I right in thinking this is both safe and helpful?

Ah, Lite Tweaks is probably the safest way to do this...
Title: Re: 'Not enough free disk space' for updates
Post by: N4RPS on July 31, 2015, 07:16:01 PM
Hello!

Yes, if you have old kernels on /boot, removing them should get you the space you need. You could try GPartEd in a LiveCD/LiveUSB to 'grow'  it, but that can get flaky when /boot comes into play.

In the future, if you can, you might want to make /boot a tad larger...

73 DE N4RPS
Rob
Rob
Title: Re: 'Not enough free disk space' for updates
Post by: rokytnji on July 31, 2015, 09:49:05 PM
Resizing is done with livecd like Parted Magic Iso, Linux Lite 2.4 live.

You shrink the drive you wish to borrow the space from for boot. It cannot be on a extended partition however (the one you need to borrow space from.
Shrink it. When done. Resize the /boot to grab the extra space. Hit apply. Done.

Latest gparted live cd  if you need just a small iso for just partitioning work. I keep one on my cd rack.
http://gparted.org/livecd.php (http://gparted.org/livecd.php)

Code: [Select]
df -h --total
will tell you where everything is and

Code: [Select]
sudo parted -l
should inform you of extended/logical partitions.
Code: [Select]
sudo parted -l
Model: ATA SAMSUNG HM321HI (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  106MB  105MB   primary   ntfs            boot
 2      106MB   123GB  122GB   primary   ntfs
 3      123GB   320GB  198GB   extended
 6      123GB   141GB  19.0GB  logical   ext4
 5      141GB   316GB  174GB   logical   ext4
 7      316GB   320GB  4193MB  logical   linux-swap(v1)

If my /boot partition is above extended. I have to borrow space from ntfs primary and shrink that one.
If my /boot partition is below extended. I have to borrow space from ext4  and borrow space for either one of those. One is my / root. The other is /home.
Title: Re: 'Not enough free disk space' for updates
Post by: N4RPS on July 31, 2015, 10:51:09 PM
Hello!

Thanks, rokytnji, for 'filling in the blanks' on this one!

73 DE N4RPS
Rob