From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7OJy-00026s-9l for guix-patches@gnu.org; Sun, 07 May 2017 11:42:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7OJv-0001Xj-5y for guix-patches@gnu.org; Sun, 07 May 2017 11:42:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34072) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7OJu-0001XZ-L0 for guix-patches@gnu.org; Sun, 07 May 2017 11:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d7OJu-0000MP-B2 for guix-patches@gnu.org; Sun, 07 May 2017 11:42:02 -0400 Subject: bug#26815: [PATCH 3/3] vm: Support EFI boot in base image. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20170507171814.555ec8b3@scratchpost.org> References: <20170507143647.21036-1-mbakke@fastmail.com> <20170507143647.21036-3-mbakke@fastmail.com> <20170507171814.555ec8b3@scratchpost.org> Date: Sun, 07 May 2017 17:41:19 +0200 Message-ID: <874lwwznc0.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 26815@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Danny, thanks for the quick feedback! Danny Milosavljevic writes: >> + (system* "grub-mkstandalone" "-O" "x86_64-efi" "-o" >> + (string-append efi-directory "/EFI/BOOT/BOOTX64.EFI") >> + ;; Embed the contents of grubdisk.cfg. >> + (string-append "boot/grub/grub.cfg=3D" target >> + "/tmp/grubdisk.cfg")) > > Check return value of system* ? Good point. Will wrap it in an (unless (zero? ...) (error ...)). >> (partitions (list (partition >> (size #$(- disk-image-size >> - (* 10 (expt 2 20)))) >> + (* 50 (expt 2 20)))) > > says: > >>According to a Microsoft note[2], the minimum size for the EFI System Par= tition (ESP) would be 100 MB, though this is not stated in the UEFI Specifi= cation. Note that for Advanced Format 4K Native drives (4-KB-per-sector) dr= ives, the size is at least 256 MiB, because it is the minimum partition siz= e of FAT32 drives (calculated as sector size (4KB) x 65527 =3D 256 MiB), du= e to a limitation of the FAT32 file format.=20 I have no idea what happens if you dd this image onto a 4k drive, only tested with a 512B flash drive. > Is this relevant for us? > > Also, says that F32 is not require= d for most UEFI firmwares. FAT12, FAT32 usually work. But better be safe t= han sorry, I guess. If FAT32 may cause problems on some install media, perhaps it's better to rely on the calculated allocation tables and "hope for the best". I don't have a spare 4k drive to test with, though. >> + (size (* 40 (expt 2 20))) >> + (label "gnu-esp") >> + (file-system "vfat") > > Is it really vfat with long file names and everything? Or only FAT32 (wit= h short file names)? Good catch. I think it should be FAT32 indeed, according to parted from a prepared disk image. AFAIK parted does not actually use this flag for anything, but it's good to be accurate. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkPQB8ACgkQoqBt8qM6 VPptWQf+PRz1G3sPVzr7NRJQV75bRQtGaHi+G7Rr3IUe5vRWFcWVIsN37JMUw4ak R2mwm6lPwe8SAVgwlx8cY7l2NW/eUXh/s9gaQ2/EUTTcijKb8CTb/BjdHxuyZDF1 nvx1XioUUT+5C/DFfKM831nhK6ZQCwfErBO+opc3OwzRhs4+kqyxqATvX6GAsBCK NLw+dI5q+oF8nPRwfQNHkVAMpSbgzuFXdNav6Kej08ErMeYMNwphO0yEunYdKO5t PuzbXIPtg5pvhD2ZAGXFiJHCOO0Sf+i7WV7LUamlS3R7b/9aZiJG/1QI6IBMClFC 8Q2CM7jTGxQlBxwls1CgUfMmbBnuVQ== =S5PC -----END PGP SIGNATURE----- --=-=-=--