LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   dist-upgrade cat: '/usr/share/flash-kernel/db/*.db': No such file or directory (https://www.linuxquestions.org/questions/ubuntu-63/dist-upgrade-cat-usr-share-flash-kernel-db-%2A-db-no-such-file-or-directory-4175656850/)

czezz 07-04-2019 05:20 AM

dist-upgrade cat: '/usr/share/flash-kernel/db/*.db': No such file or directory
 
Hi all,
System: Ubuntu 18.04.2 LTS (Raspberry 3)
I have updated system today (04th July).
Code:

sudo apt update
sudo apt dist-upgrade

Following error occurred (it was already present during dist-upgrade but for cleaner view I paste here output of autoremove).

Code:

ubuntu@ubuntu:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages will be REMOVED:
  libllvm7 linux-raspi2-headers-4.15.0-1031 linux-raspi2-headers-4.15.0-1037
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 213 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 181252 files and directories currently installed.)
Removing libllvm7:arm64 (1:7-3~ubuntu0.18.04.1) ...
Removing linux-raspi2-headers-4.15.0-1031 (4.15.0-1031.33) ...
Removing linux-raspi2-headers-4.15.0-1037 (4.15.0-1037.39) ...
Setting up initramfs-tools (0.130ubuntu3.8) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up linux-firmware (1.173.8) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-1040-raspi2
cat: '/usr/share/flash-kernel/db/*.db': No such file or directory
cat: '/usr/share/flash-kernel/db/*.db': No such file or directory
run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 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.8) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-1040-raspi2
cat: '/usr/share/flash-kernel/db/*.db': No such file or directory
cat: '/usr/share/flash-kernel/db/*.db': No such file or directory
run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 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)

I have checked on x86_64 installation, the same ubuntu release (18.04.2)
/usr/share/flash-kernel/db/ is empty and no *.db files there.

Any idea what is happening wrong here?

business_kid 07-09-2019 02:13 PM

This had 286 views, but no replies… Allow me to have a go.

Generating an initrd puts every conceivable piece of <expletive deleted> in a ramdisk. The mkinitrd script is it's own nest of issues. All we know is that it puked on Error 1, which is permissions. There are times when sudo ≠ root, and this might be one of them. There are even times when root doesn't have permission.

Quick way out is to reinstall from a backup if you have one
Presuming you don't, you should have, so make arrangements to get one as soon as you get out of this mess. Can you reinstall Ubuntu-18.04, saving /home & /etc? If not, Post a 'ls' of /boot, & /lib/modules. I'm thinking of uninstalling kernel & modules. It would be very handy if you had another to boot on. Theoretically, it can conceivably be done while running on the kernel you're uninstalling, as the box has it in memory. But it's very much a thing that should never be done. I prefer to play safe.

czezz 07-12-2019 02:56 AM

Hi Business_kid, thank you for your reply.
I actually have found the the solution for my problem by following this link: https://www.blackmoreops.com/2014/09...conds-problem/

Syslog errors were exactly the same:
Code:

"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
INFO: task kworker/2:1:11792 blocked for more than 120 seconds.

Although I didnt link initially these errors to my issue, I gave it a try and I have changed following 2 parameters in /etc/sysctl.conf

Code:

vm.dirty_background_ratio = 5
vm.dirty_ratio = 10
(remember to reboot after)

That solved the issue. Not only the one I have described here but also system does not hang up anymore (at least to the moment I am writing this post ;) )
Anyway, I hope this can help others.


[UPDATE - 2019.07.17]
After doing more stress tests (coping a lot of files in a loop) errors pop up again and hang the system
Also, while updating system the problem sometimes appears too

My guess is a bad quality SD card but I cannot check and confirm it now.


All times are GMT -5. The time now is 08:37 AM.