LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /boot full (https://www.linuxquestions.org/questions/linux-newbie-8/boot-full-4175500755/)

alex100 04-06-2014 10:23 AM

/boot full
 
my /boot is 100% full and am trying to clear. I have several old kernels and have tried all of the methods for clearing listed in other posts but none seem to work. I am running Ubuntu Server 13.10. My current kernel is 3.11.0-17 although 3.11.0-19 is listed and but has never installed correctly due to lack of space. Any suggestions as I seem to be going in circles.

pingu 04-06-2014 11:49 AM

Can't you just delete old kernels, together with old initrd & config-files?

John VV 04-06-2014 01:49 PM

normally there will be 3 kernels
the current one being used
the one before that as a BACK UP
and the one before the ( now back up) as an emergency BACK UP

if there are more than that then you changed some setting to allow more
or to not remove old kernels

just how small is this boot partition ?

i have had NO problems with boot partitions as small as 100 meg
but some distros like BIG boot partitions
so 500 meg is a good size

alex100 04-06-2014 02:12 PM

I have tried Sudo apt-get purge (+ names of old kernel's), sudo apt-get remove, sudo apt-get clean etc etc but none of them seem to remove the old kernels. As an example when I run remove linux-image-3.8.0-31-generic I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
linux-image-extra-3.11.0-19-generic : Depends: linux-image-3.11.0-19-generic but it is not going to be installed
linux-image-extra-3.8.0-31-generic : Depends: linux-image-3.8.0-31-generic but it is not going to be installed
linux-image-generic : Depends: linux-image-3.11.0-19-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

if I then run apt-get -f install I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
attr bind9 bind9utils libhdb9-heimdal libkdc2-heimdal libndr-standard0
libndr0 libsamba-credentials0 libsamba-hostconfig0 libsamba-util0 libsamdb0
linux-headers-3.8.0-19 linux-headers-3.8.0-19-generic linux-headers-3.8.0-31
linux-headers-3.8.0-31-generic linux-headers-3.8.0-32
linux-headers-3.8.0-32-generic linux-headers-3.8.0-33
linux-headers-3.8.0-33-generic linux-headers-3.8.0-34
linux-headers-3.8.0-34-generic linux-image-3.8.0-19-generic
linux-image-3.8.0-31-generic linux-image-3.8.0-32-generic
linux-image-3.8.0-33-generic linux-image-3.8.0-34-generic
linux-image-extra-3.8.0-19-generic linux-image-extra-3.8.0-31-generic
linux-image-extra-3.8.0-32-generic linux-image-extra-3.8.0-33-generic
linux-image-extra-3.8.0-34-generic python-dnspython python-ldb python-talloc
python-tdb
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-image-3.11.0-19-generic
Suggested packages:
fdutils linux-doc-3.11.0 linux-source-3.11.0 linux-tools
The following NEW packages will be installed
linux-image-3.11.0-19-generic
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
10 not fully installed or removed.
Need to get 0 B/14.5 MB of archives.
After this operation, 39.8 MB of additional disk space will be used.
Do you want to continue [Y/n]?

if I click Y I get:

(Reading database ... 343703 files and directories currently installed.)
Unpacking linux-image-3.11.0-19-generic (from .../linux-image-3.11.0-19-generic_3.11.0-19.33_amd64.deb) ...
Done.
dpkg: error processing /var/cache/apt/archives/linux-image-3.11.0-19-generic_3.11.0-19.33_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-3.11.0-19-generic' to '/boot/vmlinuz-3.11.0-19-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-19-generic /boot/vmlinuz-3.11.0-19-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-19-generic /boot/vmlinuz-3.11.0-19-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.11.0-19-generic_3.11.0-19.33_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

So am getting nowhere!

alex100 04-06-2014 02:16 PM

also for info the partition with /boot is 257MB

pingu 04-06-2014 02:25 PM

How about
# rm /boot/vmlinuz-3.8.0-31-generic
# rm /boot/initrd.img-3.8.0-31-generic
?
Or, like the message says:
# apt-get autoremove

alex100 04-06-2014 02:48 PM

sudo apt-get autoremove does nothing! (have tried several times and everything is still there!) When I run I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run ‚apt-get -f install‚ to correct these.
The following packages have unmet dependencies.
linux-image-extra-3.11.0-19-generic : Depends: linux-image-3.11.0-19-generic but it is not installed
linux-image-generic : Depends: linux-image-3.11.0-19-generic but it is not installed
E: Unmet dependencies. Try using -f.

pingu 04-06-2014 03:32 PM

So just delete the old kernels & initrd. Then there should be space enough to install the newest kernel.

Now sometimes, when apt gets screwed up completely - like when you run out of space - you'll have to repeat commands several times before everything is back to normal. It has happened to me, I don't remember exactly what I did but trying to recall.
So you run "apt-get remove linux-image-extra-3.11.0-19-generic" "apt-get -f install" over and over. Also pay attention to messages you get, maybe apt gets stuck on some other package then try to remove it. Again, " apt-get remove <whatever_package_name>".

But my first choice would still be to delete very old stuff from /boot/ and try with "apt-get -f install".

Another way to do it is to unmount /boot, remount it somewhere else like /mnt/myboot, copy everything to /boot which now resides on same partition as / meaning there's lots of space.
Then try to install new kernel again. As there is space enough this should work.

JeremyBoden 04-06-2014 06:53 PM

Solution (for the future)
Put /boot in the same partition as /usr

jefro 04-07-2014 06:51 PM

The OP created a /boot partition. It is a common task.
/boot may need to be a separate partition in systems than can't boot to high partitions. Other reasons too exist for this choice.

The solution would be to create larger /boot partitions upon install. It's a stinker to make it larger later. Kernels are getting larger and larger. An update or two and your default 100m partition is full.


All times are GMT -5. The time now is 03:20 AM.