LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-04-2019, 05:20 AM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Rep: Reputation: 43
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?
 
Old 07-09-2019, 02:13 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,338

Rep: Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331
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.
 
Old 07-12-2019, 02:56 AM   #3
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Original Poster
Rep: Reputation: 43
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.

Last edited by czezz; 07-21-2019 at 03:49 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bash: /usr/bin/git: No such file or directory " - why does bash look in /usr/bin babu198649 Linux - Newbie 9 04-24-2023 01:32 PM
[SOLVED] No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326, <GEN3> line 5. Jigsaw Linux From Scratch 16 05-10-2016 07:30 AM
[SOLVED] bash: /usr/local/bin/xdsi: /usr/bin/wish: bad interpreter: No such file or directory Berwhale Linux - Newbie 2 09-15-2011 02:59 PM
cat FILE|sort +1 -n Returns ... +1: No such file or directory musician Linux - Newbie 1 07-23-2009 01:28 PM
/usr/share/acpi-support/power-funcs: No such file or directory guarriman Ubuntu 1 07-18-2006 03:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration