What happens when the /boot partition is full?
Hi. I think because the auto-update is on, old kernels and their dependencies continuously fill up the /boot partition. Can someone tell me if this is an issue? That is, will it affect cron jobs or any other processes on a virtual machine?
I just figured out how to manually purge them using the command prompt. But it seems to be a design flaw in Ubuntu, no?
How to correctly turn off auto-updates at the command prompt?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Manfred Hampl
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
When the /boot partition fills you cannot install more kernels. The old kernels are kept to allow users to boot to older kernels if a new one causes an issue. I agree it's annoying and users having to manually remove lots of ancient kernels is stupid.
You could report a bug, maybe the postinst script could uninstall all but the last 3 kernels (as an option in settings)
Revision history for this message
|
#2 |
What Ubuntu release are you running?
Since 14.04 the old kernels are marked as 'no more required', such that they can be easily removed with the command
sudo apt-get --purge autoremove
And back to your original question:
The only effect of a full /boot partition is that new kernels can no more be installed. Everything else (cron, etc.) should happen outside the /boot partition and should not be affected (as long as there is enough free space on the root partition / )
I would not recommend to disable updates, because bug fixes are delivered via that mechanism. Think back a few weeks to shellshock, heartbleed, ...
What is the output of the terminal commands
uname -a
lsb_release -crid
dpkg -l | egrep ' linux-[hi]'
df -h
df -i
This should provide some information about your system and might help in giving more answers.
Revision history for this message
|
#3 |
Ubuntu Tweak can do it for you. I know guys with a cron job to do the job.
Revision history for this message
|
#4 |
Manfred, here are the outputs:
> uname -a
Linux MachineName 3.5.0-45-generic #68~precise1-Ubuntu SMP Wed Dec 4 16:18:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
>dpkg -l | egrep ' linux-[hi]'ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-image-
>df -h
/dev/mapper/
udev 989M 4.0K 989M 1% /dev
tmpfs 200M 768K 199M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 999M 0 999M 0% /run/shm
/dev/sdb1 74G 795M 70G 2% /mnt/2ndHDD
/dev/sda1 228M 29M 187M 14% /boot
> df -I
/dev/mapper/
udev 253136 454 252682 1% /dev
tmpfs 255538 398 255140 1% /run
none 255538 5 255533 1% /run/lock
none 255538 1 255537 1% /run/shm
/dev/sdb1 4915200 3691 4911509 1% /mnt/2ndHDD
/dev/sda1 124496 232 124264 1% /boot
Revision history for this message
|
#5 |
Ok, thanks for the output.
You are running Ubuntu 12.04, so the command about just running 'sudo apt-get autoremove' will not work for your system. You have to use different mechanisms for cleaning up obsolete kernel packages.
Your /dev/sda1 partition that is the /boot directory has 228 MB size. This enables you to have about five or six kernel packages installed at the same time. It is a common practice to delete all except the two or three newest ones whenever the package updater has installed a new one.
What puzzles me a bit is the fact that I see only one kernel package on your system, which is already one and a half years old. So apparently you currently do not get updates and bug fixes on the kernel image package.
My recommendations:
Install linux-generic-
Install ubuntu-tweak from the tualatrix ppa and once a month start ubuntu-tweak and use the janitor function to remove obsolete kernel packages.
Revision history for this message
|
#7 |
I do not have a server and I do not use auto-updates, so I do not have any experience with that.
I update my systems manually.
General answers:
The command "dpkg -l" lists the status of packages on your system. There are different status codes shown in the first column. The most common ones are ii and rc.
ii tells that the package is successfully installed
rc indicates that the packages was installed, has successfully been removed, and just configuration files are left.
If a kernel package has been uninstalled because it has been made obsolete by later versions, then you will never need its configuration files again, and you might clean them up.
All configuration files left over from uninstalled packages can be removed with the command
dpkg -l | grep '^rc' | awk '{print $2}' | xargs sudo dpkg --purge
If you do this on that second system, then re-running "dpkg -l | egrep ' linux-[hi]'" should show only the Linux-image packages installed with versions 3.2.0-60.91, 3.2.0-82.119 and 3.2.0-83.120. This is acceptable. You might think of purging also the 3.2.0-60 version if you are sure that your system has already been rebooted into a newer kernel.
You can avoid that the configuration files are left behind, if you use different parameters or add certain options to the uninstallation command ("sudo apt-get purge packagename" instead of "sudo apt-get remove packagename" or "sudo apt-get remove --purge packagename"; similar for dpkg).
My general advice for all systems (desktops and servers, no difference whether automatic updates are installed or not):
Regularly do housekeeping (frequency should be between once a week and once a month):
issue "sudo apt-get update && sudo apt-get dist-upgrade" to install all available updates (unless they are already installed by automatic updates)
issue the "dpkg -l | egrep ' linux-[hi]'" command to check for the number and versions of installed kernel packages (both headers and image)
use uname -a to verify the version number of the running kernel
if you are not running the newest kernel version, reboot the system (of course you have to choose a suitable moment, not to disturb normal server operations)
when the newest kernel is working without problems purge old kernel image and kernel header packages, leaving only those with the highest two (eventually three) version numbers installed.
Revision history for this message
|
#8 |
Thanks Manfred Hampl, that solved my question.
Revision history for this message
|
#9 |
Sorry Manfred, I always have problems removing kernels when the /boot is full. I have tried apt-get purge and apt-get remove --purge to manually remove old kernels, but I run into problems. Also, I now understand ii and rc, but what is IF? Below, I did the following so far:
>dpkg -l | grep '^rc' | awk '{print $2}' | xargs sudo dpkg --purge
(fine; it removed a lot of rc)
>uname -a
Linux MachineName 3.2.0-74-generic #109-Ubuntu SMP Tue Dec 9 16:45:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
>dpkg -l | egrep ' linux-[hi]'
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
iF linux-image-
iF linux-image-
iU linux-image-server 3.2.0.80.94 Linux kernel image on Server Equipment.
>df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/
udev 486M 12K 486M 1% /dev
tmpfs 99M 292K 99M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 495M 0 495M 0% /run/shm
/dev/sda1 228M 225M 0 100% /boot
>df -I
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/
udev 124323 436 123887 1% /dev
tmpfs 126590 339 126251 1% /run
none 126590 4 126586 1% /run/lock
none 126590 1 126589 1% /run/shm
/dev/sda1 124496 279 124217 1% /boot
>apt-get purge linux-image-
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-server : Depends: linux-headers-
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
>apt-get remove --purge linux-image-
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-server : Depends: linux-headers-
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
>apt-get -f install
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:
linux-
linux-
linux-
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-
Suggested packages:
fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools
The following NEW packages will be installed:
linux-
The following packages will be upgraded:
linux-
3 upgraded, 3 newly installed, 0 to remove and 34 not upgraded.
4 not fully installed or removed.
Need to get 51.5 MB of archives.
After this operation, 218 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Fetched 51.5 MB in 1min 4s (799 kB/s)
Selecting previously unselected package linux-headers-
(Reading database ... 268323 files and directories currently installed.)
Unpacking linux-headers-
Selecting previously unselected package linux-headers-
Unpacking linux-headers-
Preparing to replace linux-headers-
Unpacking replacement linux-headers-
Selecting previously unselected package linux-image-
Unpacking linux-image-
Done.
dpkg: error processing /var/cache/
failed in write on buffer copy for backend dpkg-deb during `./boot/
No apport report written because the error message indicates a disk full error
Examining /etc/kernel/
run-parts: executing /etc/kernel/
run-parts: executing /etc/kernel/
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
Revision history for this message
|
#10 |
iF has a meaning of "should be installed, but failed"
Your /boot partition again is full. You have nine different versions of the kernel installed, and tried adding two more.
Your boot partition has space only for maximum nine of them.
Try
sudo dpkg --purge ii linux-image-
sudo apt-get -f install
and report the outcome.
Revision history for this message
|
#11 |
Almost:
>sudo dpkg --purge ii linux-image-
(fine)
>sudo apt-get -f install
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:
linux-
linux-
linux-
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-
Suggested packages:
fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools
The following NEW packages will be installed:
linux-
The following packages will be upgraded:
linux-
2 upgraded, 1 newly installed, 0 to remove and 34 not upgraded.
7 not fully installed or removed.
Need to get 0 B/38.8 MB of archives.
After this operation, 150 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 269676 files and directories currently installed.)
Unpacking linux-image-
Done.
Setting up linux-image-
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/
run-parts: executing /etc/kernel/
run-parts: executing /etc/kernel/
update-initramfs: Generating /boot/initrd.
run-parts: executing /etc/kernel/
run-parts: executing /etc/kernel/
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found linux image: /boot/vmlinuz-
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
done
Setting up linux-image-
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/
run-parts: executing /etc/kernel/
run-parts: executing /etc/kernel/
update-initramfs: Generating /boot/initrd.
run-parts: executing /etc/kernel/
run-parts: executing /etc/kernel/
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
done
Setting up linux-headers-
Setting up linux-headers-
Setting up linux-image-
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/
run-parts: executing /etc/kernel/
run-parts: executing /etc/kernel/
update-initramfs: Generating /boot/initrd.
run-parts: executing /etc/kernel/
run-parts: executing /etc/kernel/
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
done
Setting up linux-image-server (3.2.0.80.94) ...
Setting up linux-headers-
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-headers-
Version of linux-headers-
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
>df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/
udev 486M 12K 486M 1% /dev
tmpfs 99M 292K 99M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 495M 0 495M 0% /run/shm
/dev/sda1 228M 163M 53M 76% /boot
Revision history for this message
|
#12 |
Did you try Ubuntu Tweak to clean up the old kernels?
Revision history for this message
|
#13 |
actionparsnip: not yet. I plan to try it. Maybe I can eventually make that into a cron job. But when at the point where the /boot is completely full, not even the simple manual purging commands work. We should get the system properly working again before trying that. I think we made headway above and are almost there, though.
Correct me if I am wrong with my logic: but the auto-update is a cron job (i.e. test -x etc...). When the /boot is full, the cron job errors. Am I right that any other cron job will also fail?
Revision history for this message
|
#14 |
One more thing, we just deleted the following kernel above that the system is currently using...?
>uname -r
linux-image-
Revision history for this message
|
#15 |
Oops. If uname shows that you are running the linux-image-
The update-grub shows that there are now several newer kernel version installed, and I am rather confident that rebooting will select another one and will be able to boot again.
cron jobs are independent of each other. So one failing job should not influence the other ones.
Is this a server without xorg environment? Then you cannot use Ubuntu-tweak.
Try
sudo apt-get update
sudo apt-get install -f
sudo dpkg --audit
sudo apt-get dist-upgrade
and copy/paste all output into this question document as done before.
Revision history for this message
|
#16 |
>sudo apt-get update
Get:1 http://
Hit http://
Get:2 http://
Hit http://
Hit http://
Get:3 http://
Hit http://
Get:4 http://
Hit http://
Hit http://
Get:5 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Hit http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Get:18 http://
Get:19 http://
Get:20 http://
Get:21 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Get:22 http://
Get:23 http://
Hit http://
Get:24 http://
Get:25 http://
Get:26 http://
Get:27 http://
Get:28 http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Hit http://
Fetched 4,838 kB in 14s (323 kB/s)
Reading package lists... Done
> sudo apt-get install -f
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:
linux-
linux-
linux-
linux-
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-server
The following packages will be upgraded:
linux-server
1 upgraded, 0 newly installed, 0 to remove and 34 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,734 B of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.80.94); however:
Version of linux-image-server on system is 3.2.0.84.98.
linux-server depends on linux-headers-
Version of linux-headers-
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
>sudo dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
linux-server Complete Linux kernel on Server Equipment.
> sudo apt-get dist-upgrade
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-server : Depends: linux-image-server (= 3.2.0.80.94) but 3.2.0.84.98 is installed
E: Unmet dependencies. Try using -f.
Revision history for this message
|
#17 |
Tried the following command too, but it also errors on Linux-server
>sudo apt-get dist-upgrade -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following NEW packages will be installed:
python-configobj
The following packages will be upgraded:
apt apt-transport-https apt-utils curl dosfstools landscape-common libapt-inst1.4 libapt-pkg4.12 libc-bin libc6 libcurl3
libcurl3-gnutls libmysqlclient18 libpython2.7 libssl1.0.0 libtasn1-3 libudev0 linux-server mountall multiarch-support
mysql-client mysql-client-5.6 mysql-common mysql-server mysql-server-5.6 mysql-server-
python-apt-common python2.7 python2.7-minimal udev update-manager-core
35 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 27.6 MB/27.6 MB of archives.
After this operation, 1,660 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Get:14 http://
Get:15 http://
Get:16 http://
Get:17 http://
Get:18 http://
Get:19 http://
Get:20 http://
Get:21 http://
Get:22 http://
Get:23 http://
Get:24 http://
Get:25 http://
Get:26 http://
Get:27 http://
Get:28 http://
Get:29 http://
Get:30 http://
Get:31 http://
Get:32 http://
Get:33 http://
Get:34 http://
Get:35 http://
Fetched 27.6 MB in 34s (794 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 273820 files and directories currently installed.)
Preparing to replace libc-bin 2.15-0ubuntu10.11 (using .../libc-
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
Setting up libc-bin (2.15-0ubuntu10.12) ...
(Reading database ... 273820 files and directories currently installed.)
Preparing to replace libc6 2.15-0ubuntu10.11 (using .../libc6_
Unpacking replacement libc6 ...
Setting up libc6 (2.15-0ubuntu10.12) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
(Reading database ... 273820 files and directories currently installed.)
Preparing to replace libapt-pkg4.12 0.8.16~
Unpacking replacement libapt-pkg4.12 ...
Setting up libapt-pkg4.12 (0.8.16~
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
(Reading database ... 273820 files and directories currently installed.)
Preparing to replace apt 0.8.16~
Unpacking replacement apt ...
Processing triggers for man-db ...
Setting up apt (0.8.16~
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <email address hidden>" not changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <email address hidden>" not changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) <email address hidden>" not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) <email address hidden>" not changed
gpg: Total number processed: 4
gpg: unchanged: 4
(Reading database ... 273820 files and directories currently installed.)
Preparing to replace libssl1.0.0 1.0.1-4ubuntu5.25 (using .../libssl1.
Unpacking replacement libssl1.0.0 ...
Setting up libssl1.0.0 (1.0.1-4ubuntu5.27) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
(Reading database ... 273820 files and directories currently installed.)
Preparing to replace libapt-inst1.4 0.8.16~
Unpacking replacement libapt-inst1.4 ...
Preparing to replace libudev0 175-0ubuntu9.8 (using .../libudev0_
Unpacking replacement libudev0 ...
Preparing to replace procps 1:3.2.8-11ubuntu6.3 (using .../procps_
Unpacking replacement procps ...
Preparing to replace udev 175-0ubuntu9.8 (using .../udev_
Adding 'diversion of /sbin/udevadm to /sbin/udevadm.
Unpacking replacement udev ...
Preparing to replace mountall 2.36.4 (using .../mountall_
Unpacking replacement mountall ...
Preparing to replace libcurl3-gnutls 7.22.0-3ubuntu4.12 (using .../libcurl3-
Unpacking replacement libcurl3-gnutls ...
Preparing to replace libtasn1-3 2.10-1ubuntu1.3 (using .../libtasn1-
Unpacking replacement libtasn1-3 ...
Preparing to replace libcurl3 7.22.0-3ubuntu4.12 (using .../libcurl3_
Unpacking replacement libcurl3 ...
Preparing to replace mysql-common 5.6.21+
Unpacking replacement mysql-common ...
Preparing to replace libmysqlclient18 5.6.21+
Unpacking replacement libmysqlclient18 ...
Preparing to replace mysql-server 5.6.21+
Unpacking replacement mysql-server ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up mysql-common (5.6.22+
(Reading database ... 273821 files and directories currently installed.)
Preparing to replace mysql-server-5.6 5.6.21+
* Stopping MySQL database server mysqld [ OK ]
* Stopping MySQL database server mysqld [ OK ]
Unpacking replacement mysql-server-5.6 ...
Preparing to replace mysql-client 5.6.21+
Unpacking replacement mysql-client ...
Preparing to replace mysql-client-5.6 5.6.21+
Unpacking replacement mysql-client-5.6 ...
Preparing to replace mysql-server-
Unpacking replacement mysql-server-
Preparing to replace multiarch-support 2.15-0ubuntu10.11 (using .../multiarch-
Unpacking replacement multiarch-support ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up multiarch-support (2.15-0ubuntu10.12) ...
(Reading database ... 273821 files and directories currently installed.)
Preparing to replace libpython2.7 2.7.3-0ubuntu3.5 (using .../libpython2.
Unpacking replacement libpython2.7 ...
Preparing to replace python2.7 2.7.3-0ubuntu3.5 (using .../python2.
Unpacking replacement python2.7 ...
Preparing to replace python2.7-minimal 2.7.3-0ubuntu3.5 (using .../python2.
Unpacking replacement python2.7-minimal ...
Processing triggers for man-db ...
Setting up python2.7-minimal (2.7.3-0ubuntu3.6) ...
(Reading database ... 273821 files and directories currently installed.)
Preparing to replace apt-utils 0.8.16~
Unpacking replacement apt-utils ...
Preparing to replace apt-transport-https 0.8.16~
Unpacking replacement apt-transport-https ...
Preparing to replace dosfstools 3.0.12-1ubuntu1.1 (using .../dosfstools_
Unpacking replacement dosfstools ...
Preparing to replace openssl 1.0.1-4ubuntu5.25 (using .../openssl_
Unpacking replacement openssl ...
Preparing to replace ppp 2.4.5-5ubuntu1.1 (using .../ppp_
Unpacking replacement ppp ...
Preparing to replace python-apt-common 0.8.3ubuntu7.2 (using .../python-
Unpacking replacement python-apt-common ...
Preparing to replace python-apt 0.8.3ubuntu7.2 (using .../python-
Unpacking replacement python-apt ...
Preparing to replace update-manager-core 1:0.156.14.17 (using .../update-
Unpacking replacement update-manager-core ...
Preparing to replace curl 7.22.0-3ubuntu4.12 (using .../curl_
Unpacking replacement curl ...
Selecting previously unselected package python-configobj.
Unpacking python-configobj (from .../python-
Preparing to replace landscape-common 13.07.3-
Unpacking replacement landscape-common ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.80.94); however:
Version of linux-image-server on system is 3.2.0.84.98.
linux-server depends on linux-headers-
Version of linux-headers-
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up libudev0 (175-0ubuntu9.9) ...
Setting up procps (1:3.2.
procps stop/waiting
Setting up udev (175-0ubuntu9.9) ...
udev stop/waiting
udev start/running, process 64328
Removing 'diversion of /sbin/udevadm to /sbin/udevadm.
update-initramfs: deferring update (trigger activated)
Setting up mountall (2.36.4ubuntu0.1) ...
Installing new version of config file /etc/init/
Setting up libcurl3-gnutls (7.22.0-
Setting up libtasn1-3 (2.10-1ubuntu1.4) ...
Setting up libcurl3 (7.22.0-
Setting up libmysqlclient18 (5.6.22+
Setting up mysql-client-5.6 (5.6.22+
Setting up mysql-server-
Setting up mysql-server-5.6 (5.6.22+
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for tables which need an upgrade, are corrupt or were
not closed cleanly.
Setting up mysql-server (5.6.22+
Setting up mysql-client (5.6.22+
Setting up python2.7 (2.7.3-0ubuntu3.6) ...
Setting up libpython2.7 (2.7.3-0ubuntu3.6) ...
Setting up apt-utils (0.8.16~
Setting up apt-transport-https (0.8.16~
Setting up dosfstools (3.0.12-1ubuntu1.2) ...
Setting up openssl (1.0.1-4ubuntu5.27) ...
Setting up ppp (2.4.5-5ubuntu1.2) ...
Setting up python-apt-common (0.8.3ubuntu7.3) ...
Setting up python-apt (0.8.3ubuntu7.3) ...
Setting up update-manager-core (1:0.156.14.19) ...
Setting up curl (7.22.0-
Setting up python-configobj (4.7.2+ds-3build1) ...
Setting up landscape-common (14.12-
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.
Errors were encountered while processing:
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Revision history for this message
|
#18 |
>apt-get autoremove -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
linux-server
The following packages will be REMOVED:
linux-
linux-
linux-
linux-
The following packages will be upgraded:
linux-server
1 upgraded, 0 newly installed, 16 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,734 B of archives.
After this operation, 1,008 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 273887 files and directories currently installed.)
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-headers-
Removing linux-image-
Examining /etc/kernel/
run-parts: executing /etc/kernel/
update-initramfs: Deleting /boot/initrd.
run-parts: executing /etc/kernel/
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-
Examining /etc/kernel/
run-parts: executing /etc/kernel/
update-initramfs: Deleting /boot/initrd.
run-parts: executing /etc/kernel/
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-
Examining /etc/kernel/
run-parts: executing /etc/kernel/
update-initramfs: Deleting /boot/initrd.
run-parts: executing /etc/kernel/
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-
Examining /etc/kernel/
run-parts: executing /etc/kernel/
update-initramfs: Deleting /boot/initrd.
run-parts: executing /etc/kernel/
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
done
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.80.94); however:
Version of linux-image-server on system is 3.2.0.84.98.
linux-server depends on linux-headers-
Version of linux-headers-
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Revision history for this message
|
#19 |
What is the output of
apt-cache policy linux-server linux-image-server linux-headers-
Revision history for this message
|
#20 |
apt-cache policy linux-server linux-image-server linux-headers-
linux-server:
Installed: 3.2.0.80.94
Candidate: 3.2.0.84.98
Version table:
3.2.0.84.98 0
500 http://
500 http://
*** 3.2.0.80.94 0
100 /var/lib/
3.2.0.23.25 0
500 http://
linux-image-server:
Installed: 3.2.0.84.98
Candidate: 3.2.0.84.98
Version table:
*** 3.2.0.84.98 0
500 http://
500 http://
100 /var/lib/
3.2.0.23.25 0
500 http://
linux-headers-
Installed: 3.2.0.84.98
Candidate: 3.2.0.84.98
Version table:
*** 3.2.0.84.98 0
500 http://
500 http://
100 /var/lib/
3.2.0.23.25 0
500 http://
Revision history for this message
|
#21 |
Try
sudo apt-get install linux-server -f
Revision history for this message
|
#22 |
>sudo apt-get install linux-server -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
linux-server
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,734 B of archives.
After this operation, 1,024 B of additional disk space will be used.
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.80.94); however:
Version of linux-image-server on system is 3.2.0.84.98.
linux-server depends on linux-headers-
Version of linux-headers-
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Revision history for this message
|
#23 |
Maybe it works with this modified command:
sudo apt-get install linux-server- linux-server -f
Revision history for this message
|
#24 |
>apt-get install linux-server linux-server -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
linux-server
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,734 B of archives.
After this operation, 1,024 B of additional disk space will be used.
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.80.94); however:
Version of linux-image-server on system is 3.2.0.84.98.
linux-server depends on linux-headers-
Version of linux-headers-
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can we provide the 3.2.0.84.94 dependency file that it is looking?
Revision history for this message
|
#25 |
You mistyped my command (a trailing dash missing after the first occurrence of linux-server)
Try again, and if it fails again, try
sudo dpkg -i /var/cache/
Revision history for this message
|
#26 |
trailing dash didn't work.
>sudo dpkg -i /var/cache/
(Reading database ... 125033 files and directories currently installed.)
Preparing to replace linux-server 3.2.0.80.94 (using .../linux-
Unpacking replacement linux-server ...
Setting up linux-server (3.2.0.84.98) ...
>
Revision history for this message
|
#27 |
Ok, that now looks fine.
For verifying the status of your system now please execute
uname -a
lsb_release -crid
sudo dpkg --audit
sudo apt-get update
sudo apt-get dist-upgrade
df -h
df -i
dpkg -l | egrep ' linux-[hi]'
and copy/paste all output into this document as done before.
Revision history for this message
|
#28 |
Brilliant!
apt-get dis-upgrade works again!
:-)
Revision history for this message
|
#30 |
>lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise
>sudo dpkg --audit
>
>sudo apt-get update
(fine)
>sudo apt-get dis-upgrade
(fine)
>df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/
udev 486M 4.0K 486M 1% /dev
tmpfs 99M 264K 99M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 495M 0 495M 0% /run/shm
/dev/sda1 228M 73M 144M 34% /boot
>df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/
udev 124322 435 123887 1% /dev
tmpfs 126589 331 126258 1% /run
none 126589 4 126585 1% /run/lock
none 126589 1 126588 1% /run/shm
/dev/sda1 124496 241 124255 1% /boot
>dpkg -l | egrep ' linux-[hi]'
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-server 3.2.0.84.98 Linux kernel image on Server Equipment.
Shall we purge some old kernels?
Revision history for this message
|
#31 |
Thanks Manfred Hampl, that solved my question.
Revision history for this message
|
#32 |
Your /boot partition seems to have space for about eight versions of the kernel packages, an you currently have three of them installed. So there is no need to remove some of them now. But you can expect that there will be updates on the kernel packages, and you will run out of space again if you do not keep an eye on the number of kernel packages installed.
My recommendation already given above:
Regularly do housekeeping (frequency should be between once a week and once a month):
issue "sudo apt-get update && sudo apt-get dist-upgrade" to install all available updates (unless they are already installed by automatic updates)
issue the "dpkg -l | egrep ' linux-[hi]'" command to check for the number and versions of installed kernel packages (both headers and image)
use uname -a to verify the version number of the running kernel
if you are not running the newest kernel version, reboot the system (of course you have to choose a suitable moment, not to disturb normal server operations)
when the newest kernel is working without problems purge old kernel image and kernel header packages, leaving only those with the highest two (eventually three) version numbers installed.
Command for purging the kernel packages:
taking the output of "dpkg -l | egrep ' linux-[hi]'"
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-headers-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-server 3.2.0.84.98 Linux kernel image on Server Equipment.
Linux images installed: 3.2.0-80, 3.2.0-82, 3.2.0-84
If you want to reduce the number to two, you can purge the 3.2.0-80 package.
Linux headers installed: 3.2.0-74, 3.2.0-80, 3.2.0-82, 3.2.0-84 (note, they come in pairs)
In line with the installed kernel images you should purge 3.2.0-74 and 3.2.0-80
You should verify the kernel that you have booted from with the "uname -a" command to make sure that you do not use one of the kernels that you are going to remove. (After rebooting the kernel with the highest number should be used, if not then there is something wrong).
Command to execute:
sudo dpkg --purge \
linux-headers-
linux-headers-
linux-headers-
linux-headers-
linux-image-
Revision history for this message
|
#33 |
Much obliged, Manfred.
Is this worth creating a ticket for a future fix in an update for 12.04.5?
It gets back to my other question about how to increase the /boot partition. On some of my other machines, the /boot is 5GB verses 225M on others. I would like to increase the 225M to give me more breathing room.
Revision history for this message
|
#34 |
Increasing the size of a partition usually requires shrinking other partitions and moving partitions around. This is something that I would try to avoid. You better just stick to regular housekeeping, and everything should be fine.