Bug#755256: grub-xen: Cannot boot XZ compressed kernels
Ian Campbell
ijc at debian.org
Sat Nov 22 11:40:18 UTC 2014
On Sat, 2014-07-19 at 10:31 +0100, Ian Campbell wrote:
> Package: grub-xen
> Version: 2.02~beta2-10
> Severity: important
>
> Dear Maintainer,
>
> Currently grub-xen cannot boot kernels which are configured with
> CONFIG_KERNEL_XZ=y and reports "error: not xen image.". The Debian
> kernels have been compiled with this option since
> 3.6.8-1~experimental.1.
>
> Fixing this is as simple as adding an "insmod xzio" after the existing
> "insmod gzio" in /etc/grub.d/10_linux. ("insmod gzio" needs to stay for
> compat with Wheezy kernels)
I just tripped over this again (I'd fixed 10_linux in my test VM and
forgot all about it, but I just created another VM).
For the grub-xen-host to really be useful this ought to be fixed as
well.
I think the choices are either to add the insmod to 10_linux as
suggested above or to grub_install_push_module("xzio") (and probably
other *io) in grub-install.c when building for one of the Xen targets.
The former has the disadvantage of needlessly loading a module for
native boots (since the kernel decompresses itself) while the latter
appears to be a little unconventional. Despite that I'm leaning towards
the latter myself and loading the set of modules listed in
grub-install-common.c:decompressor() to cover all bases.
I can spin up a patch for upstream and integrate with the package for
either solution, any preference?
Ian.
>
> It is possible to extract the compressed payload from an x86 bzImage and
> inspect the magic numbers to determine the required decompression
> algorithm, but that seems like a lot more work for a pretty small gain.
>
> Cheers,
> Ian.
>
> -- Package-specific info:
>
> *********************** BEGIN /proc/mounts
> /dev/disk/by-uuid/c1edab93-0151-44a9-b727-6db233208284 / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
> *********************** END /proc/mounts
>
> *********************** BEGIN /boot/grub/device.map
> (hd0) /dev/xvda
> *********************** END /boot/grub/device.map
>
> *********************** BEGIN /boot/grub/grub.cfg
> #
> # DO NOT EDIT THIS FILE
> #
> # It is automatically generated by grub-mkconfig using templates
> # from /etc/grub.d and settings from /etc/default/grub
> #
>
> ### BEGIN /etc/grub.d/00_header ###
> if [ -s $prefix/grubenv ]; then
> set have_grubenv=true
> load_env
> fi
> if [ "${next_entry}" ] ; then
> set default="${next_entry}"
> set next_entry=
> save_env next_entry
> set boot_once=true
> else
> set default="0"
> fi
>
> if [ x"${feature_menuentry_id}" = xy ]; then
> menuentry_id_option="--id"
> else
> menuentry_id_option=""
> fi
>
> export menuentry_id_option
>
> if [ "${prev_saved_entry}" ]; then
> set saved_entry="${prev_saved_entry}"
> save_env saved_entry
> set prev_saved_entry=
> save_env prev_saved_entry
> set boot_once=true
> fi
>
> function savedefault {
> if [ -z "${boot_once}" ]; then
> saved_entry="${chosen}"
> save_env saved_entry
> fi
> }
> function load_video {
> if [ x$feature_all_video_module = xy ]; then
> insmod all_video
> else
> insmod efi_gop
> insmod efi_uga
> insmod ieee1275_fb
> insmod vbe
> insmod vga
> insmod video_bochs
> insmod video_cirrus
> fi
> }
>
> if [ x$feature_default_font_path = xy ] ; then
> font=unicode
> else
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> font="/usr/share/grub/unicode.pf2"
> fi
>
> if loadfont $font ; then
> set gfxmode=auto
> load_video
> insmod gfxterm
> set locale_dir=$prefix/locale
> set lang=en_GB
> insmod gettext
> fi
> terminal_output gfxterm
> if [ "${recordfail}" = 1 ] ; then
> set timeout=-1
> else
> if [ x$feature_timeout_style = xy ] ; then
> set timeout_style=menu
> set timeout=5
> # Fallback normal timeout code in case the timeout_style feature is
> # unavailable.
> else
> set timeout=5
> fi
> fi
> ### END /etc/grub.d/00_header ###
>
> ### BEGIN /etc/grub.d/05_debian_theme ###
> set menu_color_normal=cyan/blue
> set menu_color_highlight=white/blue
> ### END /etc/grub.d/05_debian_theme ###
>
> ### BEGIN /etc/grub.d/10_linux ###
> function gfxmode {
> set gfxpayload="${1}"
> }
> set linux_gfx_mode=
> export linux_gfx_mode
> menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 3.14-1-amd64 ...'
> linux /boot/vmlinuz-3.14-1-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro quiet
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-3.14-1-amd64
> }
> submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-c1edab93-0151-44a9-b727-6db233208284' {
> menuentry 'Debian GNU/Linux, with Linux 3.14-1-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.14-1-amd64-advanced-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 3.14-1-amd64 ...'
> linux /boot/vmlinuz-3.14-1-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro quiet
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-3.14-1-amd64
> }
> menuentry 'Debian GNU/Linux, with Linux 3.14-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.14-1-amd64-recovery-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 3.14-1-amd64 ...'
> linux /boot/vmlinuz-3.14-1-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro single
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-3.14-1-amd64
> }
> menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-amd64-advanced-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 3.2.0-4-amd64 ...'
> linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro quiet
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-3.2.0-4-amd64
> }
> menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-amd64-recovery-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 3.2.0-4-amd64 ...'
> linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro single
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-3.2.0-4-amd64
> }
> menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-xen-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-2.6.32-5-xen-amd64-advanced-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 2.6.32-5-xen-amd64 ...'
> linux /boot/vmlinuz-2.6.32-5-xen-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro quiet
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-2.6.32-5-xen-amd64
> }
> menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-xen-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-2.6.32-5-xen-amd64-recovery-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 2.6.32-5-xen-amd64 ...'
> linux /boot/vmlinuz-2.6.32-5-xen-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro single
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-2.6.32-5-xen-amd64
> }
> menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-2.6.32-5-amd64-advanced-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 2.6.32-5-amd64 ...'
> linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro quiet
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-2.6.32-5-amd64
> }
> menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-2.6.32-5-amd64-recovery-c1edab93-0151-44a9-b727-6db233208284' {
> load_video
> insmod gzio
> insmod xzio
> insmod part_msdos
> insmod ext2
> set root='hd0,msdos1'
> if [ x$feature_platform_search_hint = xy ]; then
> search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1' c1edab93-0151-44a9-b727-6db233208284
> else
> search --no-floppy --fs-uuid --set=root c1edab93-0151-44a9-b727-6db233208284
> fi
> echo 'Loading Linux 2.6.32-5-amd64 ...'
> linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=c1edab93-0151-44a9-b727-6db233208284 ro single
> echo 'Loading initial ramdisk ...'
> initrd /boot/initrd.img-2.6.32-5-amd64
> }
> }
>
> ### END /etc/grub.d/10_linux ###
>
> ### BEGIN /etc/grub.d/20_linux_xen ###
>
> ### END /etc/grub.d/20_linux_xen ###
>
> ### BEGIN /etc/grub.d/30_os-prober ###
> ### END /etc/grub.d/30_os-prober ###
>
> ### BEGIN /etc/grub.d/30_uefi-firmware ###
> ### END /etc/grub.d/30_uefi-firmware ###
>
> ### BEGIN /etc/grub.d/40_custom ###
> # This file provides an easy way to add custom menu entries. Simply type the
> # menu entries you want to add after this comment. Be careful not to change
> # the 'exec tail' line above.
> ### END /etc/grub.d/40_custom ###
>
> ### BEGIN /etc/grub.d/41_custom ###
> if [ -f ${config_directory}/custom.cfg ]; then
> source ${config_directory}/custom.cfg
> elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
> source $prefix/custom.cfg;
> fi
> ### END /etc/grub.d/41_custom ###
> *********************** END /boot/grub/grub.cfg
>
> *********************** BEGIN /proc/mdstat
> cat: /proc/mdstat: No such file or directory
> *********************** END /proc/mdstat
>
> *********************** BEGIN LVM
> *********************** END LVM
>
> *********************** BEGIN /dev/disk/by-id
> ls: cannot access /dev/disk/by-id: No such file or directory
> *********************** END /dev/disk/by-id
>
> *********************** BEGIN /dev/disk/by-uuid
> total 0
> lrwxrwxrwx 1 root root 11 Jul 19 09:16 c1edab93-0151-44a9-b727-6db233208284 -> ../../xvda1
> lrwxrwxrwx 1 root root 11 Jul 19 09:16 e311cf84-7804-4c61-a056-7f7f9fcbd29e -> ../../xvda5
> *********************** END /dev/disk/by-uuid
>
> -- System Information:
> Debian Release: 7.6
> APT prefers stable
> APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.14-1-amd64 (SMP w/2 CPU cores)
> Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages grub-xen depends on:
> ii debconf [debconf-2.0] 1.5.49
> ii grub-common 2.02~beta2-10
> ii grub-xen-bin 2.02~beta2-10
> ii grub2-common 2.02~beta2-10
> ii ucf 3.0025+nmu3
>
> grub-xen recommends no packages.
>
> grub-xen suggests no packages.
>
> -- debconf information:
> grub2/kfreebsd_cmdline:
> grub2/device_map_regenerated:
> * grub2/linux_cmdline:
> grub2/kfreebsd_cmdline_default: quiet
> * grub2/linux_cmdline_default: quiet
>
>
>
>
>
More information about the Pkg-grub-devel
mailing list