[Nix-dev] Prepending files to initrd
Shea Levy
shea at shealevy.com
Sat Jan 30 11:33:54 CET 2016
This may not be the case any more, but in the past at least you had to explicitly specify the newc cpio format (with -H newc) when calling cpio to make initrds.
> On Jan 30, 2016, at 5:26 AM, Roger Qiu <roger.qiu at matrix.ai> wrote:
>
> Hi,
>
> There's an option called: `boot.initrd.prepend`. I tried to prepend a
> gzipped cpio archive containing 1 single file with no path. But I upon
> rebooting, I received a `Initramfs unpacking failed: junk in compressed
> archive`.
>
> Here was the steps I took:
>
> ```
> pushd /boot
> cpio -o <<< "luks-key.img" >luks-key.cpio
> gzip luks-key.cpio
> rm luks-key.img
> popd
> ```
>
> Then inside `configuration.nix`: `boot.initrd.prepend = [
> "/boot/luks-key.cpio.gz" ];`.
>
> I expect the file `luks-key.img` to be available in the initrd at stage
> 1. I want to be able to reference this as `/luks-key.img`.
>
> Is there anything I'm doing incorrect here?
>
> Thanks,
> Roger
>
> --
> Founder of Matrix AI
> https://matrix.ai/
> +61420925975
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
More information about the nix-dev
mailing list