From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jSUO1-0002Ym-Gc for mharc-grub-devel@gnu.org; Sat, 25 Apr 2020 19:39:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51296) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSUNz-0002Yb-Hj for grub-devel@gnu.org; Sat, 25 Apr 2020 19:39:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSUNy-0007CT-2T for grub-devel@gnu.org; Sat, 25 Apr 2020 19:39:03 -0400 Received: from mail.bitfolk.com ([2001:ba8:1f1:f019::25]:41441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSUNx-0006rL-F3 for grub-devel@gnu.org; Sat, 25 Apr 2020 19:39:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bitfolk.com; s=alpha; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=acnU2A5JirOuRRrEYDu3vG3hhUNB9szf1PJ0mdV06kI=; b=dHx58g5XsttkzxXeAp9RvDg2/k3J9RoBoYaPghb4h1kadiMzChnCxZmHXaM3pTGsEmiwr/iOQZ/Mq0a6K52ym/uEQhMJwVh/MZy41RQwNZ8NzawHKbXwV/74gU9wGElO4J/JF51p9k8wOaaRCeIJDD/00lHx9B3kVixJoCphJHFbUU9k67CHTNXhvyUoC4bTidddXpSRATlYtr0JFba2/mErVlPBazxFJJ3rsp4nBAEmPybmXyX23n/smdDAbTm5iIJeOdFkF8rsLmIke2BEsMcUbcEqZg0YasSVbGfiwriFfqbIa0cMv5iFSLHe9lLEzv8xazg7krE0rDvtakxWaw==; Received: from andy by mail.bitfolk.com with local (Exim 4.84_2) (envelope-from ) id 1jSUNn-000543-6t for grub-devel@gnu.org; Sat, 25 Apr 2020 23:38:51 +0000 Date: Sat, 25 Apr 2020 23:38:51 +0000 From: Andy Smith To: grub-devel@gnu.org Subject: Confusion regarding LZ4-compressed kernel support and Xen (PV) Message-ID: <20200425233851.GD3767@bitfolk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit OpenPGP: id=BF15490B; url=http://strugglers.net/~andy/pubkey.asc X-URL: http://strugglers.net/wiki/User:Andy User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: andy@strugglers.net X-SA-Exim-Scanned: No (on mail.bitfolk.com); SAEximRunCond expanded to false Received-SPF: none client-ip=2001:ba8:1f1:f019::25; envelope-from=andy@strugglers.net; helo=mail.bitfolk.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2001:ba8:1f1:f019::25 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 23:39:04 -0000 Hi, I am booting Xen PV guests using a grub image compiled as a PV guest and then having that parse the /boot/grub/grub.cfg from within the guest. When this encounters an LZ4-compressed kernel I get this: Loading Linux 5.4.0-26-generic ... error: not xen image. [ vmlinuz-5.4.0-26-gen 10B 0% 0.00B/s ] Loading initial ramdisk ... error: you need to load the kernel first. Press any key to continue... I know it is a problem related to LZ4 compression because if I manually decompress that kernel image then I am able to boot it fine. Cloning https://git.savannah.gnu.org/git/grub.git just now and rebuilding my PV grub image gives the same result. I see the error message comes from: grub-core/loader/i386/xen_file.c 92: grub_error (GRUB_ERR_BAD_OS, "not xen image"); I cannot see any evidence that there is LZ4 support in that file, but I don't really know what I'm looking for so quite possibly I am wrong. Searching the web finds articles about Ubuntu's decision to switch to LZ4-compressed kernels and some of these mention that this required changes to grub. I was also unable to find any actual details of the patch/commit for that. Again, if it's present at: https://git.launchpad.net/~ubuntu-core-dev/grub/+git/ubuntu …then it's not obvious to me. Does upstream grub have support for booting LZ4-compressed kernels? Is that also expected to work when grub is booted as a Xen PV image? I am just a bit lost as to where to look to find a solution to this, so any pointers would be much appreciated. Thanks, Andy