Bug#502128: grub-pc: Crashes with 'free magic is broken...' if entries in grub.cfg happens to be a multiple of 64 bytes

Bjørn Mork bjorn at mork.no
Mon Oct 13 11:55:07 UTC 2008


Package: grub-pc
Version: 1.96+20080724-10
Severity: grave
Justification: renders package unusable

A system became unbootable after installing a new kernel without making any other i
changes.  grub just reported:

  free magic is broken at 0x90c00: 0x2e647362


The reason seems to be as obscure as the length of the kernel image name.  This caused 
one of the lines in the new grub.cfg to be exactly 128 bytes (there are two tab's here):

	linux	/boot/vmlinuz-2.6.27-git-ahci-1-amd64 root=UUID=0ebb368d-b15e-4796-9029-9adfced061a0 ro console=tty0 console=ttyS0,9600n8

and this again caused grub to crash.  Changing the entry by e.g adding a space will make
the system bootable again, but I still feel this justifies a grave severity given the
need to boot from some other medium to fix the error.  And not to mention the complete
unexpected side effect of a kernel image name...

Google told me that the bug has been reported to grub-devel with a patch:
http://lists.gnu.org/archive/html/grub-devel/2008-07/msg00601.html

I believe this needs to be fixed before lenny is released.  Thanks.


Bjorn


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/disk/by-uuid/0ebb368d-b15e-4796-9029-9adfced061a0 / ext3 rw,errors=remount-ro,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/sda
(hd0)	/dev/hda
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/update-grub using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod serial
set default=0
set timeout=5
serial --unit=0 --speed=9600
terminal serial
### 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_hurd ###
### END /etc/grub.d/10_hurd ###

### BEGIN /etc/grub.d/10_linux ###
set root=(hd0,1)
search --fs-uuid --set 0ebb368d-b15e-4796-9029-9adfced061a0
menuentry "Debian GNU/Linux, linux 2.6.27-git-ahci-1-amd64" {
	linux	/boot/vmlinuz-2.6.27-git-ahci-1-amd64 root=UUID=0ebb368d-b15e-4796-9029-9adfced061a0 ro console=tty0 console=ttyS0,9600n8 
	initrd	/boot/initrd.img-2.6.27-git-ahci-1-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.27-git-ahci-1-amd64 (single-user mode)" {
	linux	/boot/vmlinuz-2.6.27-git-ahci-1-amd64 root=UUID=0ebb368d-b15e-4796-9029-9adfced061a0 ro single console=tty0 console=ttyS0,9600n8
	initrd	/boot/initrd.img-2.6.27-git-ahci-1-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.26-1-amd64" {
	linux	/boot/vmlinuz-2.6.26-1-amd64 root=UUID=0ebb368d-b15e-4796-9029-9adfced061a0 ro console=tty0 console=ttyS0,9600n8 
	initrd	/boot/initrd.img-2.6.26-1-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.26-1-amd64 (single-user mode)" {
	linux	/boot/vmlinuz-2.6.26-1-amd64 root=UUID=0ebb368d-b15e-4796-9029-9adfced061a0 ro single console=tty0 console=ttyS0,9600n8
	initrd	/boot/initrd.img-2.6.26-1-amd64
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file is an example on how to add custom entries
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.27-git-ahci-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]   1.5.22           Debian configuration management sy
ii  grub-common             1.96+20080724-10 GRand Unified Bootloader, version 
ii  libc6                   2.7-13           GNU C Library: Shared libraries
ii  liblzo2-2               2.03-1           data compression library
ii  libncurses5             5.6+20080830-1   shared libraries for terminal hand

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
pn  desktop-base                  <none>     (no description available)
pn  os-prober                     <none>     (no description available)

-- debconf information:
* grub-pc/linux_cmdline:
* grub-pc/chainload_from_menu.lst: false





More information about the Pkg-grub-devel mailing list