Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 22700 ideas, 138270 comments, 2629576 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #11489: update-initramfs stupdis regenarate initrd.img when removing old kernel

Written by thiagocmartinsc the 24 Jul 08 at 17:44. Category: System. Related project: Nothing/Others. Status: New
Rationale
Hi folks!

Every time when I just want to remove/purge a old linux kernel, update-initramfs is called to recreate a initrd just before it will be removed from file system.

Take a look:

-----------
root@srvXY:/# dpkg -P linux-image-2.6.24-19-server linux-ubuntu-modules-2.6.24-19-server
(Reading database ... 30175 files and directories currently installed.)
Removing linux-ubuntu-modules-2.6.24-19-server ...
update-initramfs: Generating /boot/initrd.img-2.6.24-19-server
Purging configuration files for linux-ubuntu-modules-2.6.24-19-server ...
Removing linux-image-2.6.24-19-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 Xen hypervisor 3.2, kernel: /vmlinuz-2.6.24-20-xen
Found Xen hypervisor 3.2, kernel: /vmlinuz-2.6.24-19-xen
Found Xen hypervisor 3.2, kernel: /vmlinuz-2.6.22-15-xen
Found kernel: /vmlinuz-2.6.24-20-server
Found kernel: /memtest86+.bin
Replacing config file /var/run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done
-----------

Has all can see, update-initramfs recreate the file "/boot/initrd.img-2.6.24-19-server" but it's going to be removed on the next step!

So, why you do this if it will be removed?

I think is a some kind of missing "if condition" in someplace, telling the script that's if I want remove the linux-image, it can skip a "update-initramfs" step!

Regards,
Thiago

20
votes
up equal down
Solution #1: Auto-generated solution of idea #11489
Written by thiagocmartinsc the 24 Jul 08 at 17:44.
Ubuntu Brainstorm was updated in January 2009. Since the idea #11489 was submitted before this update, its rationale and solution are not separated. Please vote accordingly, and if you have the necessary rights, please separate the rationale from the solution. Thanks!

Propose your solution

Attachments
No attachments.


Duplicates


Comments
Ati500 wrote on the 25 Jul 08 at 02:28
Seems like a bug to me.

thiagocmartinsc wrote on the 25 Jul 08 at 18:32
Ati,

I like to discuss something before submitting any BUG to Launchpad. If it will be classified as a BUG, so I can open it in Launchpad.

I think it is an idea, a cosmetic change. Just to make things (removing old kernel) more smooth/fast...

What do you think?

Regards,
Thiago

thiagocmartinsc wrote on the 28 Jul 08 at 23:06
Maybe we can use "dpkg triggers feature" to get this working?

https://blueprints.launchpad.net/ubuntu/+spec/dpkg-triggers
http://www.dpkg.org/dpkg/Triggers
https://lists.ubuntu.com/archives/ubuntu-devel/2007-January/023212.html

Regards,
Thiago


Post your comment