Karmic: Re-generation of grub.cfg takes long time.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Fix Released
|
Medium
|
Colin Watson |
Bug Description
Hello,
This system is:
$ uname -a
Linux karmic64 2.6.31-9-generic #29-Ubuntu SMP Sun Aug 30 17:39:26 UTC 2009 x86_64 GNU/Linux
It takes quite long time to upgrade this system because the re-generation of GRUB2 (/boot/
Here is the message log after running
$ sudo aptitude update && sudo aptitude upgrade
This part takes suspiciously long time:
...
Setting up memtest86+ (2.11-3ubuntu3) ...
Installing new version of config file /etc/grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /boot/memtest86
Found Ubuntu 9.04 (9.04) on /dev/sda1
Found Ubuntu 8.10 (8.10) on /dev/sda3
Found Ubuntu 8.04 (8.04) on /dev/sda5
Found Linux Mint 7 Gloria - x64 Edition (7) on /dev/sda9
Found Ubuntu 8.04.1 (8.04) on /dev/sdb1
Found Ubuntu 9.04 (9.04) on /dev/sdb2
Found Linux Mint 7 Gloria - Main Edition (7) on /dev/sdb3
Found Ubuntu 9.04 (9.04) on /dev/sda1
Found Ubuntu 8.10 (8.10) on /dev/sda3
Found Ubuntu 8.04 (8.04) on /dev/sda5
Found Linux Mint 7 Gloria - x64 Edition (7) on /dev/sda9
Found Ubuntu 8.04.1 (8.04) on /dev/sdb1
Found Ubuntu 9.04 (9.04) on /dev/sdb2
Found Linux Mint 7 Gloria - Main Edition (7) on /dev/sdb3
done
...
It seems to scan the same partitions several times.
The scripts in /etc/grub.d/ are very fast if I run them maually. There should be no reason to waste time.
$ ls -l /etc/grub.d/*
--------------
System information:
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu karmic (development branch)
Release: 9.10
Codename: karmic
-------------
$ sudo fdisk -l
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000b7d5
Device Boot Start End Blocks Id System
/dev/sda1 1 5099 40957686 83 Linux
/dev/sda2 * 5100 10199 40965750 83 Linux
/dev/sda3 10200 15298 40957717+ 83 Linux
/dev/sda4 15299 30401 121314847+ 5 Extended
/dev/sda5 15299 20652 43005973+ 83 Linux
/dev/sda6 20653 26006 43005973+ 83 Linux
/dev/sda7 26007 26735 5855661 83 Linux
/dev/sda8 26736 27221 3903763+ 82 Linux swap / Solaris
/dev/sda9 27222 30401 25543318+ 83 Linux
Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000677e0
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9726 78124063+ 83 Linux
/dev/sdb2 9727 19452 78124095 83 Linux
/dev/sdb3 19453 29178 78124095 83 Linux
/dev/sdb4 29179 38913 78196387+ 83 Linux
Disk /dev/sdc: 2034 MB, 2034237440 bytes
26 heads, 26 sectors/track, 5877 cylinders
Units = cylinders of 676 * 512 = 346112 bytes
Disk identifier: 0x04030201
Device Boot Start End Blocks Id System
/dev/sdc1 * 60 5878 1966320 b W95 FAT32 (2 GB USB stick)
-------------
$ mount
/dev/sda2 on / type ext4 (rw,noatime,
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,
proc on /proc type proc (rw,noexec,
sysfs on /sys type sysfs (rw,noexec,
varrun on /var/run type tmpfs (rw,nosuid,
varlock on /var/lock type tmpfs (rw,noexec,
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,
fusectl on /sys/fs/
securityfs on /sys/kernel/
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda7 on /tmp type ext3 (rw,noatime)
binfmt_misc on /proc/sys/
gvfs-fuse-daemon on /home/moma/.gvfs type fuse.gvfs-
/dev/sdc1 on /media/DC73-EDF8 type vfat (rw,nosuid,
/dev/sdb4 on /media/sdb4_ type ext3 (rw,nosuid,
-------------
tags: | added: patch |
Changed in grub2 (Ubuntu): | |
importance: | Undecided → Medium |
os-prober 1.31 will appear soon (not uploaded to Ubuntu yet - I'm waiting for it to land in Debian unstable first). When it does, could you please try with that and let me know if it's noticeably faster? It ought to be.
Regarding the duplicates, you can probably remove /etc/grub. d/30_otheros, which was mistakenly created by the installer (and won't be created in fresh installations as of Alpha 5).