Ubuntu Boot Issues
-
Before performing some updates on a system I thought it best to check on it and view it's health. Upon sign in I was greeted with this:
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-103-generic x86_64) * Documentation: https://help.ubuntu.com/ System information as of Tue Feb 7 09:28:15 EST 2017 System load: 0.02 Processes: 215 Usage of /: 25.6% of 48.33GB Users logged in: 0 Memory usage: 79% IP address for eth0: 192.168.2.151 Swap usage: 18% => /boot is using 98.7% of 227MB
Doesn't seem like a huge ordeal to address, just purge the unused / unneeded kernels and things should be fine.
I started here with how to clean up the
/boot
Safest way to clean up the boot partition on Ask Ubuntu
The favored response starts with
uname -r
-$ uname -r 3.13.0-103-generic
Then
dpkg --list 'linux-image*'
:~$ dpkg --list 'linux-image*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==========================-==================-==================-========================================================== un linux-image <none> <none> (no description available) un linux-image-3.0 <none> <none> (no description available) ii linux-image-3.13.0-100-gen 3.13.0-100.147 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-101-gen 3.13.0-101.148 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-103-gen 3.13.0-103.150 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP in linux-image-3.13.0-105-gen <none> amd64 (no description available) ii linux-image-3.13.0-44-gene 3.13.0-44.73 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-46-gene 3.13.0-46.79 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-48-gene 3.13.0-48.80 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-49-gene 3.13.0-49.83 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-51-gene 3.13.0-51.84 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-55-gene 3.13.0-55.94 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-57-gene 3.13.0-57.95 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-58-gene 3.13.0-58.97 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-59-gene 3.13.0-59.98 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-61-gene 3.13.0-61.100 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-62-gene 3.13.0-62.102 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-63-gene 3.13.0-63.103 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP rc linux-image-3.13.0-93-gene 3.13.0-93.140 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-95-gene 3.13.0-95.142 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-96-gene 3.13.0-96.143 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.13.0-98-gene 3.13.0-98.145 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP ii linux-image-3.5.0-23-gener 3.5.0-23.35~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-27-gener 3.5.0-27.46~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-28-gener 3.5.0-28.48~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-30-gener 3.5.0-30.51~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-31-gener 3.5.0-31.52~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-32-gener 3.5.0-32.53~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-34-gener 3.5.0-34.55~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-37-gener 3.5.0-37.58~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-39-gener 3.5.0-39.60~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-3.5.0-54-gener 3.5.0-54.81~precis amd64 Linux kernel image for version 3.5.0 on 64 bit x86 SMP ii linux-image-extra-3.13.0-1 3.13.0-100.147 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 ii linux-image-extra-3.13.0-1 3.13.0-101.148 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 iF linux-image-extra-3.13.0-1 3.13.0-103.150 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 iU linux-image-extra-3.13.0-1 3.13.0-105.152 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 ii linux-image-extra-3.13.0-4 3.13.0-44.73 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-4 3.13.0-46.79 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-4 3.13.0-48.80 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-4 3.13.0-49.83 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-5 3.13.0-51.84 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-5 3.13.0-55.94 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-5 3.13.0-57.95 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-5 3.13.0-58.97 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-5 3.13.0-59.98 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-6 3.13.0-61.100 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 ii linux-image-extra-3.13.0-6 3.13.0-62.102 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-6 3.13.0-63.103 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 rc linux-image-extra-3.13.0-9 3.13.0-93.140 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 ii linux-image-extra-3.13.0-9 3.13.0-95.142 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 ii linux-image-extra-3.13.0-9 3.13.0-96.143 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 ii linux-image-extra-3.13.0-9 3.13.0-98.145 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x8 iU linux-image-generic 3.13.0.105.113 amd64 Generic Linux kernel image iU linux-image-generic-lts-qu 3.13.0.105.113 amd64 Generic Linux kernel image
As I am still unaccustomed to some of the dynamics of Linux I want to make sure that what I remote doesn't Bork the system.
I not sure what should be removed, but reading father down the article suggests just running
sudo apt-get autoremove
and this should be fine. -
I'll be interested to see what you come up with, as I went through the same thing a while back.
I ended up jut deleting almost every unused kernel, and that fixed it up for me.
-
Always use autoremove IMO.
-
@gjacobse said in Linux system maintenance; /boot nearly full:
I not sure what should be removed, but reading father down the article suggests just running
sudo apt-get autoremove
and this should be fine.Welcome to one of the many unpolished bits of Ubuntu compared to the other enterprise Linux offerings. It needs manual maintenance of updates. It's ridiculous. Yes, the autoremove option is the proper way to handle it.
-
Running that - manage to not be a member of the
sudo file
See you can run visudo to add, but still get same error. this is after signing out and back in.
-
@gjacobse said in Linux system maintenance; /boot nearly full:
Running that - manage to not be a member of the
sudo file
See you can run visudo to add, but still get same error. this is after signing out and back in.
How did you edit that file if you were not in that file?
-
Also, the sudoers file is not an appropriate place to store who is and who is not granted sudo access.
-
@scottalanmiller said in Linux system maintenance; /boot nearly full:
Also, the sudoers file is not an appropriate place to store who is and who is not granted sudo access.
please detail. It's easy enough to revert this file back to original and do 'correctly'.
-
I did all the auto removes and it still did not remove.
From my Googling of the issue, it was a common problem.
-
@gjacobse said in Linux system maintenance; /boot nearly full:
@scottalanmiller said in Linux system maintenance; /boot nearly full:
Also, the sudoers file is not an appropriate place to store who is and who is not granted sudo access.
please detail. It's easy enough to revert this file back to original and do 'correctly'.
The proper way to handle this is to have sudoers tell which group(s) are the one with access. The best group for this is the wheel group as that has been the admin group for UNIX since the beginning of time (IT time, at least.) Then you add yourself to the proper group. The sudoers file itself should not be a hodge podge of access permissions.
-
@BRRABill said in Linux system maintenance; /boot nearly full:
I did all the auto removes and it still did not remove.
From my Googling of the issue, it was a common problem.
Just ran into that same problem. Still showing 98% used.
-
@gjacobse said in Linux system maintenance; /boot nearly full:
@scottalanmiller said in Linux system maintenance; /boot nearly full:
Also, the sudoers file is not an appropriate place to store who is and who is not granted sudo access.
please detail. It's easy enough to revert this file back to original and do 'correctly'.
You should put them in /etc/sudoers.d/
Just create a file with whatever groups/users permissions for that local system.
All of the .d directories are dump directories. It makes it easier to copy configs between systems.
-
@gjacobse said:
@BRRABill said in Linux system maintenance; /boot nearly full:
I did all the auto removes and it still did not remove.
From my Googling of the issue, it was a common problem.
Just ran into that same problem. Still showing 98% used.
I have found with newer versions of Ubuntu (16.04 and 16.10) that "apt-get autoremove" won't remove kernels, but "apt autoremove" will.
-
@brianlittlejohn said in Linux system maintenance; /boot nearly full:
@gjacobse said:
@BRRABill said in Linux system maintenance; /boot nearly full:
I did all the auto removes and it still did not remove.
From my Googling of the issue, it was a common problem.
Just ran into that same problem. Still showing 98% used.
I have found with newer versions of Ubuntu (16.04 and 16.10) that "apt-get autoremove" won't remove kernels, but "apt autoremove" will.
I tried everything online, and nothing worked. I had to remove them manually.
Actually, I think it was so full, it wouldn't run anything.
It was a while ago...
-
Does this seem correct?
Open terminal and check your current kernel:
uname -r
DO NOT REMOVE THIS KERNEL!Next, type the command below to view/list all installed kernels on your system.
dpkg --list | grep linux-image
Find all the kernels that lower than your current kernel. When you know which kernel to remove, continue below to remove it. Run the commands below to remove the kernel you selected.sudo apt-get purge linux-image-x.x.x.x-generic
Finally, run the commands below to update grub2sudo update-grub2
Reboot your system.
-
@gjacobse said in Linux system maintenance; /boot nearly full:
Does this seem correct?
Open terminal and check your current kernel:
uname -r
DO NOT REMOVE THIS KERNEL!Next, type the command below to view/list all installed kernels on your system.
dpkg --list | grep linux-image
Find all the kernels that lower than your current kernel. When you know which kernel to remove, continue below to remove it. Run the commands below to remove the kernel you selected.sudo apt-get purge linux-image-x.x.x.x-generic
Finally, run the commands below to update grub2sudo update-grub2
Reboot your system.
I'm not sure if that worked for me either.
I had to manually remove them.
I did not update grub
-
Any attempt to remove old packages results in:
~$ sudo apt-get purge linux-image-3.13.0-48-generic 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.13.0-105-generic : Depends: linux-image-3.13.0-105-generic but it is not going to be installed linux-image-generic : Depends: linux-image-3.13.0-105-generic but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). ~~~
-
Have you tried the suggestion yet?
apt-get -f install
-
@scottalanmiller said in Linux system maintenance; /boot nearly full:
Have you tried the suggestion yet?
apt-get -f install
~$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: linux-image-3.13.0-105-generic Suggested packages: fdutils linux-doc-3.13.0 linux-source-3.13.0 linux-tools The following NEW packages will be installed: linux-image-3.13.0-105-generic 0 upgraded, 1 newly installed, 0 to remove and 18 not upgraded. 11 not fully installed or removed. Need to get 0 B/15.3 MB of archives. After this operation, 43.2 MB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 648954 files and directories currently installed.) Preparing to unpack .../linux-image-3.13.0-105-generic_3.13.0-105.152_amd64.deb ... Done. Unpacking linux-image-3.13.0-105-generic (3.13.0-105.152) ... dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-105-generic_3.13.0-105.152_amd64.deb (--unpack): cannot copy extracted data for './boot/System.map-3.13.0-105-generic' to '/boot/System.map-3.13.0-105-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.13.0-105-generic /boot/vmlinuz-3.13.0-105-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-105-generic /boot/vmlinuz-3.13.0-105-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.13.0-105-generic_3.13.0-105.152_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
Yes, and the above is the result.
-
Ah, the issue appears to be that you allowed the disk to fill to a point that the automated tools can no longer manage it.