Grub2 entries to boot Wubi incorrect... "Error: file not found, Press any key to continue" at boot

Bug #738345 reported by bcbc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lupin
Invalid
Undecided
Unassigned
grub2 (Ubuntu)
Fix Released
High
Colin Watson
Natty
Fix Released
High
Colin Watson

Bug Description

The 10_lupin script generates menu entries to boot Wubi installs. The following entry has been created:
### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.38-7-generic" {
 insmod ext2
 set root='(/dev/loop0)'
 search --no-floppy --fs-uuid --set=root 23b0f259-6cdd-4cd2-bc50-8febbcb784b0
 loopback loop0 /ubuntu/disks/root.disk
 set root=(loop0)
 linux /boot/vmlinuz-2.6.38-7-generic root=UUID=80E4E195E4E18DAA loop=/ubuntu/disks/root.disk ro quiet splash
 initrd /boot/initrd.img-2.6.38-7-generic
}

The UUID 23bf... is the loop device /dev/loop0. The file /ubuntu/disks/root.disk is not on the loop device, it's on the host (UUID=80E4...). So to 1) set root to /dev/loop0 which it should be, override to /dev/loop0 by uuid, and then try to loop mount /ubuntu/disks/root.disk won't work.

I'm not sure exactly what the cause of the message is - but after selecting to boot, the next screen you get a blank screen with:
"Error: file not found.
Press any key to continue"
After pressing a key it then boots normally.

This did not happen on the initial install, so I assume it's changed since running updates.
I also noticed a flashed 'Error: file not found' just before the grub menu displays. This also did not happen on the initial install.

Just for reference here is a copy of a Lucid version of a lupin menuentry for Wubi. Note the differences of insmod ntfs, and setting root to the partition (not loop device).

On a lucid wubi it looks similar to this:
### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.32-27-generic" {
    insmod ntfs
    set root='(hd0,2)'
    search --no-floppy --fs-uuid --set 80E4E195E4E18DAA
    loopback loop0 /ubuntu/disks/root.disk
    set root=(loop0)
    linux /boot/vmlinuz-2.6.32-27-generic root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
    initrd /boot/initrd.img-2.6.32-27-generic
}

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: lupin-support 0.33
ProcVersionSignature: Ubuntu 2.6.38-7.36-generic 2.6.38
Uname: Linux 2.6.38-7-generic i686
Architecture: i386
Date: Sat Mar 19 10:52:15 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110314)
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: lupin
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
bcbc (bcbc) wrote :
Revision history for this message
bcbc (bcbc) wrote :
description: updated
Revision history for this message
bcbc (bcbc) wrote :

I reinstalled the same version of Wubi and checked grub.cfg. The lupin entry looks like this:
### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.38-6-generic" {
 insmod part_msdos
 insmod ntfs
 set root='(/dev/sda,msdos3)'
 search --no-floppy --fs-uuid --set=root 8654915254914639
 loopback loop0 /ubuntu/disks/root.disk
 set root=(loop0)
 linux /boot/vmlinuz-2.6.38-6-generic root=UUID=8654915254914639 loop=/ubuntu/disks/root.disk ro quiet splash
 initrd /boot/initrd.img-2.6.38-6-generic
}
Apart from changing the target partition it shows that the grub.cfg changed after the install - the original entry looks like the traditional wubi entry, but then running "sudo update-grub" changes it to this:
### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu, Linux 2.6.38-6-generic" {
 insmod ext2
 set root='(/dev/loop0)'
 search --no-floppy --fs-uuid --set=root b4c80465-f6f6-4e88-a1dc-0321acfe292f
 loopback loop0 /ubuntu/disks/root.disk
 set root=(loop0)
 linux /boot/vmlinuz-2.6.38-6-generic root=UUID=8654915254914639 loop=/ubuntu/disks/root.disk ro quiet splash
 initrd /boot/initrd.img-2.6.38-6-generic
}

So I don't think this is a lupin script issue, but rather a grub2 issue.

affects: lupin (Ubuntu) → grub2 (Ubuntu)
Revision history for this message
Colin Watson (cjwatson) wrote :

The problem appears to be that 'grub-probe --target=device /host/ubuntu/disks/root.disk' returns information for / rather than /host.

Changed in lupin:
status: New → Invalid
Changed in grub2 (Ubuntu Natty):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-11.04-beta-1
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Colin Watson (cjwatson) wrote :

I've sent a patch upstream and committed it to Debian. It'll be in my next upload. Thanks for your report.

Changed in grub2 (Ubuntu Natty):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 1.99~rc1-5ubuntu1

---------------
grub2 (1.99~rc1-5ubuntu1) natty; urgency=low

  * Resynchronise with Debian. Remaining changes:
    - Adjust for default Ubuntu boot options ("quiet splash").
    - Default to hiding the menu; holding down Shift at boot will show it.
    - Set a monochromatic theme and an aubergine background for Ubuntu.
    - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
      recovery mode, quiet option, tweak how memtest86+ is displayed, and
      use UUIDs where appropriate.
    - Fix backslash-escaping in merge_debconf_into_conf.
    - Remove "GNU/Linux" from default distributor string.
    - Add crashkernel option.
    - Bypass menu unless other OSes are installed or Shift is pressed.
    - Allow Shift to interrupt 'sleep --interruptible'.
    - Reduce visual clutter in normal mode.
    - Remove verbose messages printed before reading configuration.
    - Suppress kernel/initrd progress messages, except in recovery mode.
    - Handle filesystems loop-mounted on file images.
    - Ignore devices loop-mounted from files in Linux grub.d scripts.
    - Show the boot menu if the previous boot failed.
    - Don't generate device.map during grub-install or grub-mkconfig.
    - Adjust upgrade version checks for Ubuntu.
    - Suppress "GRUB loading" message unless Shift is held down.
    - Adjust versions of grub-doc and grub-legacy-doc conflicts.
    - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
    - Look for .mo files in /usr/share/locale-langpack first.
    - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
    - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
    - Use qemu rather than qemu-system-i386.
    - Add a grub-rescue-efi-amd64 package.
    - On Wubi, don't ask for an install device, but just update wubildr
      using the diverted grub-install.
    - Enable lua from grub-extras.
    - Incorporate the bitop library into lua.
    - Add enum_pci function to grub module in lua.
    - Check hardware support before using gfxpayload=keep.
    - Build part_msdos and vfat into EFI boot images.
    - Put second and subsequent Linux menu entries in a submenu.
    - Preferred resolution detection for VBE.
    - Set vt.handoff=7 for smooth handoff to kernel graphical mode.
    - Don't ask where to install if upgrading and core.img doesn't exist.
    - Drop the default priority of grub2/linux_cmdline to medium.
    - Build with gcc-4.5 on ppc64.
    - Add apport hook for ProblemType = 'Package'.

grub2 (1.99~rc1-5) unstable; urgency=low

  * Update debian/legacy/update-grub to the version from grub 0.97-65.
  * Mark binary packages as Multi-Arch: foreign (for example, an amd64
    kernel installed on an i386 system could use the native architecture's
    GRUB).
  * Rewrite find_root_device_from_mountinfo to cope with move-mounts
    (LP: #738345).

  [ Updated translations ]
  * Esperanto (Felipe Castro). Closes: #606524
  * Thai (Theppitak Karoonboonyanan). Closes: #607706
 -- Colin Watson <email address hidden> Wed, 23 Mar 2011 23:51:04 +0000

Changed in grub2 (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
bcbc (bcbc) wrote :

Thanks for the quick fix. I can confirm that it is working. It wasn't in my daily-live image, but after running the latest updates, it was fixed (and grub-install -v shows 1.99~rc1-5ubuntu1)

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.