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

Cannot install OVMF with SeaBIOS CSM #59881

Open
shatsky opened this issue Apr 19, 2019 · 2 comments
Open

Cannot install OVMF with SeaBIOS CSM #59881

shatsky opened this issue Apr 19, 2019 · 2 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@shatsky
Copy link
Contributor

shatsky commented Apr 19, 2019

Issue description

I've enabled libvirtd, got OVMF firmware in /run/libvirt/nix-ovmf/OVMF_CODE.fd, symlinked to /nix/store/5bgi298wvmbgkz95s61ifwaihz68b0wb-OVMF-2017-12-05-fd/FV/OVMF_CODE.fd. However, VM using it can't boot from MBR-partitioned disk with MBR bootloader or floppy image, it just drops to EFI shell. I guess OVMF is built without SeaBIOS CSM which is required to boot from pre-EFI media. I see there is OVMF-CSM defined in nixpkgs; installing nixpkgs.OVMF-CSM, as well as nixpkgs.OVMF with or without --arg seabios true, only installs same "out" output of the same expression which produces that "fd" output which contains actual image used by qemu.

I see that both OVMF-CSM is defined in https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix#L14235 which looks suspicious to me, does it really revert seabios = null which is set in preceding one? How can I check which arguments the expression which produced store path had been given? And how can I install CSM-enabled OVMF? Anyway, nix-env -iA nixos.OVMF and nix-env -iA nixos.OVMF-CSM producing same result looks like a bug.

Steps to reproduce

Add following to your configuration.nix:

virtualisation.libvirtd.enable = true;
environment.systemPackages = with pkgs; [ OVMF-CSM ];

or run nix-env -iA nixos.OVMF-CSM. Try to locate CSM-enabled OVMF image.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.19.34, NixOS, 19.03.172231.7b36963e7a7 (Koi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • channels(eugene): "nixos-unstable-19.09pre175916.1fc591f9a5b"
  • channels(root): "nixos-19.03.172231.7b36963e7a7"
  • channels(doctor): "nixpkgs-19.03pre153206.f753852e11d"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@shatsky
Copy link
Contributor Author

shatsky commented Apr 20, 2019

:b OVMF.override { seabios = seabios; } in nix-repl produces new "fd" and "out" outputs with new build hashes, but I can't confirm there's an image with CSM, I couldn't get it to boot from a floppy image.

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

1 participant