Control: tag -1 moreinfo On Mon, 2024-10-07 at 00:39 +0200, Vincent Lefevre wrote: > Package: initramfs-tools > Version: 0.145 > Severity: normal > > When updating an initrd file, update-initramfs keeps 2 temporary > copies in /boot, I don't believe this is the case. A successful run of "update-initramfs -u" will do: 1. Hard-link initrd.img-<version> to initrd.img-<version>.dpkg-bak 2. Create new initramfs as initrd.img-<version>.new 3. Move initrd.img-<version>.new to initrd.img-<version> 4. Remove initrd.img-<version>.dpkg-bak (unless backup_initramfs is enabled) There is 1 temporary copy created in step 2, and after step 4 there are 0 temporary copies. Step 1 does have a fallback to copying if hard-linking fails. That could happen if your /boot uses VFAT or some other un-Unix-like filesystem, but that's not supported by Debian. But maybe there's some other reason it can fail? > though its space is typically *very* limited > (456 MB by default). This means that one can keep a limited number > of kernels. With the 456 MB default size and maximum compression > (COMPRESS=lzma and COMPRESSLEVEL=9), only 3 kernels are possible. > > The temporary copies should be stored on the main file system, > which is not space limited. [...] The initramfs must be replaced atomically, otherwise we can end up with a previously working image being deleted or replaced with a truncated image. So there has to be 1 temporary copy. Ben. -- Ben Hutchings I'm not a reverse psychological virus. Please don't copy me into your signature.
Attachment:
signature.asc
Description: This is a digitally signed message part