bugGNU GRUB - Bugs: bug #50702, grub2-mkconfig very slow


You are not allowed to post comments on this tracker with your current authentication level.

bug #50702: grub2-mkconfig very slow

Submitted by:  Pascal COMBES <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
Open/Closed:  Open Release: 
Release:  2.02~beta1 Reproducibility:  Every Time
Planned Release:  None

Sun 02 Apr 2017 08:25:42 AM UTC, original submission:  

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.

Pascal COMBES <pascom>


Attached Files
file #40231:  90linux-distro added by pascom (5KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pascom (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-02 pascom Attached File- => Added 90linux-distro, #40231

    Back to the top

    Powered by Savane 3.7