I really like using Linux, but sometimes it makes my blood boil. Probably because I can't figure out how to fix one little thing without breaking it.
Installed is (X)Ubuntu 16.04.03 LTS with XFCE front end on a HP Spectre Win 7 machine. Not a dual boot system.
This all starts with a "system" message next to my WIFI icon.
So I head to Synaptic Package Manager to see what is broken, and I see this:
So I mark them both to be reinstalled and click apply. The next message is an error message stating "E: Internal Error, No file name for linux-image-extra-4.13.0-32-generic:amd64".
The Googles gave me a couple things to try in the terminal window to address this error, namely sudo apt autoremove or sudo apt-get -f install, but one won't work because of a dependency problem and the other won't work because it says there isn't enough memory.
Any ideas how I can straighten this out?
I'm afraid if I try on my own to fix it any more than this it will be FUBAR.
Looks like you're out of disk on that partition.
Here's the kicker. I don't have a disk utility installed as I've never needed it. And when I try to install one (via package manager) it crashes because of the linux-image-extra broken dependency.
This is the error message:
E: linux-image-extra-4.13.0-32-generic: subprocess installed post-removal script returned error exit status 1
Which I believe is telling me yet again I'm out of disk space.
Setup a bootable flash drive, boot off that, save your data somewhere else, wipe the partition, resize with GParted, reinstall. Maybe not the elegant solution, but the one I tend to reach for when Linux starts spitting angry code at me.
WAIT WAIT WAIT you don't have to wipe. First run "sudo apt-get clean" to buy yourself a little disk space by deleting cached packages. Then run "sudo fdisk -l" to list your drive partitions. Then check your space with df, like "sudo df -h /dev/sda1"
I agree. Wiping seems premature here.
Also, you might find that you have a bunch of old revisions of the linux kernel, so you might want to look into clearing some of those out too. That should also give you a little bit of space in your boot partition.
Thank you, thank you, thank you guys! I will try these options before doing a wipe.
In my previous install I recall running into a similar problem with memory, specifically with old revisions of the linux kernel. In trying to address that I ended up with a kernel panic error. I am not a specialist on this topic by any means!
Ok, here is some more info.
brian@brian-HP-SpectreXT-Pro-13-b000-PC:~$ sudo df -h
[sudo] password for brian:
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 389M 6.1M 383M 2% /run
/dev/mapper/xubuntu--vg-root 113G 20G 88G 19% /
tmpfs 1.9G 26M 1.9G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/loop0 84M 84M 0 100% /snap/core/3604
/dev/loop1 84M 84M 0 100% /snap/core/3748
/dev/loop2 82M 82M 0 100% /snap/core/3887
/dev/sda1 472M 462M 0 100% /boot
tmpfs 389M 40K 389M 1% /run/user/1000
This does show that /dev/sda1 is my problem area. This is already big progress for me.
So I looked up how to remove old kernels, and the first option was to run "sudo apt autoremove --purge". This is what I got from that:
brian@brian-HP-SpectreXT-Pro-13-b000-PC:~$ sudo apt autoremove --purge
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-extra-4.13.0-32-generic
0 upgraded, 0 newly installed, 1 to remove and 162 not upgraded.
5 not fully installed or removed.
After this operation, 165 MB disk space will be freed.
Do you want to continue? [Y/n]
Um, do I really want to do that? This looks to me like it wants to remove the OS (!).
Run "uname -a". If the version matches, don't remove it, that means that your package manager messed up somewhere. Otherwise, go for it.
You'll have to stay on top of clearing out your old kernel versions since you have a separate /boot partition due to your LVM setup. With most distros there is a way to limit the number of old kernels kept.
brian@brian-HP-SpectreXT-Pro-13-b000-PC:~$ uname -a
Linux brian-HP-SpectreXT-Pro-13-b000-PC 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
The following packages will be REMOVED:
linux-image-extra-4.13.0-32-generic
This is not a match, correct?
GameboyRMH- I definitely need to learn how to deal with this so it doesn't happen again. Maybe this is a topic for a new thread.
Yeah it's not a match so you can remove it. But that's actually part of the kernel upgrade you were trying to install, so you'll have to make some more room on your /boot partition to solve the original problem. 472MB isn't much space for holding kernels, IIRC each full kernel set is something like 170MB nowadays?
I just want to say that I love how this forum answers the most random of questions. :D
Also, this identical kind of problem can occur if you use fstab to mount a remote network location and have a scheduled rsync that doesn't ask if the remote location is actually there. Backed up to my mount point instead. Ran out of hard drive space. Oops!
I guess it isn't quite that easy. Both "sudo apt autoremove --purge" and "sudo apt-get remove linux-image-extra-4.13.0-32-generic" yield the same result:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-extra-4.13.0-32-generic
0 upgraded, 0 newly installed, 1 to remove and 162 not upgraded.
5 not fully installed or removed.
After this operation, 165 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 494565 files and directories currently installed.)
Removing linux-image-extra-4.13.0-32-generic (4.13.0-32.35~16.04.1) ...
depmod: FATAL: could not load /boot/System.map-4.13.0-32-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-32-generic /boot/vmlinuz-4.13.0-32-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-32-generic /boot/vmlinuz-4.13.0-32-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-32-generic
depmod: WARNING: could not open /var/tmp/mkinitramfs_CdUcVs/lib/modules/4.13.0-32-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_CdUcVs/lib/modules/4.13.0-32-generic/modules.builtin: No such file or directory
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.13.0-32-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.13.0-32-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.13.0-32-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
So I'm hung up on the kernel upgrade that I never installed. And Package Manager can't seem to fix it.
Can you remove it as a broken package in synaptic?
If not, try "sudo apt-get --force-yes remove linux-image-extra-4.13.0-32-generic"
I tried reinstalling, removing and complete removal options in synaptic. It keeps giving me a similar error:
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
E: Unable to lock the download directory
Edit: GameboyRMH I missed the second part of your post...
I tried "sudo apt-get --force-yes remove linux-image-extra-4.13.0-32-generic" and ended back up at the "error code (1)" thing again.
In reply to paranoid_android :
I just looked at your profile, and I saw that you're in Ann Arbor. I'm actually in Ypsilanti. If you feel like you're beating your head against it, I might be able to help you out in person. I have 2 small kids, though so I can't just drop everything. I do have Ubuntu Live USB sticks, SATA to USB adapters and all sorts of helpful things if necessary.
What do you get when you run "dpkg --get-selections | grep hold"?
No output- it just brings up another command prompt.
Unless I have the syntax wrong...
scardeal said:
In reply to paranoid_android :
I just looked at your profile, and I saw that you're in Ann Arbor. I'm actually in Ypsilanti. If you feel like you're beating your head against it, I might be able to help you out in person. I have 2 small kids, though so I can't just drop everything. I do have Ubuntu Live USB sticks, SATA to USB adapters and all sorts of helpful things if necessary.
Indeed, I am in Ann Arbor- Platt and Packard area to be exact.
That would be awesome if you could spare a few minutes away to help me out. I would really appreciate that! I have kiddos too, so I totally get having to try to fit the time in. I could come your way to make it easier too.
"sudo apt-get --purge remove linux-image-extra-4.13.0-32-generic"
Didn't do it either
paranoid_android said:
No output- it just brings up another command prompt.
Unless I have the syntax wrong...
That just means you have no held packages. I'll look up what else might help later.
In reply to paranoid_android :
I conferred with the wife unit, and it looks like the earliest I could get there would be tomorrow evening after dinner. But I'd be happy to head over there if you're still having issues.
One more thing to try, in Synaptic go to Edit --> Fix Broken Packages
In reply to GameboyRMH :
That didn't work either. Same error message.