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

use overlayfs by default for netboot and iso #35188

Merged
merged 1 commit into from Feb 5, 2020
Merged

Conversation

@sorki
Copy link
Member

@sorki sorki commented Feb 19, 2018

Closes #32897

Motivation for this change

Faster nix store and less build (permission) failures such as NixOS/nix#1243 or #5829

Mount with this change outputs

overlay on /nix/store type overlay (rw,relatime,lowerdir=/mnt-root/nix/.ro-store,upperdir=/mnt-root/nix/.rw-store/store,workdir=/mnt-root/nix/.rw-store/work)

We also can't use just rw-store as upperdir and separate workdir due to overlayfs restrictions (this seems as only workable configuration).

cc @cleverca22 @dezgeg

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@makefu
Copy link
Contributor

@makefu makefu commented Feb 19, 2018

Does this PR fix the issue with going OOM when running a nixos-install with too many packages pre-configured?

@dezgeg
Copy link
Contributor

@dezgeg dezgeg commented Feb 19, 2018

Does this PR fix the issue with going OOM when running a nixos-install with too many packages pre-configured?

No. That's hopefully fixed by #34636.

nixos/modules/installer/cd-dvd/iso-image.nix Outdated Show resolved Hide resolved
nixos/modules/installer/cd-dvd/iso-image.nix Outdated Show resolved Hide resolved
@fpletz fpletz added this to the 18.03 milestone Feb 23, 2018
Copy link
Contributor

@aij aij left a comment

Does that even work with descriTPion?

nixos/modules/installer/netboot/netboot.nix Outdated Show resolved Hide resolved
nixos/modules/installer/cd-dvd/iso-image.nix Outdated Show resolved Hide resolved
@sorki sorki force-pushed the sorki:overlayfs branch Aug 5, 2018
@matthewbauer matthewbauer modified the milestones: 18.03, 18.09 Oct 1, 2018
@samueldr samueldr modified the milestones: 18.09, 19.03 Oct 6, 2018
@sorki sorki force-pushed the sorki:overlayfs branch to ac48cdb Oct 27, 2018
@mmahut
Copy link
Member

@mmahut mmahut commented Aug 10, 2019

Are there any updates on this pull request, please?

@matthewbauer matthewbauer modified the milestones: 19.03, 20.03 Aug 28, 2019
@misuzu
Copy link
Contributor

@misuzu misuzu commented Feb 2, 2020

I'm just built an iso with this patch on top of a21c2fa and it is so much faster than regular iso!
I think this is ready for merge after rebase.

@sorki sorki force-pushed the sorki:overlayfs branch from ac48cdb to 15c51c2 Feb 4, 2020
@sorki
Copy link
Member Author

@sorki sorki commented Feb 4, 2020

Rebased with all comments addressed, tested manually and with boot.nix test.

@nixos-discourse
Copy link

@nixos-discourse nixos-discourse commented Feb 4, 2020

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nixos-20-03-feature-freeze/5655/25

nixos/modules/system/boot/stage-1-init.sh Outdated Show resolved Hide resolved
@Infinisil
Copy link
Member

@Infinisil Infinisil commented Feb 5, 2020

Other than that this looks great, tested on my mac without problems :)

@aij
aij approved these changes Feb 5, 2020
@sorki sorki force-pushed the sorki:overlayfs branch from 15c51c2 to 0c20feb Feb 5, 2020
Copy link
Member

@Infinisil Infinisil left a comment

Looking good!

@Infinisil Infinisil merged commit 3ab846e into NixOS:master Feb 5, 2020
13 checks passed
13 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Feb 5, 2020
use overlayfs by default for netboot and iso

(cherry picked from commit 3ab846e)
ctheune added a commit to flyingcircusio/nixpkgs that referenced this pull request Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

You can’t perform that action at this time.