URL: <http://savannah.gnu.org/bugs/?50702>
Summary: grub2-mkconfig very slow Project: GNU GRUB Submitted by: pascom Submitted on: Sun 02 Apr 2017 08:25:42 AM UTC Category: Configuration Severity: Major Priority: 5 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Pascal COMBES Originator Email: pas...@orange.fr Open/Closed: Open Discussion Lock: Any Release: Release: 2.02~beta1 Reproducibility: Every Time Planned Release: None _______________________________________________________ Details: I noticed that upgrading the kernel is very long on my PC (>2min on Intel Core i7-4800MQ). I investigated and found that grub2-mkconfig took so much time. Deepening the analysis showed that it was in fact Linux system detection (90linux-distro) by os-prober bash scripts on an unmounted LVM partition with an ext4 (detected as ext2 by grub2-mount) filesystem (with lib folder in the root but I guess the same problem occurs when the partition contains a real undetected linux-distro). I finally found out that the problem comes from ls taking very long on the lib folder of the grub2 mounted filesystem. I do not know if it is a FUSE problem or a grub2 problem. My version of gurb2 is 2.02-beta2 (OpensSUSE Leap 42.2) I think that you will reproduce the problem by: -Formatting in ext4 an LVM logical volume. -Putting there a /lib folder with a lot of files and folders (mine has 264 files and folders) -Unmounting it -Running os-prober (or grub2-mkconfig with os-probing enabled) To solve temporarily the problem on my system, I added the (reasonable?) condition that a linux root filesystem must contain a /usr and a /var folder (see atttached file), which bypasses the ls check. This will not be sufficient on a system with a real unknown linux distro. If you need some help do not hesitate to contact me. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Sun 02 Apr 2017 08:25:42 AM UTC Name: 90linux-distro Size: 5kB By: pascom <http://savannah.gnu.org/bugs/download.php?file_id=40231> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?50702> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org https://lists.gnu.org/mailman/listinfo/bug-grub