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

Submitter:  Pascal COMBES <pascom>
Submitted:  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:  2.02~beta1
Release:  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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    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.13-758e.
    Corresponding source code