TW os-prober very chatty/slow due to debugging output
On my TW desktop I noticed os-prober was taking a long time due to it logging lots of debugging to the journal. Thousands of lines similar to ... May 22 21:42:57 kosmos1 40grub2[7803]: debug: parsing: menuentry 'Deepin 20.2 (20.2) (on /dev/sda4)' --class deepin --class gnu-linux --class gnu --class os May 22 21:42:57 kosmos1 40grub2[7817]: Skipping entry 'Deepin 20.2 (20.2) (on /dev/sda4)': May 22 21:42:57 kosmos1 40grub2[7818]: appears to be an automatic reference taken from another grub.cfg May 22 21:42:58 kosmos1 40grub2[7819]: debug: parsing: insmod part_gpt May 22 21:42:58 kosmos1 40grub2[7820]: debug: parsing: insmod ext2 May 22 21:42:58 kosmos1 40grub2[7821]: debug: parsing: set root='hd0,gpt4' May 22 21:42:58 kosmos1 40grub2[7822]: debug: parsing: if [ x$feature_platform_search_hint = xy ]; then May 22 21:42:58 kosmos1 40grub2[7823]: debug: parsing: search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 ... For systems with a few alternative root partitions the amount of logging is rather alarming. It probably amounts to at least 1000 lines per run. On investigation I found /usr/share/os-prober/common.sh contains a debug() function which is called by the rest of the package. The debug function tests the OS_PROBER_DISABLE_DEBUG environment variable. I set this variable in /etc/environment and os-prober now runs much faster: OS_PROBER_DISABLE_DEBUG=yes Is there a reason this isn't set by default? Is there an os-prober config file which would be a better place to set this? There was a bug raised concerning this issue for Leap in 2019: https://bugzilla.opensuse.org/show_bug.cgi?id=1101735 I've added a note to the bug. Michael
participants (1)
-
Michael Hamilton