This is a static archive of the old Zorin Forum.

The information below may be outdated. Visit the new Zorin Forum here ›

If you have registered on the old forum, you will need to create an account on the new forum.

Can't use apt (linux-firmware and initramfs errors)

kcaps

Tue Aug 11, 2020 8:45:55 am

I don't know how this happened, I don;t recall having made any system changes. I can't do anything with apt at all. The symptoms are identical to a full /boot, but that's not my problem.
I will let some commands tell the story for me:

uname -r
Code:
4.19.13-041913-generic

I purposely use an old kernel. I don't have certain hardware support with newer ones for some reason...

df -h
Code:
Filesystem      Size  Used Avail Use% Mounted on
udev            7.8G     0  7.8G   0% /dev
tmpfs           1.6G  2.2M  1.6G   1% /run
/dev/nvme0n1p2  468G   88G  357G  20% /
tmpfs           7.8G  143M  7.7G   2% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/loop0       97M   97M     0 100% /snap/core/9436
/dev/loop2      128K  128K     0 100% /snap/openboard/14
/dev/loop1       97M   97M     0 100% /snap/core/9665
/dev/nvme0n1p1  511M  6.1M  505M   2% /boot/efi
tmpfs           1.6G   20K  1.6G   1% /run/user/121
tmpfs           1.6G   56K  1.6G   1% /run/user/1000


sudo apt upgrade
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.173.19) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-firmware
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)


sudo apt autoremove
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.173.19) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-firmware
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)


sudo dpkg --configure -a
Code:
Setting up initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.173.19) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-firmware
initramfs-tools


sudo update-initramfs -u -k all
Code:
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.


ll /boot
Code:
total 74156
-rw-r--r-- 1 root root  1508657 Dec 29  2018 abi-4.19.13-041913-generic
-rw-r--r-- 1 root root   219598 Dec 29  2018 config-4.19.13-041913-generic
drwx------ 3 root root     4096 Jan  1  1970 efi
drwxr-xr-x 5 root root     4096 Aug 11 07:24 grub
-rw-r--r-- 1 root root 60679344 May 25 11:48 initrd.img-4.19.13-041913-generic
-rw-r--r-- 1 root root   182704 Jan 28  2016 memtest86+.bin
-rw-r--r-- 1 root root   184380 Jan 28  2016 memtest86+.elf
-rw-r--r-- 1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin
-rw-r--r-- 1 root root       17 Dec 29  2018 retpoline-4.19.13-041913-generic
-rw------- 1 root root  4326738 Dec 29  2018 System.map-4.19.13-041913-generic
-rw------- 1 root root  8615808 Dec 29  2018 vmlinuz-4.19.13-041913-generic


sudo apt install --reinstall linux-firmware
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for linux-firmware:amd64


Don't really know where to go from here. I'd rather not have to reinstall Zorin AGAIN. Seems like I finally have it running and stable and I even tried reinstalling it but apparently the option to reinstall doesn't exist in the Zorin installer. (as opposed to ubuntu)

Aravisian

Tue Aug 11, 2020 10:00:42 am

These errors are usually caused by an incomplete or corrupted recent installation. Do you have any idea what you may have installed or reinstalled recently that may be the culprit?
Have you tried a force install?
Code:
sudo apt-get install –f


Perhaps Synaptic can help: run synaptic if you have it installed and navigate to the lower left "custom filters" then at the upper left, select "Broken" and see if anything is listed that you can deal with.

Reinstall of the OS does not seem too likely to be necessary. Possible that you may need to temporarily change your kernel, then reinstall your preferred kernel.

kcaps

Tue Aug 11, 2020 10:28:16 am

Aravisian wrote:These errors are usually caused by an incomplete or corrupted recent installation. Do you have any idea what you may have installed or reinstalled recently that may be the culprit?
Have you tried a force install?
Code:
sudo apt-get install –f


Perhaps Synaptic can help: run synaptic if you have it installed and navigate to the lower left "custom filters" then at the upper left, select "Broken" and see if anything is listed that you can deal with.

Reinstall of the OS does not seem too likely to be necessary. Possible that you may need to temporarily change your kernel, then reinstall your preferred kernel.


Yes, same error. I do have synaptic installed but "Broken" is empty.

EDIT: No I don't kn ow of any recent installs that I would have done that could screw this so much

Aravisian

Tue Aug 11, 2020 10:33:00 am

Do you get any output from
Code:
dpkg --audit
run from terminal?

kcaps

Tue Aug 11, 2020 10:36:07 am

Aravisian wrote:Do you get any output from
Code:
dpkg --audit
run from terminal?


Code:
The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
initramfs-tools      generic modular initramfs generator (automation)
linux-firmware       Firmware for Linux kernel drivers

Aravisian

Tue Aug 11, 2020 10:38:21 am

kcaps wrote:
Aravisian wrote:Do you get any output from
Code:
dpkg --audit
run from terminal?


Code:
The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
initramfs-tools      generic modular initramfs generator (automation)
linux-firmware       Firmware for Linux kernel drivers

Ok, so they are not broken, they are pending. Let's try:
Code:
sudo dpkg --configure --pending

kcaps

Tue Aug 11, 2020 10:42:42 am

Aravisian wrote:
kcaps wrote:
Aravisian wrote:Do you get any output from
Code:
dpkg --audit
run from terminal?


Code:
The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
initramfs-tools      generic modular initramfs generator (automation)
linux-firmware       Firmware for Linux kernel drivers

Ok, so they are not broken, they are pending. Let's try:
Code:
sudo dpkg --configure --pending


Code:
Setting up initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.173.19) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
E: /usr/share/initramfs-tools/hooks/ntfs_3g failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.19.13-041913-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-firmware
initramfs-tools

Aravisian

Tue Aug 11, 2020 10:46:38 am

Ok,
Code:
sudo apt-clean


Code:
sudo chmod -x /usr/share/initramfs-tools/hooks/ntfs_3g

Code:
sudo apt-get install -f



Edit note:
If it fails, I only have one more trick up my sleeve before I need to do time-consuming research, so may have to break from the thread for a couple hours.

kcaps

Tue Aug 11, 2020 10:55:45 am

Aravisian wrote:Ok,
Code:
sudo apt-clean


Code:
sudo chmod -x /usr/share/initramfs-tools/hooks/ntfs_3g

Code:
sudo apt-get install -f



Edit note:
If it fails, I only have one more trick up my sleeve before I need to do time-consuming research, so may have to break from the thread for a couple hours.


Great, that fixed it, thanks.

Code:
$ sudo apt-clean
sudo: apt-clean: command not found

$ sudo apt clean

$ sudo chmod -x /usr/share/initramfs-tools/hooks/ntfs_3g

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.173.19) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-4.19.13-041913-generic
W: APT had planned for dpkg to do more than it reported back (0 vs 7).
   Affected packages: initramfs-tools:amd64 linux-firmware:amd64

$ sudo apt upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Do you mind explaining exactly what had been the problem and what your last trick would have been? I want to understand the underlying issue a bit deeper than "some screwy upgrade did evil magic".
EDIT: And thanks for being so prompt, I thought I would have days on this between postings! (you know how forums are..)

Aravisian

Tue Aug 11, 2020 11:02:05 am

kcaps wrote:Great, that fixed it, thanks.

That is good since my last trick involved a hammer, peanut butter and two hamsters.
kcaps wrote:Do you mind explaining exactly what had been the problem and what your last trick would have been? I want to understand the underlying issue a bit deeper than "some screwy upgrade did evil magic".

What the actual cause was- I do not know. It could have been any form of interruption to an installation process - complete net failure or a command issued at an inopportune moment...
But the fix you just used was to remove the execution rights of the screwy evil magic package. This prevented it being the primary source as the rightful executable, allowing the system to require a different source.
By the way, if you haven't already, you should sudo apt clean and sudo apt autoremove, now

The last trick would have been to try to --force -depends from the apt cache /var/cache/apt/archives/

kcaps

Tue Aug 11, 2020 11:07:17 am

Aravisian wrote:That is good since my last trick involved a hammer, peanut butter and two hamsters.


OH NO! :shock: :shock: :lol:

Aravisian wrote:But the fix you just used was to remove the execution rights of the screwy evil magic package. This prevented it being the primary source as the rightful executable, allowing the system to require a different source.
By the way, if you haven't already, you should sudo apt clean and sudo apt autoremove, now

The last trick would have been to try to --force -depends from the apt cache /var/cache/apt/archives/

[/quote]
I see, thanks

Aravisian

Tue Aug 11, 2020 11:16:02 am

kcaps wrote:I see, thanks

That was the bad package. So, it would have failed a couple times before it (probably) would have worked. Not fun.

kcaps wrote:OH NO!

Be glad I mercifully downgraded from a capybara.

Swarfendor437

Wed Aug 12, 2020 10:52:36 am

Aravisian wrote:
kcaps wrote:I see, thanks

That was the bad package. So, it would have failed a couple times before it (probably) would have worked. Not fun.

kcaps wrote:OH NO!

Be glad I mercifully downgraded from a capybara.


Good job - looking at your study pic there would have only been enough room for the capybara! :lol: