jeaye / nixos-in-place

Install NixOS on top of any existing Linux distribution without rebooting
MIT License
460 stars 57 forks source link

UEFI support #32

Open Rotsor opened 7 years ago

Rotsor commented 7 years ago

If the system boots using UEFI we need to mount /sys/firmware/efi/efivars and /boot. /boot must be pointing to a EFI System Partition, which we can find using fdisk.

Rotsor commented 7 years ago

I only tested it on Ubuntu.

jeaye commented 7 years ago

Thanks for taking the time to make this! I'll need to run it through my various VMs for testing. To be clear, in your testing, you've deployed this fix on a machine using UEFI and you've been able to boot into NixOS with no issues?

Rotsor commented 7 years ago

Roughly yes. However by the time I finished working on this script my machine already had systemd-boot installed, so the test is not 100% conclusive. I'm reasonably confident because this was approximately how I got it installed anyway, and also because nixos-install fails if any of the two mounts are missing (doesn't matter if systemd-boot was already installed or not).

I was hoping to test it in a VM, but my qemu-fu (in combination with bugs in qemu) is failing me.

jeaye commented 7 years ago

I've just merged in a new test suite for one-command testing of multiple distros, using vagrant + virtualbox. I'm hoping we can get a test specifically for uefi in there and then we can feel confident about this PR. Not sure if that'll be possible yet.

Rotsor commented 7 years ago

I resolved the conflict. I have no immediate plan to do extra testing (mostly because I have no familiarity with virtualbox and I'm sure setting up uefi is going to be some pain), but I think something needs to be merged in soon because the current state can make people waste quite some time. If you think this PR is not going in soon then I'll make another PR that just aborts the install if /sys/firmware/efi exists. Should I do that?