cmd/mkinitfs: don't compress initramfs-extra (MR 25)

There is little(?) reason to compress the -extra archive, but some
there are some good reasons why it should be left uncompressed:

        1) decompression increases boot time
        2) selecting exotic formats (e.g. lzma or zstd) can actually
           increase the initramfs size since you now have to include
           support for those archive formats

In the future this could be made configurable...
This commit is contained in:
Clayton Craft
2023-02-26 11:44:58 -08:00
parent 7c2377d0c8
commit fb00e9e94b

View File

@@ -111,7 +111,10 @@ func main() {
return
}
if err := generateArchive("initramfs-extra", compressionFormat, compressionLevel, workDir, []filelist.FileLister{
// Note: compression disabled for initramfs-extra, since it slows down boot
// and can add more requirements to the initramfs (e.g. need to add support
// for extracting zstd)
if err := generateArchive("initramfs-extra", archive.FormatNone, archive.LevelDefault, workDir, []filelist.FileLister{
hookfiles.New("/usr/share/mkinitfs/files-extra"),
hookfiles.New("/etc/mkinitfs/files-extra"),
hookscripts.New("/usr/share/mkinitfs/hooks-extra"),