GRUB reports error after successful installation (Alternate)

Bug #851704 reported by Jochen Gruse
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
Fix Released
High
Colin Watson
Oneiric
Fix Released
High
Colin Watson
grub2 (Ubuntu)
Invalid
High
Unassigned
Oneiric
Invalid
High
Unassigned

Bug Description

I'm using Kubuntu Oneiric Daily amd64 alternate iso for installation, date of 15. Sep.

Partitioning setup is complex:

/dev/sda1 -> /boot for Kubuntu 11.04
/dev/sda2 -> /boot for (to be installed) Kubuntu 11.10
/dev/sda3 -> Extended partition
/dev/sda5 -> Crypto partition (LUKS)

/dev/mapper/sda5_crypt -> LVM PV, only PV in VG system

/dev/mapper/system-root1 -> / for Kubuntu 11.04
/dev/mapper/system-root2 -> / for (to be installed) Kubuntu 11.10
/dev/mapper/system-swap -> Swap partition for any Linux
/dev/mapper/system-home -> /home for any Linux

Crypt partition and LVM are already set up by Kubuntu 11.04. During installation of Kubuntu 11.10, the crypt-partition in /dev/sda5 gets activated and every partition gets listed. Installation works until GRUB installation.

The installer identifies Kubuntu 11.04 as already installed and suggests to install GRUB into the MBR. Following that suggestion, the installer runs "grub-install /dev/sda", then "update-grub". Then the installer shows a red error screen, indicating that some process during GRUB installation ended with exit code 1. Retrying leads to the same result. Choosing "Continue without boot loader installation" from the main menu concludes the installation.

After reboot, GRUB reports as version "1.99-12ubuntu3" (from Kubuntu 11.10) and offers to boot Kubuntu 11.10 (Linux 3.0.0-11-generic) as well as Kubuntu 11.04 (Linux 2.6.38-11-generic).

So from my point of view, GRUB installs correctly and reports a false negative. Actually, this error is older and occurred in Natty (Maverick?) too, but I didn't bother to report it as I had to use some workarounds (cryptsetup, lvchange, ...) from a console to activate the existiting partitions without data loss. With bug 420080 now resolved, this should be fixed too.

Revision history for this message
Jochen Gruse (lpnet) wrote :
Revision history for this message
Jochen Gruse (lpnet) wrote :
Revision history for this message
Jochen Gruse (lpnet) wrote :
tags: added: rls-mgr-o-tracking
Revision history for this message
Jochen Gruse (lpnet) wrote :

Please note: As you'll see from the logs, I tested this with a VirtualBox image, but the bug is occurs on actual hardware too. I have two T410 thinkpads with this configuration, both got a parallel installation (Natty beside already existing Maverick) by using cryptsetup and lvchange by hand before the partition manager started. In both cases the bootloader installation "failed" but worked after reboot.

Steve Langasek (vorlon)
Changed in debian-installer (Ubuntu):
importance: Undecided → High
Changed in debian-installer (Ubuntu Oneiric):
milestone: none → ubuntu-11.10
assignee: nobody → Ubuntu Installer Team (ubuntu-installer)
Revision history for this message
Colin Watson (cjwatson) wrote :

Relevant messages:

Sep 16 07:40:01 main-menu[325]: (process:19689): /proc/devices: fopen failed: No such file or directory
Sep 16 07:40:01 main-menu[325]: (process:19689): /proc/devices: fopen failed: No such file or directory
Sep 16 07:40:01 main-menu[325]: (process:19689): /proc/devices: fopen failed: No such file or directory
Sep 16 07:40:01 main-menu[325]: (process:19689): grub-probe: error:
Sep 16 07:40:01 main-menu[325]: (process:19689): cannot find a GRUB drive for /dev/mapper/system-root1. Check your device.map

Changed in debian-installer (Ubuntu Oneiric):
assignee: Ubuntu Installer Team (ubuntu-installer) → Colin Watson (cjwatson)
status: New → Triaged
affects: debian-installer (Ubuntu Oneiric) → grub-installer (Ubuntu Oneiric)
Changed in grub-installer (Ubuntu Oneiric):
milestone: ubuntu-11.10 → none
summary: - GRUB reports error after successfull installation (Alternate)
+ GRUB reports error after successful installation (Alternate)
Changed in grub-installer (Ubuntu Oneiric):
milestone: none → ubuntu-11.10
Colin Watson (cjwatson)
Changed in grub-installer (Ubuntu Oneiric):
status: Triaged → Fix Committed
Revision history for this message
Colin Watson (cjwatson) wrote :
Download full text (3.2 KiB)

grub-installer (1.68ubuntu1) oneiric; urgency=low

  * Resynchronise with Debian (preseeding change in 1.68 fixes LP: #857548).
    Remaining changes:
    - Show the grub menu and raise the menu timeout if other operating
      systems are installed (only for GRUB Legacy right now).
    - Remove splash boot parameter unless debian-installer/framebuffer=true
      and debian-installer/splash=true.
    - If / or /boot are on a removable device, install GRUB there by
      default.
    - Only mount /target/proc if it isn't already mounted.
    - Support setting OVERRIDE_UNSUPPORTED_OS in the environment to force
      grub-installer to use its default MBR selection method despite there
      being unsupported operating systems on the disk.
    - Support grub-installer/bootdev_directory preseeding to make use of the
      relative path feature of grub4dos, so that we can point grub4dos at
      part of a disk for Wubi. Setting this disables normal grub
      installation, but still generates a device.map (for GRUB Legacy only);
      it also hides the menu.
    - Handle cases where /boot is bind-mounted.
    - Add support for writing an GRUB Legacy MBR on each disk in an
      mdadm-managed RAID providing /boot. (GRUB 2 can handle this already.)
    - Properly make use of output from os-prober to configure the booting of
      other operating systems on dmraid arrays. Attempt to guess where in
      the device map the array belongs, by substituting the first drive in
      the dmraid array for the dmraid array device node itself, and removing
      any reference to other member disks of the array.
    - Go back to using update-grub -y for GRUB Legacy for now; our grub
      package is a bit old and still requires this.
    - Default to grub2 for GPT systems.
    - Allow grub/grub2 choice for ext4, though still default to grub2.
    - If /boot is on an MD device and we're using GRUB 2, install GRUB there
      rather than (hd0); GRUB 2 will interpret that as meaning that it needs
      to install to each of the RAID members.
    - If using GRUB 2 and installing to a RAID device any of whose
      components are partitions, then default to installing to the MBRs of
      each of the containing disks, since GRUB 2 will refuse to install to
      the partition devices.
    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
    - Add a preseedable grub-installer/timeout template to adjust the
      initial GRUB timeout.
    - Install GRUB to the SATA RAID or multipath device when /boot is on
      such a device, rather than installing to the first hard disk.
    - Remove grub-gfxpayload-lists in situations where we need to remove
      grub-pc.
    - Remove 'quiet' from target system command line if
      debian-installer/quiet is set to false.
    - When /boot is on a loopback device (i.e. Wubi), install GRUB there.
  * Simplify /proc and /sys mounting; make sure they're consistently mounted
    for the entire life of grub-installer, and consistently unmounted on
    exit (LP: #851704).

 -- Colin Watson <cjwats...

Read more...

Changed in grub-installer (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Jochen Gruse (lpnet) wrote :

I'm afraid I can't report any success. I'm using Kubuntu Oneiric amd64 alternate daily ISO, timestamp "27-Sep-2011 05:23". The error is (at least from my point of view) exactly the same: GRUB installs, updates, then error message from the installer. If I continue the installation "without boot loader", Kubuntu reboots after finishing up the installation and GRUB works OK. I'll append the new logs in a moment.

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

It's a different error now:

Sep 27 12:46:15 main-menu[317]: (process:25786): grub-probe: error:
Sep 27 12:46:15 main-menu[317]: (process:25786): no such disk

I'll have another look.

Changed in grub2 (Ubuntu Oneiric):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Colin Watson (cjwatson)
milestone: none → ubuntu-11.10
Revision history for this message
Colin Watson (cjwatson) wrote :

This is happening inside grub2_write_linux. I suspect that this is a grub-installer bug (firstly, grub2_write_linux should be fixed to handle crypto devices more gracefully, and secondly, there's no point calling that if os-prober is installed since we don't use its output anyway), but I'll have another look in daylight.

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

This time I've actually tested it; the fix I've uploaded (waiting for review) now works smoothly in a setup matching yours. Thanks for the detailed report.

Changed in grub2 (Ubuntu Oneiric):
assignee: Colin Watson (cjwatson) → nobody
milestone: ubuntu-11.10 → none
status: Confirmed → Invalid
Changed in grub-installer (Ubuntu Oneiric):
status: Fix Released → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub-installer - 1.68ubuntu3

---------------
grub-installer (1.68ubuntu3) oneiric; urgency=low

  * Only process the output of os-prober into boot menu entries if we're
    actually going to use them; if we're using GRUB 2 and os-prober is
    installed, then it will deal with this itself and do a better job of it
    (LP: #851704).
 -- Colin Watson <email address hidden> Thu, 29 Sep 2011 09:00:21 +0100

Changed in grub-installer (Ubuntu Oneiric):
status: Triaged → Fix Released
Revision history for this message
Jochen Gruse (lpnet) wrote :

Thanks, that's great news! When the fix is reviewed and included, I'll test the installer again in VirtualBox and then - if successful - on actual hardware. Of course I'll report my results here.

Revision history for this message
Jochen Gruse (lpnet) wrote :

Sigh. I know this is a "little" late, but for what it's worth: This bug is definitely fixed. My two T410 and the virtual machine install GRUB2 without any errors. Thanks a lot, Colin! Should you ever visit the west of Germany (Aachen), send me a mail and I'll thank you with a dinner & beer!

Jochen

Revision history for this message
echo6 (echo6-uk) wrote :

I'm experiencing the same issue, trying to install with crypto device :-(

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.