From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VgBAw-0002kh-Ha for mharc-grub-devel@gnu.org; Tue, 12 Nov 2013 05:26:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgBAp-0002jJ-1W for grub-devel@gnu.org; Tue, 12 Nov 2013 05:26:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgBAg-0006ZW-Hl for grub-devel@gnu.org; Tue, 12 Nov 2013 05:26:18 -0500 Received: from breeze.somlen.de ([217.11.62.50]:55250 helo=mail.somlen.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgBAg-0006Z8-Ab for grub-devel@gnu.org; Tue, 12 Nov 2013 05:26:10 -0500 Received: by mail.somlen.de with ESMTPSA id A3EFC31FD61 for ; Tue, 12 Nov 2013 11:26:05 +0100 (CET) Message-ID: <52820237.6090205@schwaighofer.name> Date: Tue, 12 Nov 2013 11:25:59 +0100 From: Lukas Schwaighofer MIME-Version: 1.0 To: grub-devel@gnu.org Subject: [PATCH] grub2 should not unzip Linux initramfs Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2HDSSLPQRWWUXPNCGVRUR" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 217.11.62.50 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2013 10:26:24 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2HDSSLPQRWWUXPNCGVRUR Content-Type: multipart/mixed; boundary="------------030509070001050908050406" This is a multi-part message in MIME format. --------------030509070001050908050406 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, the initramfs protocol (see [1]) supports multiple concatenated archives.= Because of grub2's implicit unzipping of gz-compressed multiboot modules, a valid initramfs-file (e.g. in my case containing of two concatenated gz-files) may be rendered unbootable. I have attached the trivial patch adding --nounzip to the the appropriate module-directive when generating XEN boot entries. As this resembles the behavior when booting without XEN (using the grub2 commands linux and initrd) more closely I don't expect any problems. I have reported this to the Debian bugtracker before [2] with no response, but I suppose this is the correct point to report this issue. Thank you Lukas [1] https://www.kernel.org/doc/Documentation/early-userspace/buffer-format.tx= t [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D700197 --------------030509070001050908050406 Content-Type: text/x-patch; name="xen_initrd_nounzip.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xen_initrd_nounzip.patch" diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index 4cf93d2..f12f059 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -135,7 +135,7 @@ EOF message=3D"$(gettext_printf "Loading initial ramdisk ...")" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' - module ${rel_dirname}/${initrd} + module --nounzip ${rel_dirname}/${initrd} EOF fi sed "s/^/$submenu_indentation/" << EOF --------------030509070001050908050406-- ------enig2HDSSLPQRWWUXPNCGVRUR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iQIcBAEBAgAGBQJSggI9AAoJEMqNQAGevU6Tq8AP/1Kv72/H5kzsTGcHMMQ7ut/o IdDemPqdMh5WbajA5z0TsIGb1crS8ATjSNWZbMiTGRquK0xlsTWsapxNaqqDQbT/ oprMbiZyEf945TQO8nw6S+dCHE7V+m6chKtAcQzU+kJflHK938DlIaBZ0qow+3YV 5woajv1IcaAJsvjChNslnDnUVVUBYJiDYSPt0Usc+Y3QaKBzMhxSYv2KcSMgDhut yBO4aX060mqLpGymtvJTC5eVLMXqK9PnGfIBUCVgDEBP99mjzZNw3De61GH252zf 69nOibwJlMnekY/KcSjPhVfQwWZG2F/JHJ0PBVnFuMs/mS1x0Tod3F+fpUvSWcOH zA+LvNBm5BEkIGPKRT5hSmobCC6oEGgJw+/C7XWf3iSifmuU3S5lZ/dnl9a+7orG Irmm+/qj/jYpGfB0UtVZNpM7F1pOkA0EI/UeTT8ILbtkT710333DnVjarxGk+Aqy p9kS+zWbW1PKuaS3gVOMnmgal0r3Lg7ssuRGnA7VxeEYim3s+04gpEVM9g3OGb3W uN7nEzjK1jltT4qHhjAP4jv1cVi5fuW+Rfsa2MBFeC2WXPGO4eeRTxSVGXqnTlyV +2lrgzgfriWHfnbKm+++BGV8oPEjLRXZyoomTp7KdtMBKrKHVd7WiEL15VqkAjXf YhXPNWUOy3IqcBZA6Gbr =NM6Q -----END PGP SIGNATURE----- ------enig2HDSSLPQRWWUXPNCGVRUR--