UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
$ sudo apt install --reinstall linux-image-extra-4.4.0-112-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-53 linux-headers-4.4.0-53-generic
linux-image-4.4.0-53-generic linux-image-extra-4.4.0-53-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-extra-4.4.0-59-generic
0 upgraded, 0 newly installed, 1 reinstalled, 1 to remove and 5 not upgraded.
8 not fully installed or removed.
After this operation, 154 MB disk space will be freed.
Do you want to continue? [Y/n] y
E: Internal Error, No file name for linux-image-extra-4.4.0-112-generic:amd64
$ sudo apt install --reinstall linux-image-extra-4.4.0-112-generic
sudo: unable to resolve host vpsmisc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-53 linux-headers-4.4.0-53-generic
linux-image-4.4.0-53-generic linux-image-extra-4.4.0-53-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-extra-4.4.0-59-generic
0 upgraded, 0 newly installed, 1 reinstalled, 1 to remove and 5 not upgraded.
8 not fully installed or removed.
After this operation, 154 MB disk space will be freed.
Do you want to continue? [Y/n] y
E: Internal Error, No file name for linux-image-extra-4.4.0-112-generic:amd64
Says its not there. But it is isn't it?
Code:
$ 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)
ii linux-image-4. 4.4.0-112.13 amd64 Linux kernel image for version 4.
pi linux-image-4. 4.4.0-53.74 amd64 Linux kernel image for version 4.
un linux-image-4. <none> <none> (no description available)
iF linux-image-4. 4.4.0-62.83 amd64 Linux kernel image for version 4.
iF linux-image-ex 4.4.0-112.13 amd64 Linux kernel extra modules for ve
iF linux-image-ex 4.4.0-53.74 amd64 Linux kernel extra modules for ve
pH linux-image-ex 4.4.0-59.80 amd64 Linux kernel extra modules for ve
iU linux-image-ex 4.4.0-62.83 amd64 Linux kernel extra modules for ve
iU linux-image-ge 4.4.0.112.11 amd64 Generic Linux kernel image
Ok. Next attack is to try to install a completely new kernel, unrelated to any of those already semi-installed. First, just to check, let's confirm which kernel you are running (it should be 112):
Code:
uname -r
If it is indeed 112, then try the following (there should be enough room):
Code:
apt install linux-image-4.4.0-109-generic
We're just going to have to ignore apt's attempts to uninstall linux-image-extra-4.4.0-59-generic for the moment.
I have to admit that we're skating close to the edge of my knowledge (if we haven't surpassed it). I've never experienced a muddle like this before.
My first aim is to get you a fully installed and active kernel (I don't really care which one, but a recent one would be preferable).
It didn't take.. Not even sure how kernels got partially installed and not one fully installed kernel..
Code:
$ uname -r
4.4.0-112-generic
$ sudo apt install linux-image-4.4.0-109-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-53 linux-headers-4.4.0-53-generic
linux-image-4.4.0-53-generic linux-image-extra-4.4.0-53-generic
Use 'sudo apt autoremove' to remove them.
Suggested packages:
fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
linux-headers-4.4.0-109-generic
The following packages will be REMOVED:
linux-image-extra-4.4.0-59-generic
The following NEW packages will be installed:
linux-image-4.4.0-109-generic
0 upgraded, 1 newly installed, 1 to remove and 5 not upgraded.
8 not fully installed or removed.
Need to get 21.9 MB of archives.
After this operation, 86.9 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-4.4.0-109-generic amd64 4.4.0-109.132 [21.9 MB]
Fetched 21.9 MB in 0s (28.5 MB/s)
(Reading database ... 159874 files and directories currently installed.)
Removing linux-image-extra-4.4.0-59-generic (4.4.0-59.80) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-59-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-59-generic
depmod: WARNING: could not open /lib/modules/4.4.0-59-generic/modules.order: No such file or directory
depmod: WARNING: could not open /lib/modules/4.4.0-59-generic/modules.builtin: No such file or directory
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
depmod: WARNING: could not open /var/tmp/mkinitramfs_BumucA/lib/modules/4.4.0-59-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_BumucA/lib/modules/4.4.0-59-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-112-generic
Found initrd image: /boot/initrd.img-4.4.0-112-generic
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
done
Selecting previously unselected package linux-image-4.4.0-109-generic.
(Reading database ... 159874 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-109-generic_4.4.0-109.132_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-109-generic (4.4.0-109.132) ...
Setting up initramfs-tools (0.122ubuntu8.10) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-extra-4.4.0-112-generic (4.4.0-112.135) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-112-generic
Found initrd image: /boot/initrd.img-4.4.0-112-generic
Found linux image: /boot/vmlinuz-4.4.0-109-generic
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
done
Setting up linux-image-generic (4.4.0.112.118) ...
Setting up linux-generic (4.4.0.112.118) ...
Setting up linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
vmlinuz(/boot/vmlinuz-4.4.0-62-generic
) points to /boot/vmlinuz-4.4.0-62-generic
(/boot/vmlinuz-4.4.0-62-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-62-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-112-generic
Found initrd image: /boot/initrd.img-4.4.0-112-generic
Found linux image: /boot/vmlinuz-4.4.0-109-generic
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found initrd image: /boot/initrd.img-4.4.0-62-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
done
Setting up linux-image-extra-4.4.0-53-generic (4.4.0-53.74) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-53-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
gzip: stdout: No space left on device
E: mkinitramfs failure find 141 cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-53-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-53-generic (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up linux-image-extra-4.4.0-62-generic (4.4.0-62.83) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
gzip: stdout: No space left on device
E: mkinitramfs failure find 141 cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-62-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-62-generic (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up linux-image-4.4.0-109-generic (4.4.0-109.132) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-109-generic /boot/vmlinuz-4.4.0-109-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-109-generic /boot/vmlinuz-4.4.0-109-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-109-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-109-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-109-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-109-generic (--configure):
subprocess installed post-installation script returned error exit status 2
Processing triggers for initramfs-tools (0.122ubuntu8.10) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
gzip: stdout: No space left on device
E: mkinitramfs failure find 141 cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-extra-4.4.0-53-generic
linux-image-extra-4.4.0-62-generic
linux-image-4.4.0-109-generic
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ uname -r
4.4.0-112-generic
I think that lack of space in /boot was the main cause of your problems. Personally I don't use a separate /boot for my system so haven't encountered this.
I'm really sorry but it looks as if I personally will not be able to solve this one. Hopefully someone else will step up to the plate.
Well thank you for your help regardless, I truly appreciate it!
I guess I will have to reinstall the OS, which will be tons of work for what I currently have on the system. But my host assured me that they "did away" with boot partitions on their images.
For future reference, how can I avoid this and manage a proper server? As I don't know how this happened, as I said I am fairly limited in my knowledge, but know some concepts and security protocols to follow.
Last edited by Inputnamehere; 02-10-2018 at 09:21 PM.
I've stayed out of this discussion as I am only a casual user of apt based systems.
However, as a general observation, I too tend not to use boot partitions on my systems. That (small) partition is the problem here - so you have two obvious options:
- enlarge it
- don't use it.
One assumes you aren't able to enlarge it else all the prior operations would be moot. If it were me, I'd simply copy the /boot from where it is acoss to the /boot in the root tree. For example, umount /boot, mount /dev/xvda1 at /mnt, then simply copy everything from /mnt to /boot. Then re-install grub to the MBR (presuming non-UEFI) and cleanup the excess kernels. Remove the entry for boot in fstab, and try a boot. Any problems should be fixable from a chroot.
Saves the angst of a re-install.
Thanks, but it didn't work. I'm just going to reinstall the OS as I can't do much with my limited skill set.
Code:
$ sudo sh /opt/purge-old-kernels-2.sh
sudo: unable to resolve host vpsmisc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-53 linux-headers-4.4.0-59
linux-headers-4.4.0-59-generic linux-headers-4.4.0-62
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-headers-4.4.0-53-generic* linux-headers-4.4.0-62-generic*
linux-image-4.4.0-53-generic* linux-image-4.4.0-62-generic*
linux-image-extra-4.4.0-53-generic* linux-image-extra-4.4.0-62-generic*
0 upgraded, 0 newly installed, 6 to remove and 20 not upgraded.
5 not fully installed or removed.
After this operation, 452 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 161064 files and directories currently installed.)
Removing linux-image-extra-4.4.0-53-generic (4.4.0-53.74) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-53-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-53-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-53-generic (--purge):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.4.0-62-generic (4.4.0-62.83) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.0-62-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-62-generic (--purge):
subprocess installed post-removal script returned error exit status 1
Removing linux-headers-4.4.0-53-generic (4.4.0-53.74) ...
Removing linux-headers-4.4.0-62-generic (4.4.0-62.83) ...
Removing linux-image-4.4.0-53-generic (4.4.0-53.74) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-53-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-112-generic
Found initrd image: /boot/initrd.img-4.4.0-112-generic
Found linux image: /boot/vmlinuz-4.4.0-109-generic
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found initrd image: /boot/initrd.img-4.4.0-62-generic
done
The link /initrd.img is a damaged link
Removing symbolic link initrd.img
you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
you may need to re-run your boot loader[grub]
Purging configuration files for linux-image-4.4.0-53-generic (4.4.0-53.74) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
Removing linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-62-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-112-generic
Found initrd image: /boot/initrd.img-4.4.0-112-generic
Found linux image: /boot/vmlinuz-4.4.0-109-generic
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
you may need to re-run your boot loader[grub]
Purging configuration files for linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Errors were encountered while processing:
linux-image-extra-4.4.0-53-generic
linux-image-extra-4.4.0-62-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.