Comments (10)
I made the bootctl command succeed by doing the following immediately after the failing nixos-install:
Outside of chroot:
# mount my uefi system volume (which happened to be already mounted
# to /boot/efi) so it's available in the chroot; /nixos is not a good place for it,
# but it works
mount --bind /boot/efi /nixos/boot-efi
Inside the chroot:
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
# note the different value of --path
/nix/store/mnbl0f66cykmwjin47r7rlnwwgiac7ys-systemd-231/bin/bootctl --path=/nixos/boot-efi install
... which installed systemd boot fine, but I still don't have the nixos entry there. Looking...
from nixos-in-place.
There was no nixos entry because nixos-install ended up writing uefi stuff to /boot, which was not mounted. I should have mounted my /boot/efi to /boot in the chroot.
from nixos-in-place.
Hey, thanks for looking into this! There hasn't been any uefi support added yet, but it sounds like you've actually made it pretty far. If you feel like adding what you've found to a flag on the script, to enable this, I'd be happy to see the PR.
from nixos-in-place.
Yeah, I'll think about how to package this up in a way that's not too specific to my system and then get back to you.
from nixos-in-place.
efi_loader_get_device_part_uuid function in https://github.com/systemd/systemd/blob/master/src/shared/efivars.c is how to discover what partition is the EFI System Partition.
My plan is to re-implement this logic in bash. Please tell me if that sounds crazy.
from nixos-in-place.
Sounds pretty crazy. I'd be sure to check for existing solutions thoroughly first, even if it means using a Python library or something. The less code we need to maintain, the better.
With that said, I don't know much about EFI, which is why it was never implemented to begin with.
from nixos-in-place.
It's not too complicated if you assume existence of a few standard unix tools (C is pretty verbose and we don't need to be as general):
esp_device="/dev/disk/by-partuuid/$(cat /sys/firmware/efi/efivars/LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f | tail -c +5 | head -c -1 | iconv --from-code=UTF16 | tr '[:upper:]' '[:lower:]')"
That said, I agree we should start with a simpler version.
from nixos-in-place.
from nixos-in-place.
I was wrong: I thought that variable gets populated by bios, but apparently it's systemd-boot that populates it, which means that the system might not have that variable populated. In #32 I implemented an alternative, less robust way of discovering the EFI System Partition using fdisk.
from nixos-in-place.
from nixos-in-place.
Related Issues (20)
- DigitalOcean now uses /dev/vda HOT 2
- ISO download fails HOT 1
- Installation finished but doesn't prompt for a root password HOT 10
- "Failure to set locale" stopping installation HOT 3
- Iso download: unverified, not trustworthy host, not overrideable HOT 12
- Possible race condition in stage1? HOT 3
- Experience report of using nixos-in-place for OVH cloud servers and qemu-guest issue
- Move /old-root/nixos to / HOT 9
- init: Permission denied HOT 4
- Failed running on LeaseWeb Ubuntu 16.04 server HOT 1
- error: changing modification time of '...': Read-only file system HOT 4
- Instructions on how to use this to make a Hetzner Cloud snapshot (includes moving /old-root/nixos to /) HOT 8
- Document what this is and what it's not. HOT 1
- login not possible after reboot
- install is not working HOT 1
- Unable to install on VPS HOT 1
- Use drive UUID instead of /dev name
- Instructions for Tiny Core Linux HOT 1
- download link seems offline HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixos-in-place.