Error installing grub2 installing natty server

Bug #711830 reported by Ara Pulido on 2011-02-02
This bug affects 4 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)

Bug Description

Binary package hint: debian-installer

During our weekly testing in the certification servers, in one of the servers, the installation failed when installing grub2.

This is reproducible.

Feb 1 13:01:24 debconf: --> SUBST grub-installer/progress/step_install_loader BOOTDEV /dev/sda
Feb 1 13:01:24 debconf: Adding [BOOTDEV] -> [/dev/sda]
Feb 1 13:01:24 debconf: <-- 0
Feb 1 13:01:24 debconf: --> PROGRESS INFO grub-installer/progress/step_install_loader
Feb 1 13:01:24 debconf: <-- 0 OK
Feb 1 13:01:24 grub-installer: info: Installing grub on '/dev/sda'
Feb 1 13:01:24 grub-installer: info: grub-install supports --no-floppy
Feb 1 13:01:24 grub-installer: info: Running chroot /target grub-install --no-floppy --force "/dev/sda"
Feb 1 13:01:27 grub-installer: /usr/sbin/grub-setup: error: unable to identify a filesystem in /dev/sda; safety check can't be performed.
Feb 1 13:01:27 grub-installer: error: Running 'grub-install --no-floppy --force "/dev/sda"' failed.
Feb 1 13:01:27 debconf: --> SUBST grub-installer/grub-install-failed BOOTDEV /dev/sda
Feb 1 13:01:27 debconf: Adding [BOOTDEV] -> [/dev/sda]
Feb 1 13:01:27 debconf: <-- 0
Feb 1 13:01:27 debconf: --> INPUT critical grub-installer/grub-install-failed

Find attached the syslog and partman files. Please, let us know if you need us to rerun any other test.

Ara Pulido (ara) wrote :
Ara Pulido (ara) wrote :
Colin Watson (cjwatson) wrote :

It's a particularly inscrutable error, but what it amounts to is that grub-installer is selecting the wrong target device for GRUB. I suspect that this is specific to the type of setup in certification, but we should figure out how to fix it anyway.

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

The problem here is that /dev/sda is unpartitioned and has no filesystem directly on it either, so grub-setup sensibly refuses to do anything with it. We should add this to the pile of checks for whether the first disk is a reasonable installation target.

The natural implementation would be to use 'grub-probe -t partmap' and 'grub-probe -t fs'. However, this is complicated because 'grub-probe -t partmap' tells you about the partition map containing a partition, but not about the partition map contained in a disk. There's a 'partmap' utility in partman-utils which we're already using in grub-installer, so we can use that instead.

Colin Watson (cjwatson) on 2011-02-09
Changed in grub-installer (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :
Download full text (4.7 KiB)

This bug was fixed in the package grub-installer - 1.60ubuntu1

grub-installer (1.60ubuntu1) natty; urgency=low

  * Resynchronise with Debian. 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
    - 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.
    - Unless grub-installer/make_active is preseeded to false, mark the
      partition to which GRUB is being installed as bootable, or failing
      that the first available primary partition on the disk to which GRUB
      is being installed.
    - 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 (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.
    - Bind-mount /proc and /sys while running grub-install.
    - Update grub-installer/bootdev text to avoid GRUB device naming that
      changed between GRUB Legacy and GRUB 2, and to use libata-style device
      naming since that is more accurate for most people.
    - On i386/efi and amd64/efi subarchitectures, install grub-efi and purge
      grub, grub-legacy, and grub-pc; elsewhere, purge grub-efi*.
    - Don't ask for a boot device on EFI, and don't pass a boot device
      argument to grub-install.
    - Add a preseedable grub-installer/timeout template to adjust the
      initial GRUB timeout.
    - Inst...


Changed in grub-installer (Ubuntu):
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

Bug attachments