From: Lukas Schwaighofer <lukas@schwaighofer.name>
To: grub-devel@gnu.org
Subject: [PATCH] grub2 should not unzip Linux initramfs
Date: Tue, 12 Nov 2013 11:25:59 +0100 [thread overview]
Message-ID: <52820237.6090205@schwaighofer.name> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 852 bytes --]
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.txt
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700197
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: xen_initrd_nounzip.patch --]
[-- Type: text/x-patch; name="xen_initrd_nounzip.patch", Size: 489 bytes --]
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="$(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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 897 bytes --]
next reply other threads:[~2013-11-12 10:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 10:25 Lukas Schwaighofer [this message]
2013-11-12 20:03 ` [PATCH] grub2 should not unzip Linux initramfs Vladimir 'φ-coder/phcoder' Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52820237.6090205@schwaighofer.name \
--to=lukas@schwaighofer.name \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.