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

installation-cd: Build Graphical ISOs for aarch64 #188619

Closed
wants to merge 2 commits into from

Conversation

Thra11
Copy link
Member

@Thra11 Thra11 commented Aug 28, 2022

Description of changes

Changed installation-graphical-base to only enable virtualisation.vmware.guest and services.xe-guest-utilities on x86. The VMWare guest module is marked as not supported on aarch64, while the xe-guest-utilities package fails to build on aarch64.

With the changes in this PR, it is possible to build and boot a graphical iso on aarch64, presumably opening up the possiblity of pre-built aarch64 graphical isos from hydra. (See https://discourse.nixos.org/t/arm-graphical-iso-builds/16729)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@Thra11
Copy link
Member Author

Thra11 commented Aug 28, 2022

Btw, I tested this by creating my-iso-image.nix with the following contents (based on this guide):

{ pkgs, modulesPath, lib, ... }: {
  imports = [
    "${modulesPath}/installer/cd-dvd/installation-cd-graphical-plasma5-new-kernel.nix"
  ];

  boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
}

and then running

nixos-generate --format iso --configuration ./my-iso-image.nix -o result 

I then dd'd the result to an SD Card:

sudo dd if=result/iso/nixos-22.11.git.75f15399cc2-aarch64-linux.iso of=/dev/XXX status=progress

booted from the SD Card, and choose the graphical installer option from the boot menu.

@Thra11 Thra11 changed the title installation-cd: Don't try to enable modules on platforms which don't support them installation-cd: Build Graphical ISOs for aarch64 Aug 28, 2022
@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/arm-graphical-iso-builds/16729/3

@Thra11
Copy link
Member Author

Thra11 commented Aug 28, 2022

CC @vlinkz @edolstra @samueldr @dezgeg

Copy link
Member

@samueldr samueldr left a comment

Choose a reason for hiding this comment

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

I have not tested the resulting builds, but in principle it should just work, as there's nothing special with AArch64 systems when they boot with standards-based protocols (UEFI).

Obviously in the real world it will be "YMMV", but just as much as any other distro that only supports mainline. The limitations here will be whatever works with the current LTS of Linux. (Which is also true for x86_64!)

Copy link
Member

@samuela samuela left a comment

Choose a reason for hiding this comment

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

changes LGTM

anything else we need to do before merging?

@mweinelt
Copy link
Member

mweinelt commented Sep 25, 2022

Seeing an error when building the GNOME ISO.

$ nix-build nixos/release.nix -A iso_gnome --system aarch64-linux
[...]
error: a 'x86_64-linux' with features {} is required to build '/nix/store/7v9gqlcf6zn9al5b1gl8y4v8rrf2bx5k-loopback.cfg.drv', but I am a 'aarch64-linux' with features {benchmark, big-parallel, kvm, nixos-test}

@abhillman
Copy link
Contributor

FWIW I was able to build a gnome image for aarch64 using

$ docker run -it --platform linux/arm64 nixos/nix
$ git clone https://github.com/NixOS/nixpkgs.git --depth 1

# fetch and check out the latest release tag
# apply changes to `https://github.com/NixOS/nixpkgs/compare/master...Thra11:nixpkgs:aarch64-graphical-iso` from https://github.com/NixOS/nixpkgs/compare/master...Thra11:nixpkgs:aarch64-graphical-iso

$ nix-build -A config.system.build.isoImage -I nixos-config=modules/installer/cd-dvd/installation-cd-graphical-gnome.nix default.nix

From there, I was able to run the live image using Mac OS virtualization (i.e. https://developer.apple.com/documentation/virtualization/running_gui_linux_in_a_virtual_machine_on_a_mac)

image

The one curious thing is that I don't think I see the installer auto-launching, which I think it does for amd64.

@RaitoBezarius
Copy link
Member

Can you fix conflicts?

@Thra11
Copy link
Member Author

Thra11 commented Dec 1, 2022

Haven't had time to test it yet, but it looks like @mweinelt's commit which is causing the conflicts basically does the same thing as this PR, so we can probably abandon this one now?

@mweinelt
Copy link
Member

mweinelt commented Dec 1, 2022

Oh, sorry. Apparently I reviewed this, forgot this and then did it again myself. 🤦

@RaitoBezarius
Copy link
Member

Haven't had time to test it yet, but it looks like @mweinelt's commit which is causing the conflicts basically does the same thing as this PR, so we can probably abandon this one now?

Ahem, sorry but thank you for your PR! We can close it then. Is there any reason why we don't need the vmware/virtualbox stuff anymore?

@mweinelt
Copy link
Member

mweinelt commented Dec 1, 2022

It does not support anything but x86-64-linux.

@Thra11
Copy link
Member Author

Thra11 commented Dec 1, 2022

Is there any reason why we don't need the vmware/virtualbox stuff anymore?

For clarity, the changes in this PR to only enable them on x86 were required, but Martin has also made those changes in 8f366cb and 373c1a8.

@Thra11 Thra11 closed this Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants