ryan4yin / nixos-rk3588

Minimal NixOS running on RK3588/RK3588s based SBC(Orange Pi 5 Plus, Orange Pi 5, Rock 5A, etc)
MIT License
134 stars 18 forks source link

uefi boot from SD card, nixify uefi bootloader #30

Open adminy opened 6 months ago

adminy commented 6 months ago

Just wondering if its possible to create an SD card that contains the UEFI bootloader on SD card instead?

This way the output can also be nixified. No manual steps afterwards would be required.

ryan4yin commented 5 months ago

It's possible, edk2-rk3588 says that:

If you wish to have both UEFI and an OS on the same SD or eMMC device: flash UEFI first, then create any additional partitions without touching the first, reserved one. Steps for updating the firmware in this case can be found here.

cessationoftime commented 1 week ago

After flashing edk2-rk3588 from armbian on my SD card, I wrote the rawEfiImage-opi5plus straight to my SD card without much trouble. I booted from that, built a native image locally and wrote that image to my SSD, expanding the partition with parted.

So you should be able to use the rawEfiImage on an SD card (assuming that is what you mean). I did encounter warning spam, (#37) when I did this. But I silenced them, built a native image and wrote it to the SSD, this got rid of (#37) and I could boot from SSD with UEFI.