Grub error : symbol grub_xputs not found

Bug #609280 reported by Xavier Guillot on 2010-07-23
88
This bug affects 20 people
Affects Status Importance Assigned to Milestone
grub2 (Debian)
New
Unknown
grub2 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: grub-pc

Hello,

I installed Ubuntu Maverick Desktop AMD 64 with Iso daily file from 07-23.

Burning of CD, start on Live CD, Ubuntu functional dynamics on Live CD are well and work fine.

Installation on hard drive also succeeded.

But when I restart on HDD, it does not boot, just after bios I get a black screen and this message :

error : the symbol 'grub_xputs' not found
grub rescue >

And nothing more...

Files seem to be well copied on hard drive (there are available with Live CD).

Here is the copy of the /boot/grub/grub.cfg file :

#
# 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
set default="0"
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 recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set a702a4a5-8c6f-40ed-95bc-a031534919c9
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
if terminal_output gfxterm ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_output
  terminal gfxterm
fi
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set a702a4a5-8c6f-40ed-95bc-a031534919c9
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
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 ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-9-generic' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 load_video
 set gfxpayload=keep
 insmod part_msdos
 insmod ext2
 set root='(hd1,msdos1)'
 search --no-floppy --fs-uuid --set a702a4a5-8c6f-40ed-95bc-a031534919c9
 linux /boot/vmlinuz-2.6.35-9-generic root=UUID=a702a4a5-8c6f-40ed-95bc-a031534919c9 ro quiet splash
 initrd /boot/initrd.img-2.6.35-9-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-9-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
 recordfail
 load_video
 set gfxpayload=keep
 insmod part_msdos
 insmod ext2
 set root='(hd1,msdos1)'
 search --no-floppy --fs-uuid --set a702a4a5-8c6f-40ed-95bc-a031534919c9
 echo 'Loading Linux 2.6.35-9-generic ...'
 linux /boot/vmlinuz-2.6.35-9-generic root=UUID=a702a4a5-8c6f-40ed-95bc-a031534919c9 ro single
 echo 'Loading initial ramdisk ...'
 initrd /boot/initrd.img-2.6.35-9-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
 insmod part_msdos
 insmod ext2
 set root='(hd1,msdos1)'
 search --no-floppy --fs-uuid --set a702a4a5-8c6f-40ed-95bc-a031534919c9
 linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
 insmod part_msdos
 insmod ext2
 set root='(hd1,msdos1)'
 search --no-floppy --fs-uuid --set a702a4a5-8c6f-40ed-95bc-a031534919c9
 linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
 insmod part_msdos
 insmod ext2
 set root='(hd1,msdos1)'
 search --no-floppy --fs-uuid --set a702a4a5-8c6f-40ed-95bc-a031534919c9
 multiboot /boot/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
 insmod part_msdos
 insmod ext2
 set root='(hd1,msdos1)'
 search --no-floppy --fs-uuid --set a702a4a5-8c6f-40ed-95bc-a031534919c9
 multiboot /boot/memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Here is the copy of command sudo fdisk -l :

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000de947

   Device Boot Start End Blocks Id System
/dev/sda1 1 91201 732572001 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00030042

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 3148 25286278+ 83 Linux
/dev/sdb2 3149 121601 951473692 5 Extended
/dev/sdb5 3149 3491 2755116 82 Linux swap / Solaris
/dev/sdb6 3492 10115 53207248+ 83 Linux
/dev/sdb7 10116 121601 895511263+ 83 Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004471f

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

/ is on sdb1 which has the UUID a702a4a5-8c6f-40ed-95bc-a031534919c9 and /home is on sdb6, both ext4 drives.

Also, as I ran Gparted, I noticed that sda had a "boot" flag - and it shouldn't : sda, sdb7 and sdc are ext4 partitions with datas, no other OS).

So for the moment, I am unable to run Ubuntu Maverick and google tells nothing about grub xputs... I do not know if this is a problem with my material (hard drive, DVD, computer...) or Ubuntu.

Thanks in advance for your help.

Xavier

Xavier Guillot (valeryan-24) wrote :

I tried to follow this guide :

http://grub.enbug.org/Grub2LiveCdInstallGuide

to enter as root into my installed system, and reinstall grub properly.

It tells me that it can not create /dev/null (permission denied), but /dev/null is present on the hard drive (see picture joined), grub-pc is well installed, and it is impossible to update-grub ("cannot find a device for /")

Xavier Guillot (valeryan-24) wrote :
Xavier Guillot (valeryan-24) wrote :

Here it is well xputs on the grub error message, and not puts.

Is it related to this :

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/496435/comments/11

Because, yes I have 3 Sata hard drives on my motherboard, but I had no problem with Lucid installation last March.

Xavier Guillot (valeryan-24) wrote :

Also seen this bug report on Debian :

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589737

Xavier Guillot (valeryan-24) wrote :

OK, partially solved :

I ran into the bios to be sure, go to the boot order of hard drives and changed it to the correct HD which contains Ubuntu Maverick to boot at first.

It works now, Ubuntu loads and seems to work fine, I have access to all my drives and datas.

Question is : I never changed the boot order of hard drives in bios, how could it happen ?

Dejan (dejan-rodiger) wrote :

I was doing upgrade from 10.04 to 10.10 beta using sudo update-manager -d yesterday. I ended with this error also. Now I need to download iso to start recovery :-(
I also have two disks, but I think I have correct disk in BIOS set to be first. I will check when I come home and fix it.

rif (fericean) wrote :

I did the upgrade from 10.04 to 10.10 too and I ended up with grub_xputs not found. I have an intel (bios) raid and it's the first "drive" to boot.

Dejan (dejan-rodiger) wrote :

I have booted Ultimate Boot CD with Super Grub Disk 2, which gave me option to boot from my "boot" partition. After logging in, I have started this command "sudo dpkg-reconfigure grub-pc" and fixed my boot.

Jordan (jordanu) wrote :

This is not a duplicate of bug #496435 as this was a fresh install, not an upgrade. The cause of this bug is likely that the installer installed grub to a drive other than the one which is first in the boot order. This situation is very difficult to prevent as the boot drive can't be determined from within linux. One possible solution would be installing to all hard drives by default, but that is likely unacceptable in many circumstances.

To clarify, the reason that I believe grub failed to load is that the machine was actually booting from a hard drive with an old install of grub2 in its mbr+embedded area. When this old install tried to use the newer, incompatible, modules from /boot/grub it failed. There was a drive with a recent and working grub install, it just wasn't the drive being booted from.

Changed in grub2 (Debian):
status: Unknown → New

It would be nice to see some progress on this. This problem affects at least 11 people here, and many people on the Ubuntu Forums.

I upgraded my Ubuntu 10.04 x86_64 system to 10.10 via the Update Manager and now my system is unbootable. It seems like the upgrade process should be able to find the existing grub configuration, and update it correctly.

This problem results in a non-bootable system, and the fix is time-consuming, non-trivial and could corrupt existing files. The fix, as I understand it is:

1. Download Install CD (Make sure you get the correct architecture)
2. Boot from Install CD
3. Determine partition containing /boot and the grub files
4. chroot to affected partition
5. Use `grub-installer` to overwrite grub files.

I've done lots and lots of work on this class of problem over the last
several months. I'm afraid that there are too many bugs about it, too
many of which consist of lots of different people chiming in with lots
of similar symptoms which would have to be individually untangled to
find the different underlying causes, to update each one of them
individually.

This is probably in fact fixed for new systems, but once the GRUB
packaging has forgotten its installation target on any particular system
due to old bugs, it's more or less impossible to recover that
information in any vaguely reliable way. In the cases where we don't
re-prompt automatically, it's generally because it doesn't even know
that it has the wrong install location recorded in the debconf database
(i.e. it has information that looks plausible, but which is wrong). You
need to run 'sudo dpkg-reconfigure grub-pc' to fix it properly on a
given system.

For a more detailed treatment of this, see my blog (which is focused on
Debian versions of grub2, but the issues are largely the same):

  http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/debian/2010-06-21-grub2-boot-problems.html
  http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/debian/2010-07-02-grub2-with-luck.html

landroni (landroni) wrote :

To work around this (annoying) bug see [1], specifically Section 13 Reinstalling GRUB 2 from LiveCD

[1] http://ubuntuforums.org/showthread.php?t=1195275

tags: added: iso-testing
Changed in grub2 (Ubuntu):
status: New → Confirmed
Phillip Susi (psusi) wrote :

Closing as this was a configuration issue in a no longer supported release.

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

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

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