initrd.img is build during kernel removal

Bug #322949 reported by psl
2
Affects Status Importance Assigned to Milestone
linux-ubuntu-modules-2.6.24 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: ubiquity

Ubuntu 8.04.2, i386 but I think this "bug" is in Ubuntu for long time and is not 8.04.2 specific.

Description:
Ramdisk initrd.img file is created during kernel removal. This is a nonsense form my point of view, why to create something that will be deleted in next second. Creation of ramdisk can take longer time at slower computer. Can be this step skipped during kernel removal?

There is another problem with initrd disk build during kernel removal. When /boot is at separate small partition, it is possible to run out of space in /boot during kernel update. The same risk is here for kernel removal when initrd file is build; I use separate /boot disk and I know it happens...

Notice these lines in following example:

Removing linux-ubuntu-modules-2.6.24-23-server ...
update-initramfs: Generating /boot/initrd.img-2.6.24-23-server
Removing linux-image-2.6.24-23-server ...

Example:

# uname -a
Linux ubuntu 2.6.24-23-generic #1 SMP Mon Jan 26 00:13:11 UTC 2009 i686 GNU/Linux

# apt-get remove linux-image-2.6.24-23-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-image-2.6.24-23-server linux-ubuntu-modules-2.6.24-23-server
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 80.4MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 146147 files and directories currently installed.)
Removing linux-ubuntu-modules-2.6.24-23-server ...
update-initramfs: Generating /boot/initrd.img-2.6.24-23-server
Removing linux-image-2.6.24-23-server ...
Running postrm hook script /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.24-23-generic
Found kernel: /boot/vmlinuz-2.6.24-22-generic
Found kernel: /boot/vmlinuz-2.6.24-16-generic
Found kernel: /boot/memtest86+.bin
Replacing config file /var/run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old
 you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old
 you may need to re-run your boot loader[grub]

Revision history for this message
Steve Langasek (vorlon) wrote :

Removing linux-ubuntu-modules-2.6.24-23-server ...
update-initramfs: Generating /boot/initrd.img-2.6.24-23-server
Removing linux-image-2.6.24-23-server ...

What you are seeing is the rebuilding of the initramfs during the removal of the *modules* package. The removal script for this package can't know that the image package is going to be removed immediately afterwards; the normal behavior when removing that package is to make sure the initramfs is cleaned up, so that modules on the installed system are consistent with those in the initramfs.

In any case, the linux-ubuntu-modules package is no longer provided in later Ubuntu releases; so either way, this isn't a bug that's going to be fixed.

Changed in ubiquity:
status: New → Invalid
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.