22 May 2023 |
@elvishjerricco:matrix.org | yea EFI vars are actually important | 16:34:37 |
@elvishjerricco:matrix.org | you can't just make an esp tree | 16:34:46 |
@nikstur:matrix.org | Although in principle they can be manipulated outside a VM. But I doubt bootctl can | 16:35:06 |
Arian | EFI vars have nothing to do with the disk image | 16:35:36 |
Arian | They're stored on EEPROM | 16:35:42 |
@elvishjerricco:matrix.org | you mean nvram? | 16:35:53 |
@elvishjerricco:matrix.org | and still | 16:35:58 |
Arian | Yes sorry | 16:35:58 |
@nikstur:matrix.org | In reply to @elvishjerricco:matrix.org you can't just make an esp tree You can just put a boot loader in $esp/EFI/BOOT/BOOTX64.EFI and then you have a working disk image | 16:35:59 |
@elvishjerricco:matrix.org | you need to produce both the esp and the ovmf variable file with the variables set | 16:36:57 |
Arian | Efivars only need to be modified on non-compliant broken UEFI implementations. And that has to happen at installation time not at image building time | 16:36:59 |
@elvishjerricco:matrix.org | if you want to test efi variables | 16:37:02 |
Arian | Ah true | 16:37:11 |
@elvishjerricco:matrix.org | In reply to @nikstur:matrix.org You can just put a boot loader in $esp/EFI/BOOT/BOOTX64.EFI and then you have a working disk image yes but this is kind of being a bad EFI citizen. | 16:38:16 |
@nikstur:matrix.org | In reply to @elvishjerricco:matrix.org yes but this is kind of being a bad EFI citizen. True but should be irrelevant for our tests | 16:38:36 |
@elvishjerricco:matrix.org | you should really have your own os directory in the ESP and create a boot entry efi variable for the firmware to see | 16:38:37 |
@nikstur:matrix.org | The only way the efivars are currently used in make-disk-img is for installing the bootloader and I think it doesn't matter that much besides if you want to tests the installation of the bootloader itself. If you want to test efivars for any other reason it might be fine to just mount a writable copy that was not manipulated when the disk was created | 16:41:19 |
@nikstur:matrix.org | mount as in "give qemu the paramter" | 16:41:51 |
@nikstur:matrix.org | * mount as in "give qemu the parameter" | 16:41:56 |
@nikstur:matrix.org | In reply to @elvishjerricco:matrix.org you should really have your own os directory in the ESP and create a boot entry efi variable for the firmware to see bootctl creates the fallback path though when it doesn't exist. | 16:43:44 |
Arian | hmm systemd-repart seems to want me to run as root even when i provide --image . | 17:19:50 |
Arian | so maybe CopyFiles= is implemented with cheating | 17:20:01 |
Arian | (mounting loopback) | 17:20:06 |
@elvishjerricco:matrix.org | that's surprising | 17:20:12 |
@elvishjerricco:matrix.org | is the necessary mkfs tool on the PATH? | 17:20:37 |
Arian | let me update my unstable channel on my nixos machine first. perhaps this was changed recently (There were quite a few changes to repart) | 17:20:40 |
Arian | $ systemd-repart --empty=create --size=1G --image=image.img --definitions=./defs
Failed to set up loopback device for /home/arian/image.img: Permission denied
| 17:22:16 |
Arian | on 253 | 17:22:37 |
Arian | oooh --image is not the destination image. it's the image to mount to look for definition files | 17:23:52 |
Arian | confusing | 17:23:53 |