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: ConfigurationSeverity: Major
Priority: 5 - NormalItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: Pascal COMBES
Open/Closed: OpenRelease: 
Release: 2.02~beta1Reproducibility: 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
  • -unavailable- added by pascom (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 02 Apr 2017 08:25:42 AM UTCpascomAttached File-=>Added 90linux-distro, #40231

    Back to the top


    Powered by Savane 3.1-cleanup1