update-initramfs and mkinitramfs should rename into place after creation
Bug #83629 reported by
Ian Jackson
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Binary package hint: initramfs-tools
update-initramfs calls mkinitramfs which truncates the output file straight away. This is very wrong.
mkinitramfs (or failing that, update-initramfs) should write out to a temporary file (<output-
Changed in initramfs-tools: | |
importance: | Undecided → High |
To post a comment you must log in.
In feisty, I can see some initrd-[...].bak files, which looks fine. Except it is clearly not working properly :/
When updating the initramfs is regenerated _many_ times: once for the kernel, once for udev, lvm, mdadm, initramfs-tools...
If the first one fails, it keeps the old working one as backup, which will be removed by the next generation of the initramfs....
As the new initramfs-tools refuses to generate initramfs for the edgy kernel, the old kernel gets broken during the update and at the end remains to empty files for it!
The "backup" is a good think but not used properly it becomes quite useless. In particular, if the newly created file is empty, then the backup should be kept and the "new" one discarded.
On a related note, I thought that a mechanism existed to push some scripts to the end of the update ? Generating initramfs only one at the end would make things much faster AND provide a (lame but still valuable) solution to this problem.