One thing that I like about pacman is that it doesn’t output a ton of text (unlike apt, for example). But whenever a kernel is updated, kernel-install-for-dracut spills out a lot of text. mkinitcpio didn’t output this much info.
Is there any way to reduce this output and make it less verbose?
Note: There’s a better way of doing this described here, that was introduced later. So, use that rather than the accepted answer.
you can add omit_dracutmodules+=" EXAMPLE " in a conf file in /etc/dracut.conf.d/ to leave out modules that you don’t need.
Personally, I added all modules that were reported as missing to get rid of all the “not found” messages.
But: This requires you to remember that you actively removed modules in case you change something on your system that would require the module to be included.
I have not found any other way to get dracut less verbose, although on CentOS and Fedora it is very quiet …
It seems to work. However, I’m getting these grep: warning: stray \ before / warnings. Any idea what’s wrong there? I guess it was there before as well, just hidden in the deluge of information.
I was just testing it using reinstall-kernels. The output is as follows:
Installing kernel 6.1.6-arch1-1
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
dracut: dracut module 'cifs' depends on 'network', which can't be installed
dracut: dracut module 'nbd' depends on 'network', which can't be installed
dracut: dracut module 'nfs' depends on 'network', which can't be installed
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
Installing kernel 5.15.88-1-lts
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
dracut: dracut module 'cifs' depends on 'network', which can't be installed
dracut: dracut module 'nbd' depends on 'network', which can't be installed
dracut: dracut module 'nfs' depends on 'network', which can't be installed
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
grep: warning: stray \ before /
Installing kernel 5.15.86-1-lts
dracut: dracut module 'cifs' depends on 'network', which can't be installed
dracut: dracut module 'nfs' depends on 'network', which can't be installed
Installing kernel 6.1.3-arch1-1
dracut: dracut module 'cifs' depends on 'network', which can't be installed
dracut: dracut module 'nfs' depends on 'network', which can't be installed
where does one configure that when using grub with dracut?
Everything I find when googling quiet dracut led me to results on problems with quiet boot flag being ignored, not quiet initramfs generation …
In the script dracut-install in /usr/share/libalpm/scripts. You will need to override the hook by copying it /etc and copy the script anywhere you want and point the hook copy to it.
Do you, by chance, have GNU grep <3.8 or some other distribution of grep? I found some mailing list discussions about this.
The thing is, I tried to find any instances of grep in reinstall-kernels, kernel-install, dracut etc. and the only notable instance was in /usr/bin/dracut:
grep -H -e '^[^#]*[+]=\("[^ ]\|.*[^ ]"\)' "$@";
but it doesn’t look like there’s any error there. There are a few more occurences but they don’t have any \.
Interesting, that module is being added for me and I don’t get those errors. Additionally, I added the module after the errors resume and it still doesn’t happen.