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
Change internal installation approach #585
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this
nix build github:remimimimimi/ghaf/fixed-installer#checks.x86_64-linux.installer --log-format bar-with-logs
The check seemed to pass. At first run there was a lot of output lines and some cleanup in the end. When I tried running it second time there was no output in the terminal. It created an empty result directory linked to nix store.
Is there be some explanation/documentation how that check works? Is it basically a build check and an installer test withing a VM or does it check something more?
Tests on Lenovo-X1
- Built the installer with
nix build --verbose github:remimimimimi/ghaf/fixed-installer#lenovo-x1-carbon-gen11-debug-installer - ci-test-automation tests ok
- All apps launch and poweroff/reboot buttons work
There's documentation on wiki. But tl;dr is that it builds derivation, and during the build process runs tests. So because you haven't changed derivation, you saw no output. |
And this morning I also noticed that the installer from this PR creates always a new 'Linux Boot Manager' entry to the Boot Priority Order list in BIOS. To be able to boot from USB SSD again it requires manually booting to UEFI BIOS and lowering or discarding the 'Linux Boot Manager' entry. This can be a problem from the automated testing point of view. We have been preparing to run also installer tests in automated setup but 'Linux Boot Manager' will prevent that. One observation more: This installer takes around 7min to run, whereas the old made it in 1min. But I understand this is the cost we have to pay for using nixos-install instead of just flashing. |
That's probably because you overwrote with zeros only 400M. Also, full system wipe is done (optionally) to my knowledge only by Debian installer, others simply write on top.
It creates new boot entry on every installation because otherwise the system may be unbootable. This behavior is because of Otherwise, because of internal structure it attempts to rebuild packages, which require internet connection. That was fixed upstream only recently. |
ghaf-installer in the current ghaf mainline does not produce any 'Linux Boot Manager' entry to BIOS. I think in that case it's enough that NVMe0 is in the Boot Order list. |
I tested without that |
fails to build the image in the installer |
If we switch from the iso here to pure disko than these hash mismatch issues should be fixed by: nix-community/disko#625 |
Noticed that in the latest version I switched to use |
I tested that ghaf is able to boot from nvme even after removing the 'Linux Boot Manager' entry. |
Related to test automation, @remimimimimi thanks for mentioning about efibootmgr. I drafted a script to delete all Linux Boot Manager entries, so that we are able to automate it and boot again from USB SSD after running test with ghaf-installer.
There is just the potential risk that in case ghaf-installer installs a broken ghaf which cannot boot (and the active Linux Boot Manager entry) we can't run the script above and cannot handle the situation anymore automatically (need to boot manually to UEFI BIOS and edit the boot order). Maybe the best way to reduce this risk is to run the tests first on ghaf image (booted from USB SSD) and if the plain ghaf image is bootable only then proceed to run tests for ghaf-installer -> ghaf. |
9033392
to
a98072c
Compare
a98072c
to
b1f98d5
Compare
Change approach which is used on installer. Instead of flashing pre-build image - partition disk and assemble system during installation process. Like it's done during normal NixOS installation process using `nixos-install` command. Signed-off-by: Valentin Kharin <valentin.kharin@unikie.com>
Signed-off-by: Valentin Kharin <valentin.kharin@unikie.com>
b1f98d5
to
52cc5d3
Compare
Description of changes
Change approach which is used on installer. Instead of flashing pre-build image - partition disk and assemble system during installation process. Like it's done during normal NixOS installation process using
nixos-install
command.Checklist for things done
x86_64
aarch64
riscv64
nix flake check --accept-flake-config
and it passesTesting
To run introduced test execute
nix build .#checks.x86_64-linux.installer --log-format bar-with-logs
, otherwise testing process same as in previous installer-related PRs.