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

amazon-image.nix: Resolve failure to include resize2fs #57633

Merged
merged 1 commit into from
Mar 16, 2019

Conversation

talyz
Copy link
Contributor

@talyz talyz commented Mar 14, 2019

Motivation for this change

Since 34234dc, for resize2fs to be automatically included in
initrd, a filesystem needed for boot must be explicitly defined as an
ext* type filesystem.

Things done

Tested by building the amazon image with

nix-build -I nixpkgs="/nixpkgs" -o amazon-image /nixpkgs/nixos -A config.system.build.amazonImage --arg configuration "{ imports = [ <nixpkgs/nixos/maintainers/scripts/ec2/amazon-image.nix> ]; ec2.hvm = true; }"

and both running it in qemu and on ec2.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@talyz talyz requested a review from infinisil as a code owner March 14, 2019 10:28
@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Mar 14, 2019
@infinisil
Copy link
Member

And the filesystem is ext4 always anyways?

@talyz
Copy link
Contributor Author

talyz commented Mar 15, 2019

Yes, although not immediately obvious, the amazon images will always use ext4, since that is the default value of the "fsType" argument to make-disk-image.nix. It should probably be passed explicitly instead, though. I'll add that as well.

Since 34234dc, for resize2fs to be automatically included in
initrd, a filesystem needed for boot must be explicitly defined as an
ext* type filesystem.
@talyz
Copy link
Contributor Author

talyz commented Mar 15, 2019

fsType = config.fileSystems."/".fsType; would also work, but only ext4 is supported by make-disk-image.nix when partitionTableType is "legacy"...

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants