mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
nixos/netboot: use makeInitrdNG
to shrink ramdisk size
Previously, `makeInitrd` added the whole closure of the squashfs derivation to initrd. This closure contains the squashfs.img and some store paths which are still referenced by the compressed squashfs.img. These extra store paths are unused in stage 1. With `makeInitrdNG` only the squashfs.img is added to the initrd. (`makeInitrdNG` only resolves shared library references instead of the whole closure). This shrinks the netboot ramdisk by ~6% for a minimal system and significantly decreases the size of the uncompressed root filesystem in stage 1.
This commit is contained in:
parent
c5d810f4c7
commit
64589bcefa
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ with lib;
|
|||
|
||||
|
||||
# Create the initrd
|
||||
system.build.netbootRamdisk = pkgs.makeInitrd {
|
||||
system.build.netbootRamdisk = pkgs.makeInitrdNG {
|
||||
inherit (config.boot.initrd) compressor;
|
||||
prepend = [ "${config.system.build.initialRamdisk}/initrd" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue