From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: bug#35380: disk-image fails to install efi grub Date: Fri, 03 May 2019 00:17:53 +0200 Message-ID: <87d0l0fqlq.fsf@fastmail.com> References: <0935773a-1e21-9576-d569-f97e79ed13dd@s.rendaw.me> <87a7gesccy.fsf@gnu.org> <323096f6-9382-c3fd-1dc5-486c4737b12f@s.rendaw.me> <87d0l2exld.fsf@gnu.org> <875zqsvqcb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:44257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMK2m-0002pN-3r for bug-guix@gnu.org; Thu, 02 May 2019 18:19:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMK2j-0007wt-71 for bug-guix@gnu.org; Thu, 02 May 2019 18:19:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33680) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMK2g-0007vn-4C for bug-guix@gnu.org; Thu, 02 May 2019 18:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMK2f-0001nu-Q6 for bug-guix@gnu.org; Thu, 02 May 2019 18:19:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <875zqsvqcb.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , =?UTF-8?Q?G=C3=A1bor?= Boskovits Cc: 35380-done@debbugs.gnu.org, rendaw <7e9wc56emjakcm@s.rendaw.me> --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hello, > > G=C3=A1bor Boskovits skribis: > >> I've already looked into that earlier, and supporting this usecase would >> not be >> so hard. We have ovmf after all, and we could stat qemu in efi mode. It >> would not >> be so hard to get the thing in place to do an emergency efi booting setu= p. >> Why I did not feel comfortable to carry on work in this direction, is th= at >> we should >> associate a state with the VM-s, namely the file contatining the nvram >> variables of >> the efi firmware. This is needed for full support, but not needed to cre= ate >> a bootable >> system. Wdyt? > > I suppose the file that contains variables could be temporary or > read-only in the store? Temporary yes, read only no :-) EFI firmwares are inherently stateful: bootloaders are *required* to update the NVRAM with the file name, UUID, and partition of the loader. That means you can't just take an operating system hard drive from one EFI system to another. The new host system won't know where to find the bootloader. You have to use `efibootmgr` or similar to create an entry for the hard drive in the firmware. Maybe some firmwares are smarter... One can launch a Guix EFI virtual machine "manually" by: qemu -bios $(guix build ovmf)/share/firmware/ovmf_x64.bin foo.img This will boot anything created by `guix system disk-image` because they contain a generic UEFI loader in a standard location (using grub-mkstandalone). Now if you try to use GRUB-EFI-BOOTLOADER inside this virtual machine, it will succeed, but complain that it cannot update the EFI boot entries, resulting in a VM that cannot boot. Copying the firmware file somewhere and making it writable will allow you to persist the installation, as long as you carry that firmware file around. Or you can create a dedicated file for the variables and use it with other firmware files -- but you can not boot the VM without it. I'm not sure what use case rendaw had in mind, can you elaborate?=20 It would be great to have UEFI support in the record, mainly for system tests, but I doubt that is what rendaw is after :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlzLbJEACgkQoqBt8qM6 VPouzgf+P+JoBcMyVqwd2Xa8jr3UiMEhAug5vijonbY5VQJ+Xiq2htT5ahj0KuPF iNMreLl2yWhFNVdprnbIYVrWplj1t2mf+I7dCGERK6+2FOmbq+fGW/gdXk21inOu sdlzl5XE8gPvGL51HjF8pQFkb8ZdUFVt69E9+7l9QncXyBMr4b+LYLuXp6dD0wDu 3PCg6dd1c17jUKQJ8mRLN6ZvdhCupdYycf2jBcwAJ6H6pNKA7fXVTDeN9Qy5Y/rS g/D50oacsunXutLuZcSKxMLtW2C/5O7b6BS9+OyXzIf97P6mjJDODkuFz3e79sAN BioYWZT0kfrnscUU4nEai6QAvQO9VA== =yl2h -----END PGP SIGNATURE----- --=-=-=--