grub2 crashes randomly 'free magic is broken' with multiple disks

Bug #498882 reported by negativland2009
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: grub-pc

ubuntu 9.10 x86 with latest ubdates and kernel
2.6.31-16-generic #53-Ubuntu SMP
grub-pc 1.97~beta4-1ubuntu4.1

grub2 crashes randomly on boot:

Grub Loading...
Free magic is broken at ....
or
Alloc magic is broken at ...

I have mutiple disks (not raided) and dual boot to winxp.
boot disk is ext4 - data disks are ext3 - see below

is dual core 3Ghz core2duo with 3GB mem - memory is fine no blue screens on xp games and memtest fine
tried live disk reinstall grub - fine for 2 days then on cold boot came back with magic error - same every time - boots on restart afterwards mostly first reboot - sometimes after a few successive reboots.
seemingly unfixable

fdisk -l:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00041986

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 59672 479315308+ 83 Linux
/dev/sda2 59673 60801 9068692+ 5 Extended
/dev/sda5 59673 60801 9068661 82 Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x01ab01ab

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 6374 51199123+ 7 HPFS/NTFS
/dev/sdb2 6375 60800 437176845 f W95 Ext'd (LBA)
/dev/sdb5 6375 38245 256003776 7 HPFS/NTFS
/dev/sdb6 38246 60800 181173006 7 HPFS/NTFS

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x289d289c

   Device Boot Start End Blocks Id System
/dev/sdc1 1 60801 488384001 83 Linux

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe4fb2964

   Device Boot Start End Blocks Id System
/dev/sdd1 1 121601 976760001 83 Linux

/boot/grub/grub.cfg

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

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 8207067b-d439-4c68-b1de-2bae8b0d5dc9
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd0,1)
search --no-floppy --fs-uuid --set 8207067b-d439-4c68-b1de-2bae8b0d5dc9
insmod tga
if background_image /usr/share/images/grub/Lake_mapourika_NZ.tga ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/white
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
 set quiet=1
 insmod ext2
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set 8207067b-d439-4c68-b1de-2bae8b0d5dc9
 linux /boot/vmlinuz-2.6.31-16-generic root=UUID=8207067b-d439-4c68-b1de-2bae8b0d5dc9 ro splash quiet splash
 initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-16-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
 insmod ext2
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set 8207067b-d439-4c68-b1de-2bae8b0d5dc9
 linux /boot/vmlinuz-2.6.31-16-generic root=UUID=8207067b-d439-4c68-b1de-2bae8b0d5dc9 ro single splash
 initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-15-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
 set quiet=1
 insmod ext2
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set 8207067b-d439-4c68-b1de-2bae8b0d5dc9
 linux /boot/vmlinuz-2.6.31-15-generic root=UUID=8207067b-d439-4c68-b1de-2bae8b0d5dc9 ro splash quiet splash
 initrd /boot/initrd.img-2.6.31-15-generic
}
menuentry "Ubuntu, Linux 2.6.31-15-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
 insmod ext2
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set 8207067b-d439-4c68-b1de-2bae8b0d5dc9
 linux /boot/vmlinuz-2.6.31-15-generic root=UUID=8207067b-d439-4c68-b1de-2bae8b0d5dc9 ro single splash
 initrd /boot/initrd.img-2.6.31-15-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
 set quiet=1
 insmod ext2
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set 8207067b-d439-4c68-b1de-2bae8b0d5dc9
 linux /boot/vmlinuz-2.6.31-14-generic root=UUID=8207067b-d439-4c68-b1de-2bae8b0d5dc9 ro splash quiet splash
 initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
 insmod ext2
 set root=(hd0,1)
 search --no-floppy --fs-uuid --set 8207067b-d439-4c68-b1de-2bae8b0d5dc9
 linux /boot/vmlinuz-2.6.31-14-generic root=UUID=8207067b-d439-4c68-b1de-2bae8b0d5dc9 ro single splash
 initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
 linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
 linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sdb1)" {
 insmod ntfs
 set root=(hd1,1)
 search --no-floppy --fs-uuid --set 48042ae5042ad5aa
 drivemap -s (hd0) ${root}
 chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### 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 ###

Tags: grub-pc grub2
Revision history for this message
negativland2009 (negativland2009) wrote :

meant to say - is fresh install ubuntu 9.10 with grub2 - not upgrade - working fine on laptop with only 1 disk

Revision history for this message
negativland2009 (negativland2009) wrote :

well Ive wasted a lot of time now trying to find a solution - reinstalled grub2 several times by all the different methods - tried the previous version before the update - ran memtest on memory and mprime/prime95 torture tests (which Ive found will detect any hardware problems if memtest doesnt) - run hard disk checking software - upgraded / reflashed bios - im pretty sure my hardware is fine - not having any problems with any other software - and each time I almost think its fixed and after about the 5th boot - fails with 'free magic is broken' - sometimes just reboots while loading grub - or comes up with misaligned pointer - and just seems to be random and get worse over time - ie the number of reboots required to get to the grub menu succesfully.
honestly Ive finally given up and reverted to grub1 and now having no problems. grub2 - no thanks - a terrible piece of software - shouldnt have been released with a full release of ubuntu - is going to put a lot of people off it id imagine.

Revision history for this message
rubioo (rubioo) wrote :

Hello, I have the same problem. When I turn on my computer I get this:

Grub Loading
free magic is bronken at 0x41f32b00: 0x10
Aborted. Press any key to exit.

Reboot and select proper boot device
or insert boot media in selected boot device
and press any key

or this:

Out of range pointer 0x41f71e00
Aborted. Press any key to exit.

I did the memtest and do not detect any error, my computer has no more than 2 years so the hardware is fine.

Revision history for this message
negativland2009 (negativland2009) wrote :

Hi rubioo, havent had any replies or anything to this so kind of forgot about it ... turned out though that grub legacy I reverted to was fine for a while then suddenly started getting errors with this too - still no problems with any other software including memory intensive games on windows etc - normally the first thing to go with bad memory is games crashing and windows blue screens for me - have had this happen but memtest passing ok.

Anyway it continued and got worse and then was erroring every boot and could no longer boot and then I noticed on bios was reporting 2GB instead of 3GB - right ok - memory failure - then memtest started reporting errors and I removed the offending stick and everything ok again and back to normal ie booting fine ..

So if anyone else reads this they will know they have bad memory like me ..

is really weird though that memory intensive games and mersenne prime torture tests all working ok as is memtest but only the grub2 bootloader (and then grub legacy) are giving errors with it .. totally confusing ...

Hope this is useful to somebody though ... was bit annoyed I wasnt getting any response from anyone on the bug team but I guess theres a lot of bugs ... anyhoo youve got bad memory mate if having same errors as me - try swapping out 1 stick at a time and seeing which one is on the turn as it were because it will fail eventually .. and get some new memory ...

 incidentally I was running 1066 mhz ram (PC8500) DDR2 and it did get hot - I bought some new 800 mhz ram (PC6400) with lower latency and runs a lot cooler / more stable and if anything faster - doesnt seem any slower and will probably last longer ..

Revision history for this message
rubioo (rubioo) wrote :

Then, it must be the RAM?

Revision history for this message
negativland2009 (negativland2009) wrote :

I think so, something hardware based or ram settings maybe ... Ive also had problems with ram bios settings before and had to update bios to get the auto (by spd) settings / voltage right .. also 2 identical make/model ram but 1 was newer and ran at different voltage .. or faulty power supply ...

try the ram first - try 1 stick at a time and see if it boots ok then ...

Revision history for this message
negativland2009 (negativland2009) wrote :

then check you have latest bios and the ram timing / voltage settings are correct - depends if you have a bios that allows you to do this ..

Revision history for this message
rubioo (rubioo) wrote :

Thanks for all the help. I'll check the status of RAM.

Revision history for this message
xor (xor) wrote :

I just did a fresh install of natty (amd64). Grub works normally EXCEPT when I try to manually edit the boot settings - then after pressing the boot key it dies with "alloc magic is broken at 0x3fdb7230" most of the time (not always, sometimes it works).

I did TWO full test runs of memtest86+ and the memory of the machine is OK.

I really believe that this is a grub bug now that two people have reported it.

Revision history for this message
xor (xor) wrote :

Grub version used in #9: 1.99~rc1-13ubuntu3

Revision history for this message
negativland2009 (negativland2009) wrote :

just to point out I have had no problems since I replaced some ram which failed totally - after completing memtest and other ram tests fine - looks like it showed errors only with grub2 while it was pre-failure which is bizzare. Have since changed ram to another make entirely (corsair xms2) after upgrading bios and checking motherboard compatibility list as had problems with incorrect spd timings on problem ram (ocz nvidia sli) - motherboard gigabyte p35-dq6 - hope this helps ...

Revision history for this message
Colin Watson (cjwatson) wrote :

The reported message is a symptom of a general memory management failure somewhere, equivalent to a malloc or free failure; it should not be assumed that any two people with this kind of symptom have it for the same reason.

Revision history for this message
Daniel Nyström (speakman) wrote :

I'm getting this too, but I'm also getting random MCE reboots. Running on Xeon W3680 w/ 24GB Kingston ECC RAM (QVL). I've been running memtest as well for a long time, but no indication on memory errors.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
hashem (hashem67) wrote :

I have this error some times on ubuntu 18.04 bionic on Proxmox when adding a new disk to VM and create a new volume group on it. when I restart os this error occurs.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.