Ubuntu 10.04 currently requires groot= workaround with pvgrub

Bug #720558 reported by Paul Sladen on 2011-02-17
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
High
Colin Watson
Lucid
High
Colin Watson
Maverick
High
Colin Watson
Natty
High
Colin Watson
grub-installer (Ubuntu)
Undecided
Unassigned
Lucid
Undecided
Unassigned
Maverick
Undecided
Unassigned
Natty
Undecided
Unassigned

Bug Description

Stable update justification:

Impact: Part of a set of bugs rendering it impossible to install any Ubuntu release from Lucid onwards as a Xen guest using d-i. (The others are bug 857548 and bug 857662, which affect only Natty and Oneiric.)
Development branch: Fixed in grub 0.97-29ubuntu63 in Oneiric.
Patch: http://bazaar.launchpad.net/~ubuntu-core-dev/grub/lucid-proposed/revision/905?compare_revid=903, and similar for other releases.
TEST CASE: Install in a Xen guest and watch it fail as described below, or not. You'll need to use the boot parameter 'apt-setup/proposed=true' to test the fix.
Regression potential: A limited number of people are still using GRUB Legacy anyway. I'd be pretty surprised if this broke anything other than Xen, which was already broken in this situation anyway.

Original report:

Binary package hint: debian-installer

Forwarded from a kind source outside; this was found and documented (for their customers) by a Xen-based hosting company:

Ubuntu 10.04 LTS does not install out-of-the-box with default settings on (virtual) machine requiring pvgrub and it is necessary to manually adjust the 'groot=' setting in order to get the machine to boot. Viz;

"Ubuntu 10.04 LTS is now on the install menu (well, it has been for some
time), however the bootloader install which works seamlessly on debian
fails under Ubuntu, the following is what you need during the install to
make it a bootable system:

=========
Ubuntu by default with guided partitioning uses ext4,
which pvgrub won't understand, so don't choose "Guided -
use entire disk", but choose "Guided - use entire disk
and set up LVM", as this will make an ext2 /boot partition.

Ubuntu will give a grub error when installing, you need to
use the following workaround during the installation:
When you get the grub error, choose continue, continue, execute a shell,
continue
chroot /target
update-grub -y
sed -i.orig 's:^# groot=.*:# groot=(hd0,0):' /boot/grub/menu.lst
update-grub
exit
exit
Continue without bootloader
=========

Some further information received:

<..> sladen: the more root cause is grub installer not populating device.map
<..> sladen: it doesn't seem to get bios devices for xvda devices

Paul Sladen (sladen) on 2011-02-17
description: updated
Colin Watson (cjwatson) wrote :

I'm investigating this and trying to determine whether a fix in grub2 is sufficient or whether it needs a fix in grub-installer as well. I expect that the grub2 part of this is bug 623609, so I may end up marking this bug as a duplicate of that after further investigation.

affects: debian-installer (Ubuntu) → grub-installer (Ubuntu)
Changed in grub-installer (Ubuntu):
importance: Undecided → High
status: New → Triaged
Changed in grub2 (Ubuntu):
status: New → Triaged
importance: Undecided → High
Colin Watson (cjwatson) on 2011-09-23
affects: grub2 (Ubuntu) → grub (Ubuntu)
Colin Watson (cjwatson) wrote :

After cherry-picking the relevant patch from Debian (unrelated to the above comment - sorry, of course this is grub not grub2), I now get:

# grub-install --no-floppy /dev/xvda
You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!

Probing devices to guess BIOS drives. This may take a long time.
expr: non-numeric argument
expr: non-numeric argument
Searching for GRUB installation directory ... found: /boot/grub
The file /boot/grub/stage1 not read correctly.

I think the groot bit would better be fixed in update-grub. It already has a case statement for whether to convert devices to UUIDs for use as GRUB drives.

Colin Watson (cjwatson) wrote :

Ah, this is because Ubuntu doesn't yet have the patch that uses grub-probe to convert device names to GRUB drive names, so that function needs to be patched as well. Iterating again ...

Colin Watson (cjwatson) wrote :

I have managed to make this work without any grub-installer changes.

Changed in grub-installer (Ubuntu):
importance: High → Undecided
status: Triaged → Invalid
Colin Watson (cjwatson) on 2011-09-23
Changed in grub (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
Changed in grub (Ubuntu Lucid):
status: New → Triaged
Changed in grub (Ubuntu Maverick):
status: New → Triaged
Changed in grub (Ubuntu Natty):
status: New → Triaged
Changed in grub-installer (Ubuntu Lucid):
status: New → Invalid
Changed in grub-installer (Ubuntu Maverick):
status: New → Invalid
Changed in grub-installer (Ubuntu Natty):
status: New → Invalid
Changed in grub (Ubuntu Lucid):
importance: Undecided → High
Changed in grub (Ubuntu Maverick):
importance: Undecided → High
Changed in grub (Ubuntu Natty):
importance: Undecided → High
Changed in grub (Ubuntu Lucid):
assignee: nobody → Colin Watson (cjwatson)
Changed in grub (Ubuntu Maverick):
assignee: nobody → Colin Watson (cjwatson)
Changed in grub (Ubuntu Natty):
assignee: nobody → Colin Watson (cjwatson)
Changed in grub (Ubuntu Lucid):
milestone: none → ubuntu-10.04.4
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub - 0.97-29ubuntu63

---------------
grub (0.97-29ubuntu63) oneiric; urgency=low

  * Handle comparisons involving two-digit kernel versions (LP: #809401).
  * Backport from Debian 0.97-39 (LP: #720558):
    - Support for Xen style xvd[a-z] devices. Thanks Ian Campbell.
      (Closes: #456776)
  * Don't use UUIDs for expressing xvd* devices as GRUB drives, as PV-GRUB
    can't handle it.
 -- Colin Watson <email address hidden> Fri, 23 Sep 2011 21:53:48 +0100

Changed in grub (Ubuntu):
status: Triaged → Fix Released
Colin Watson (cjwatson) on 2011-09-23
description: updated
Colin Watson (cjwatson) on 2011-09-23
Changed in grub (Ubuntu Lucid):
status: Triaged → In Progress
Changed in grub (Ubuntu Maverick):
status: Triaged → In Progress
Changed in grub (Ubuntu Natty):
status: Triaged → In Progress

Hello Paul, or anyone else affected,

Accepted grub into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in grub (Ubuntu Natty):
status: In Progress → Fix Committed
tags: added: verification-needed
Martin Pitt (pitti) wrote :

Hello Paul, or anyone else affected,

Accepted grub into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in grub (Ubuntu Maverick):
status: In Progress → Fix Committed
Changed in grub (Ubuntu Lucid):
status: In Progress → Fix Committed
Martin Pitt (pitti) wrote :

Hello Paul, or anyone else affected,

Accepted grub into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Colin Watson (cjwatson) wrote :

I can confirm that a Xen installation of Lucid with apt-setup/proposed=true now works flawlessly.

Colin Watson (cjwatson) wrote :

A non-Xen installation of Lucid with grub-installer/grub2_instead_of_grub_legacy=false apt-setup/proposed=true (I applied both of those to the Xen test as well, just forgot to mention the first one) still works fine.

Martin Pitt (pitti) wrote :

Thanks for testing! Marking lucid as verified.

tags: added: verification-done verification-done-lucid
Colin Watson (cjwatson) wrote :

I've done the same pair of tests with Natty, and both now pass.

tags: added: verification-done-natty
Colin Watson (cjwatson) wrote :

Maverick works fine in the non-Xen case, but in Xen I get this on reboot:

  Booting 'Ubuntu 10.10, kernel 2.6.35-30-generic'

kernel /boot/vmlinuz-2.6.35-30-generic root=UUID=29dbda9e-3124-4b7c-b8ee-c7e9e
9ce6694 ro quiet splash

Error 21: Selected disk does not exist

Press any key to continue...

I'll need to investigate further. I noticed a slight oddity during partitioning which may be relevant.

tags: added: verification-failed-maverick
Colin Watson (cjwatson) wrote :

For some reason, with Maverick, the block devices are called sd* rather than xvd*. This means GRUB has no good way to tell that they're Xen block devices and act differently. I think we'll need to fix this.

Colin Watson (cjwatson) wrote :

This failure appears to be due to bug 684875.

Colin Watson (cjwatson) wrote :

I've uploaded a workaround. I can test again once this has been reviewed.

Changed in grub (Ubuntu Maverick):
status: Fix Committed → In Progress
Martin Pitt (pitti) wrote :

Thanks Colin. I accepted the new grub into maverick-proposed.

Changed in grub (Ubuntu Maverick):
status: In Progress → Fix Committed
tags: removed: verification-failed-maverick
Colin Watson (cjwatson) wrote :

I've run the same pair of Xen and non-Xen tests against this new grub package in Maverick, and both now pass. Phew.

tags: removed: verification-done-lucid verification-done-natty verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub - 0.97-29ubuntu60.10.04.1

---------------
grub (0.97-29ubuntu60.10.04.1) lucid-proposed; urgency=low

  * Backport from Debian 0.97-39 (LP: #720558):
    - Support for Xen style xvd[a-z] devices. Thanks Ian Campbell.
      (Closes: #456776)
  * Don't use UUIDs for expressing xvd* devices as GRUB drives, as PV-GRUB
    can't handle it.
 -- Colin Watson <email address hidden> Fri, 23 Sep 2011 21:58:06 +0100

Changed in grub (Ubuntu Lucid):
status: Fix Committed → Fix Released

Hey!

Bedankt voor je mail! Ik ben er even tussenuit geknepen naar een lekker warm land! Ik beantwoord je mail na mijn vakantie (11 oktober).

Groetjes!

Ruben

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub - 0.97-29ubuntu61.1

---------------
grub (0.97-29ubuntu61.1) natty-proposed; urgency=low

  * Backport from Debian 0.97-39 (LP: #720558):
    - Support for Xen style xvd[a-z] devices. Thanks Ian Campbell.
      (Closes: #456776)
  * Don't use UUIDs for expressing xvd* devices as GRUB drives, as PV-GRUB
    can't handle it.
 -- Colin Watson <email address hidden> Fri, 23 Sep 2011 22:41:35 +0100

Changed in grub (Ubuntu Natty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub - 0.97-29ubuntu60.10.10.2

---------------
grub (0.97-29ubuntu60.10.10.2) maverick-proposed; urgency=low

  * Work around LP #684875: detect /dev/sd* devices with major number 202,
    which are really /dev/xvd* devices in disguise, and don't use UUIDs for
    expressing them as GRUB drives either (LP: #720558).
 -- Colin Watson <email address hidden> Wed, 28 Sep 2011 00:58:01 +0100

Changed in grub (Ubuntu Maverick):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers