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:
@@ -111,7 +111,10 @@ func main() {
|
|||||||
return
|
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("/usr/share/mkinitfs/files-extra"),
|
||||||
hookfiles.New("/etc/mkinitfs/files-extra"),
|
hookfiles.New("/etc/mkinitfs/files-extra"),
|
||||||
hookscripts.New("/usr/share/mkinitfs/hooks-extra"),
|
hookscripts.New("/usr/share/mkinitfs/hooks-extra"),
|
||||||
|
Reference in New Issue
Block a user