generating initrd too often

Bug #303644 reported by llloic
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux-ports-meta (Ubuntu)
Won't Fix
Wishlist
Unassigned

Bug Description

Binary package hint: linux-image

Hi,

I have a quite slow computer and generating initrd takes several minutes on it. So it is really painful when this process is launched several times in a row or when not necessary.

For example, I have just upgraded from 8.04 to 8.10 today, and after the process, their were an old kernel left, so I decided to remove it. This removes the associated linux-ubuntu-modules package which trigged the reconstruction of the initrd while the linux-image package was just about to be removed. Here is the output:
-------------
$ sudo apt-get remove --purge linux-image-2.6.24-21-386
root@alibaba's password:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-image-2.6.24-21-386* linux-ubuntu-modules-2.6.24-21-386*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 77.0MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 23090 files and directories currently installed.)
Removing linux-ubuntu-modules-2.6.24-21-386 ...
update-initramfs: Generating /boot/initrd.img-2.6.24-21-386
Purging configuration files for linux-ubuntu-modules-2.6.24-21-386 ...
Removing linux-image-2.6.24-21-386 ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/last-good-boot
Running postrm hook script /usr/sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.25-2-386
Found kernel: /boot/memtest86+.bin
Replacing config file /var/run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

Purging configuration files for linux-image-2.6.24-21-386 ...
Running postrm hook script /usr/sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.25-2-386
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
-------------

The important part is this:

Removing linux-ubuntu-modules-2.6.24-21-386 ...
update-initramfs: Generating /boot/initrd.img-2.6.24-21-386
Purging configuration files for linux-ubuntu-modules-2.6.24-21-386 ...
Removing linux-image-2.6.24-21-386 ...

Clearly the update-initramfs is called when not useful. Is it possible move this process to the triggers executed only at the end of the process ? This would greatly reduce the processing time necessary at end kernel changes.

Thank you in advance

Tags: packaging
Revision history for this message
Martyn Ranyard (ranyardm) wrote :

+1 here, I agree, especially working with older or virtual machines.

For instance, I installed LTS (hardy) server - and had to install the -virtual kernel. This went fine, so I went to remove the -server kernel but was worried by a list of held back software, so cancelled it, leaving it half-installed. I then had to reinstall the -server kernel, which picked a later version than was on the CD... so I had to also install the specific version again to remove both and ended up with 6 or 7 mkinitrds in total from start to finish!

Revision history for this message
Peter Antoniac (pan1nx) wrote :

I agree. And it is not only in those packages...

Changed in linux-ports-meta (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: bitesize packaging
Revision history for this message
Benjamin Kerensa (bkerensa) wrote :

I do not think this qualifies as a good bitesize candidate.
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

tags: removed: bitesize
Andy Whitcroft (apw)
Changed in linux-ports-meta (Ubuntu):
status: Confirmed → Won't Fix
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.