Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initrd: remove kernel image #1

Closed
wants to merge 1 commit into from

Conversation

baloo
Copy link

@baloo baloo commented Sep 8, 2021

We do not need to serve the kernel image in the initrd. This saves ~100MB of initrd on the default kernel configuration.

We do not need to serve the kernel image in the initrd

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
@grahamc
Copy link
Member

grahamc commented Sep 9, 2021

This is really clever and I like how this can shave a bunch of time off. I thought about doing this for the initrd contained in the top level store path, too.

One problem this presents for me is I actually do need the kernel and initrd in my resulting images: I'm using this to install NixOS to machines, and I want the kernel I install to be pre-loaded in the netbooted image at bootup. Similar story for the initrd.

I also think this would break uses of the store path DB registration by making closures incomplete.

I wonder if there is a way to support transformations like this a bit more arbitrarily without making a lot of special cases?

@baloo baloo closed this Sep 9, 2021
@baloo baloo deleted the baloo/initrd/no-kernel branch September 9, 2021 02:55
@baloo
Copy link
Author

baloo commented Sep 9, 2021

yeah, that should probably be in the nix expression rather than the server. much more flexible.

@baloo
Copy link
Author

baloo commented Sep 9, 2021

also the rdinit argument is probably incorrect (it directly jumps to stage2). that would also suggests the import <nixpkgs/nixos> is not completely appropriate either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants