os-prober created a 11.6 MB grub.cfg file impossible to boot

Bug #1163086 reported by Federico Tello Gentile
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Also described here:
http://askubuntu.com/questions/271898/what-is-grub-doing-while-it-takes-9-minutes-to-start-booting-the-kernel
and here:
http://lists.gnu.org/archive/html/bug-grub/2013-03/msg00037.html

Sometime around the start of 2013 grub started to take longer and longer to boot the kernel and kernel updates started taking too long (more than 10 minutes). The 30_os-prober process was seen executing. At one point grub was taking 9 minutes to boot the kernel, which once booted just took 28 seconds to boot. The delay was actualy in grub.
Later I discovered my /boot/grub/grub.cfg was 11.6 MB which is bad.
A big chunk of the menu entries is generated by /etc/grub.d/30_os-prober.

Line 223: ### BEGIN /etc/grub.d/30_os-prober ###
...
Line 175174: ### END /etc/grub.d/30_os-prober ###

grub.cfg has 175191 lines, so that script represents 99% of the 11.6 MB in the file.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: os-prober 1.56ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-26.42-generic 3.5.7.6
Uname: Linux 3.5.0-26-generic x86_64
ApportVersion: 2.6.1-0ubuntu10
Architecture: amd64
Date: Tue Apr 2 00:02:50 2013
InstallationDate: Installed on 2013-03-27 (6 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
ProcEnviron:
 LANGUAGE=es_AR:es
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=es_AR.UTF-8
 SHELL=/bin/bash
SourcePackage: os-prober
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Federico Tello Gentile (federicotg) wrote :
Revision history for this message
Federico Tello Gentile (federicotg) wrote :

More information.
I had 2 identical hard drives. /dev/sda1 and /dev/sda2 set up with software RAID1. Everything was in there /boot included.
The RAID had been created with previous Ubuntu versions. I had been updating every 6 months for at least 2 years. The initial installation was the first Ubuntu version that had grub2.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in os-prober (Ubuntu):
status: New → Confirmed
Revision history for this message
lemonade (lemonade) wrote :

I have the same bug with two machines that are using RAID1.

As a temporary fix I've deleted the grub.cfg and run dpkg-reconfigure grub-pc from time to time.

Revision history for this message
SomeOne (andreas-helmcke) wrote :

I have the same problem.
System with raid1

Version:
grub-pc: 2.00-13ubuntu3
os-prober 1.57ubuntu1

Workaround: Disabled the invocation of os-prober:

Insert
  GRUB_DISABLE_OS_PROBER=true

into /etc/default/grub and run grub-update

Revision history for this message
Emerson1000 (rfh1000) wrote :

This Bug still exists with Version:

grub-pc: 2.02~beta2-36ubuntu3.2

os-prober 1.70ubuntu3

Furthermore, it also exists for a non-RAID system with 4 linux (ubuntu+mint) system partitions.
Seems the problem aren't the results of os-prober itself:

/dev/sda1:Microsoft Windows XP Professional:Windows:chain
/dev/sda6:Ubuntu 16.04.1 LTS (16.04):Ubuntu:linux
/dev/sda9:Ubuntu 14.04.5 LTS (14.04):Ubuntu1:linux
/dev/sdb6:Ubuntu 10.04.4 LTS (10.04):Ubuntu2:linux

but the grub-mkconfig process which produces weird results in Section:
### BEGIN /etc/grub.d/30_os-prober ###
.
.
### END /etc/grub.d/30_os-prober ###
(lines 398 to 7421)

Example attachment grub.cfg:

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.