Bug#869771: grub-pc-bin: can not load 4.9.30-2+deb9u2 kernel on a compressed squashfs
Juha Erkkilä
Juha.Erkkila at opinsys.fi
Wed Jul 26 10:22:01 UTC 2017
Package: grub-pc-bin
Version: 2.02~beta3-5
Severity: normal
Dear Maintainer,
grub can not load the latest linux-image on Debian Stretch, that is currently
package name linux-image-4.9.0-3-amd64, version 4.9.30-2+deb9u2, when this
image is inside a compressed squashfs-image. The problem was already present with
the previous linux-image, which can be found here:
http://snapshot.debian.org/archive/debian/20170609T034604Z/pool/main/l/linux/linux-image-4.9.0-3-amd64_4.9.30-1_amd64.deb
To reproduce, create a squashfs-image with only the vmlinuz-image inside it:
sudo apt-get install squashfs-tools
mkdir -p squashfs_testdir
cp -p /boot/vmlinuz-4.9.0-3-amd64 squashfs_testdir/
rm -f squashfs_testimage.img
mksquashfs squashfs_testdir squashfs_testimage.img
Then copy this test-image to some place where it can be easily accessed by
grub, in my case it is in "(lvm/puavo-images)/squashfs_testimage.img".
Boot grub and trigger the command prompt mode with "c", then type:
grub> loopback loop (lvm/puavo-images)/squashfs_testimage.img
grub> crc (loop)/vmlinuz-4.9.0-3-amd64
error: unsupported gzip format
grub> linux (loop)/vmlinuz-4.9.0-3-amd64
error: unsupported gzip format
If the image is compressed with algorithm other than "gzip",
the error message might contain "incorrect compressed chunk".
This problem occurs because the "vmlinuz-4.9.0-3-amd64" file ends up
into squashfs-image with zero-sized blocks, which the current grub
implementation does not know how to handle when the image is compressed.
Apparently this is an optimization with sparse files.
This problem has been fixed in the grub-version that is in currently
in testing, version 2.02-2. I believe the relevant commit is this:
https://git.launchpad.net/grub/commit/?id=951306c5094d2bfb46d5baedfde84a2015c4a3fa
However, because this issue occurs with the latest default kernel in
Stretch, I feel the issue is serious enough to warrant a bug report.
Juha
-- System Information:
Debian Release: 9.1
APT prefers stable
APT policy: (990, 'stable'), (500, 'oldstable-updates'), (500, 'oldoldstable-updates'), (500, 'oldoldstable'), (500, 'oldstable'), (30, 'xenial-updates'), (30, 'xenial-security'), (30, 'xenial'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8), LANGUAGE=fi (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages grub-pc-bin depends on:
ii grub-common 2.02~beta3-5
ii libc6 2.24-11+deb9u1
ii libdevmapper1.02.1 2:1.02.137-2
grub-pc-bin recommends no packages.
Versions of packages grub-pc-bin suggests:
ii desktop-base 9.0.2
-- no debconf information
More information about the Pkg-grub-devel
mailing list