After Maverick to Natty upgrade, grub won't boot and displays "symbol not found : 'grub_env_export'"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Invalid
|
High
|
Unassigned |
Bug Description
Binary package hint: grub2
It's pretty much all in the title, but Grub2 messed up after the upgrade from 10.10 to 11.04. During the install, i watched carefully the configuration procedure, it ran fine.
I then just rebooted, and there it was: grub simply said:
error: symbol not found: 'grub_env_export'
grub rescue>
(btw: grub rescue doesn't even return me a help menu on "help")

Colin Watson (cjwatson) wrote : | #1 |

Hadrien Titeux (hadware) wrote : | #2 |
- deconf-show grub-pc Edit (706 bytes, text/plain)
Yeah, i didn't want to use the good'ol CDboot-and-chroot method to repair GRUB until someone more advanced than could maybe use the bug to eventually fix it. The repair worked fine, and i can merilly boot my 11.04 now.
The command output you asked is attached to this message.
I may precise that my computer conf may have "tricked" in some ways the grub installer:
sda: an old XP with only 1 partition
sdb: an "automatic-
Not so complicated actually, but what do you know...
Thanks!

Bart Cerneels (stecchino) wrote : | #3 |
I'm hit by the same issue but with a twist. I'm using an encrypted root and nothing I seem to do, just can't seem to get past this grub error, even when booting from USB. I think I might have to reinstall without being able to rescue my data...
This is a quite serious bug, how come natty was released before this was resolved?

Martin Eve (martineve) wrote : | #4 |
Just encountered this on an upgrade; not great, going to attempt the grub2 recovery.

Bart Cerneels (stecchino) wrote : | #5 |
- debconf-show grub-pc Edit (726 bytes, text/plain)
Finally managed to fix grub, at least the rest of the natty upgrade seems to have succeeded.
I had to use a different distro (systemrescue cd) to do the chroot and the first 'dpkg-reconfigure grub-pc' didn't seem to work, possible because of an error (could not write to /livemnt/boot). But after a second attempt, mkdir -p /livemnt/boot; mount -o bind /boot /livemnt/boot and a finale grub-install /dev/sda to be sure I have a working system again.
Attaching the output of 'debconf-show grub-pc' before attempting the fix.

Giuseppe Pennisi (giupenni78) wrote : | #6 |
I have the same problem but I use Linux Kernel RAID0.
I can fix it?

Roman Yepishev (rye) wrote : | #7 |
Same here, on a released version of Natty

Roman Yepishev (rye) wrote : | #8 |

Roman Yepishev (rye) wrote : | #9 |
It looks like grub is being installed on the first found hard drive even if it was originally on the second one.
I was able to reproduce this issue with the following VM (libvirt) setup:
/dev/sda - unpartitioned hard drive, ide bus
/dev/sdb - msdos label, ide bus containing Ubuntu Lucid 10.04.1 installation.
After the upgrade from Lucid to Maverick the bootloader works properly
After the upgrade from Maverick to Natty the bootloader failed with:
error: the symbol `grub_xputs` not found
grub rescue>
Changed in grub2 (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |

Hadrien Titeux (hadware) wrote : Re: [Bug 756564] Re: Ater Maverick to Natty upgrade, grub won't boot and displays "symbol not found : 'grub_env_export'" | #10 |
I'll test it on another pc with the same config.
On 2 May 2011 14:11, "Roman Yepishev" <email address hidden> wrote:
It looks like grub is being installed on the first found hard drive even
if it was originally on the second one.
I was able to reproduce this issue with the following VM (libvirt)
setup:
/dev/sda - unpartitioned hard drive, ide bus
/dev/sdb - msdos label, ide bus containing Ubuntu Lucid 10.04.1
installation.
After the upgrade from Lucid to Maverick the bootloader works properly
After the upgrade from Maverick to Natty the bootloader failed with:
error: the symbol `grub_xputs` not found
grub rescue>
** Changed in: grub2 (Ubuntu)
Status: New => Confirmed
** Changed in: grub2 (Ubuntu)
Importance: Undecided => High
--
You received this bug notification because you are a direct subscriber
of the bug.
https:/
Confirmed
Bug description:
Binary package hint: grub2
It's pretty much all in the title, but Grub2 messe...

Malte S. Stretz (mss) wrote : | #11 |
I just ran into this bug as well (upgrade from maverick to natty).
I remember that I saw something I interpreted as a warning flying by when I did the dist-upgrade. Some part of grub complained that it couldn't probe /dev/disk/
Indeed, I recently replaced disks, that file pointed to my old harddisk. I had a look at my notebook which I already upgraded successfully and don't have a device.map here. Guess I can tell you more once the other box is up again :-/
P.S.: Offering a grub resuce shell without even a help command is crap.
summary: |
- Ater Maverick to Natty upgrade, grub won't boot and displays "symbol not - found : 'grub_env_export'" + After Maverick to Natty upgrade, grub won't boot and displays "symbol + not found : 'grub_env_export'" |

Malte S. Stretz (mss) wrote : | #12 |
- apt-term.log.gz Edit (215.0 KiB, application/octet-stream)
Booting from a Live CD and `sudo grub-install --boot-
I cat'ed /var/log/
Setting up grub-common (1.99~rc1-
Installing new version of config file /etc/grub.
Installing new version of config file /etc/grub.
Installing new version of config file /etc/grub.
Installing new version of config file /etc/grub.
Setting up grub-pc (1.99~rc1-
Installing new version of config file /etc/kernel/
Installing new version of config file /etc/kernel/
Installing new version of config file /etc/grub.
Replacing config file /etc/default/grub with new version
/usr/sbin/
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found linux image: /boot/vmlinuz-
Found initrd image: /boot/initrd.
Found memtest86+ image: /memtest86+.bin
File descriptor 40 (/var/log/
File descriptor 44 (/var/log/
File descriptor 74 (/var/log/
done
Setting up grub-gfxpayload

Malte S. Stretz (mss) wrote : | #13 |
P.S.: I think this bug should be referenced from the Release Notes.

Olivier Mengué (dolmen) wrote : | #14 |
Here is my result of "debconf show grub-pc":
----8<-
grub2/
grub2/
* grub2/linux_
grub-
grub-
grub-
grub-
grub-pc/timeout: 10
grub-
* grub-pc/
grub-
grub-
grub-
grub2/
grub-
grub-
* grub2/linux_
* grub-pc/
----8<-
"dpkg-reconfigure grub-pc" has only "/dev/sda3" (my /boot partition) selected which probably explains why /dev/sda has not been updated by the Natty upgrade.
I would like to have grub only in /dev/sda3, but I don't like to have grub in /dev/sda. I would like only a basic boot sector in /dev/sda that would be system agnostic and only load the boot sector of the active partition (which, in that case would be /dev/sda3). That would allow me to easily drop a system partition and switch to an other system using only fdisk by activating an other partition.

Hadrien Titeux (hadware) wrote : | #15 |
I tested it on a PC with 2 hard disks, basically the same and exact configuration, but amazingly it ran *fine*. The only difference is that on the other PC (the one that created the bug), both HDD were SATA, and here one of the two is IDE.

Attila Lendvai (attila-lendvai) wrote : | #16 |
i also saw this after upgrading to 11.04.
grub-install was not enough for me (at boot i got a grub prompt only), i had to do an update-grub in a chroot, too.

mitchelln (mitchell-neill) wrote : | #17 |
I had this problem as well/ I'm running soft raid with raid-0 on Intel chipset. Upgrade all completed, but upon reboot I got grub_env_export error.
The problem is that the upgrade did not create a dmraid initrd image. I booted from live CD and CHROOTed.
Then did:
apt-get purge dmraid
apt-get install dmraid
grub install /dev/mapper/
update grub.
Rebooted and everything was fine.
Needless to say that this would be way beyond a non linux expert. I had exactly the same problem when I upgraded from Lucid to Maverick. So to have exactly the same problem when upgrading to narwhal is extremely disappointing.
You need to start testing RAID installs and upgrades properly Ubuntu.

Timo Jyrinki (timo-jyrinki) wrote : | #18 |
Happened also to me on a non-RAID, but two disk system.

Timo Jyrinki (timo-jyrinki) wrote : | #19 |
- debconf_show_grub_pc.txt Edit (681 bytes, text/plain)
The WD device is not from where maverick booted - granted, I installed the second HD while using maverick and installed grub manually to the new disk, leaving the WD (now /dev/sdb) to host some data files. I don't know if a situation like this can be solved (although of course the information from where the system was booted from is available during upgrade).

Sebastian Schuberth (sschuberth) wrote : | #20 |
I'm seeing the same grub error when booting, *however*, it just flashes up quickly and then the regular grub menu is displayed, and all boot entries work fine. I've already tried to (re-)run "grub-install" / "update-grub" / "dpkg-reconfigure grub-pc" to get rid of the error message, without success.
Funnily, "grub-probe -t device /boot/grub" displays "/dev/sda5" on my system (which is my Linux partition) although I specified "/dev/sda" in my last run of "grub-install". Is this expected?

m1st0 (m1st0) wrote : | #21 |
Followed these steps from mitchelln and http://
# Boot from LiveCD
# Made a directory to mount the root filesystem to
sudo mkdir /media/internal
# -- Going to chroot into our RAID1 system
# Notice the following is not the whole RAID drive nor the swap, just where the root filesystem exists (specific to my system)
sudo mount /dev/mapper/
# i.e. sudo mount /dev/mapper/
sudo mount --bind /dev /media/internal/dev
sudo mount --bind /proc /media/
sudo mount --bind /sys /media/internal/sys
sudo chroot /media/internal
# May not be there
apt-get purge dmraid
apt-get install dmraid
# I believe here it is the whole RAID disk, not just the partition
grub-install /dev/mapper/
update-grub2
reboot
That was it. Unfortunately, I do have an error that appears on the splash screen relating to skip the mounting process or the similar, but once skipped my login screen came up and system is operational.

m1st0 (m1st0) wrote : | #22 |
Of course, I would not have had to do the above steps if I had fixed the RAID setup before restarting right after the upgrade to Natty. I likely would only have had to do the following before a reboot:
# May not be there
apt-get purge dmraid
apt-get install dmraid
# I believe here it is the whole RAID disk, not just the partition
grub-install /dev/mapper/
update-grub2
reboot

pureblood (freeseek) wrote : | #23 |
I had the same problem. I think what is happening is that grub 1.99 is not installed in the mbr. Not sure why. Does it say grub 1.98 on your grub console? I fixed the problem with the following command lines:
sudo apt-get purge grub-common
sudo apt-get install grub-pc
After booting the system from grub 1.98 with:
linux /vmlinux root=UUID=
initrd /initrd.img
boot
Notice that the UUID might not be the same in your system.

Sebastian Schuberth (sschuberth) wrote : | #24 |
pureblood, in case you were referring to my post, my grub menu says 1.99~rc1-13ubuntu3, the same version that is installed on my Kubuntu 11.04. However, I just noticed the error message no longer says "error: symbol not found" (so my initial reinstall of grub seems to have fixed that), but "error: no video mode activated", which is bug 699802. Sorry for the noise.
tags: | added: grub-modules-skew |

Rickard Westman (rwestman) wrote : | #25 |
I see the same thing as the original bug reporter, upgrading from 10.10 to 11.04. Will attach output of "debconf-show grub-pc" in a moment.

Rickard Westman (rwestman) wrote : | #26 |
grub2/
grub2/
grub2/
grub-
grub-
grub-
grub-
grub-
grub2/
grub2/
grub-
grub-
grub-pc/timeout: 10
grub-
grub-
grub-
grub-
grub-

Rickard Westman (rwestman) wrote : | #27 |
The above output was from "debconf-show grub-pc" run directly from the live CD. I now realize that I should probably have mounted the relevant hard disk partition (/dev/sda6) and chrooted to it first. Then, the output is:
grub2/
grub2/
* grub2/linux_
grub-
grub-
grub-
grub-
grub-pc/timeout: 10
grub-
* grub-pc/
grub-
grub-
grub-
grub2/
grub-
grub-
* grub2/linux_
grub-

Rickard Westman (rwestman) wrote : | #28 |
Regarding the suggestion in #2:
> Then running run 'dpkg-reconfigure grub-pc' and make sure that all of the disks on your
> system are selected but none of the partitions, unless you know better.
If I just run this command, I don't get to select or deselect any partitions or disks - I'm just asked about the "Linux command line" (shown as empty by default) and "Linux parameters for the default menu entry but not for the recovery mode" (shown as "quiet splash" by default). So I was not sure what I should do to follow the recommendation of selecting all disks but none of the partitions. Just running "dpkg-reconfigure grub-pc" and accepting the defaults did *not* make my Ubuntu installation bootable.
I then tried the following sequence of commands (/dev/sda6 being the partition where I had Ubuntu installed) and it did make my Ubuntu partition bootable:
mount /dev/sda6 /mnt
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt
update-grub
grub-install /dev/sda
exit
umount /mnt/sys /mnt/dev /mnt/proc /mnt
reboot
After I did this and got my Ubuntu bootable, I tried "dpkg-reconfigure grub-pc" again, and now I *did* get questions about what disks/partitions I wanted to install grub2 to. I also got some progress information in the terminal window I did not get before, so it seems the original attempt aborted prematurely somehow (but without leaving any kind of error message).

Phillip Susi (psusi) wrote : | #29 |
Maverick and Natty have reached end of life and are no longer supported.
Changed in grub2 (Ubuntu): | |
status: | Confirmed → Invalid |
The problem is almost certainly that grub-pc is misconfigured on your system. Get back in using a live CD (https:/ /help.ubuntu. com/community/ Grub2#METHOD% 203%20- %20CHROOT), but instead of running grub-install, run 'debconf-show grub-pc' and post the output to this bug. Then run 'dpkg-reconfigure grub-pc' and make sure that all of the disks on your system are selected but none of the partitions, unless you know better. Then exit, unmount, and reboot as documented on the help.ubuntu.com page.