grub upgrade fails with lvm on top of dmraid

Bug #1318568 reported by itsnotvalid
72
This bug affects 15 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I tried reinstalling grub-pc and it reports that there is a problem with GRUB drive:

grub-probe: error: cannot find a GRUB drive for /dev/mapper/[redacted]. Check your device.map.

For this I could reinstall the system using the installer, however that won't let the bug to be fixed.

Further, after some web search I tried update-grub, grub-probe, grub-mkconfig etc. but with no luck. No matter which /dev/mapper device for this hardware RAID 1 setup on LVM or the physical drives there is no way out of this.

Also to note, that there is no files found for /boot/grub/device.map. So there is nothing I could have checked as well.

Thanks.

Extra information:
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: grub-pc 2.02~beta2-9
ProcVersionSignature: Ubuntu 3.8.0-39.57~precise1-generic 3.8.13.20
Uname: Linux 3.8.0-39-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
Date: Mon May 12 16:12:08 2014
DuplicateSignature: package:grub-pc:2.02~beta2-9:ErrorMessage: subprocess installed post-installation script returned error exit status 1
ErrorMessage: ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2014-01-30 (101 days ago)
InstallationMedia: Ubuntu-Server 12.04.3 LTS "Precise Pangolin" - Release amd64 (20130820.2)
ProcCmdLine: BOOT_IMAGE=/vmlinuz-3.8.0-39-generic root=/dev/mapper/hostname--vg-root ro
SourcePackage: grub2
Title: package grub-pc 2.02~beta2-9 failed to install/upgrade: ErrorMessage: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: Upgraded to trusty on 2014-05-12 (0 days ago)

Revision history for this message
itsnotvalid (itsnotvalid) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Phillip Susi (psusi) wrote :

It may be worth noting that you actually have a fake raid, not a real hardware raid. Fake raid is not well supported in linux so unless you have to dual boot with windows, you should avoid it in favor of linux software raid.

tags: added: regression-release
summary: - grub2 failes in --configure step while doing a do-dist-upgrade from
- 12.04 lts to 14.04 lts (with option -d)
+ grub upgrade fails with lvm on top of dmraid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Knickers Brown (metta-crawler) wrote :

Some sample error messages:

$ sudo grub-install /dev/mapper/pdc_bdhbchffcb1
Installing for i386-pc platform.
grub-install: error: disk `lvmid/PxjGc2-Eb10-CsLt-RPxa-s344-09ma-l4R47W/DpicMh-yvL3-zZVu-BmwD-5Cc9-PwRc-tAWnwT' not found.

$ sudo grub-install /dev/mapper/vg0-lv0
Installing for i386-pc platform.
grub-install: error: disk `lvmid/PxjGc2-Eb10-CsLt-RPxa-s344-09ma-l4R47W/DpicMh-yvL3-zZVu-BmwD-5Cc9-PwRc-tAWnwT' not found.

$ sudo grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: disk `lvmid/PxjGc2-Eb10-CsLt-RPxa-s344-09ma-l4R47W/DpicMh-yvL3-zZVu-BmwD-5Cc9-PwRc-tAWnwT' not found.

Revision history for this message
Knickers Brown (metta-crawler) wrote :

@psusi - once you've installed on fake RAID and upgraded successfully a few time, the effort to convert to Linux software RAID is significant. I've side-stepped that for now by rebuilding grub 1.99-21ubuntu3.15 (from 12.04) on Ubuntu 14.04 and putting package holds on the resulting debs. Maybe someday I'll run off lists of installed packages and decide which ones to re-install, figure out what parts of backups need to be restored other than the obvious ones like /home, reinstall from scratch, put all the packages and customizations back and not worry about fake RAID anymore but for now I'll just putter along.

This isn't the first time grub2 lost the ability to be installed on fake RAID. On Maverick it was necessary to back-port the grub from Natty to get working grub-on-fake RAID.

Revision history for this message
Amit Gurdasani (gurdasani) wrote :

Please note that this also affects the relatively new (~2 years old) functionality to create "raid1"/"raid4"/"raid5"/"raid6" type logical volumes that use device mapper on top of Linux md RAID (rather than requiring the use of mdadm to create an md device first).

Revision history for this message
milankowww (milan-pikula) wrote :

Note that this also affects the oficially supported hardware Cisco UCS C220 M3 , http://www.ubuntu.com/certification/hardware/201311-14363/ , where going to md raid is not possible (only boots from the swraid using the swraid bios). Currently can't boot that machine on recent Ubuntu.

Revision history for this message
Antonios Vamporakis (vamporakis) wrote :
Download full text (3.8 KiB)

In my case this interferes with kernel installations. Post-installation tries to update grub but the process fails and any subsequent steps are skipped. The way around this is to remove grub-common, install the new kernel and install grub again. Of course grub does not generate a grub.cfg file. The grub installation fails with the same error.

root@radon:/home/ant# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-headers-generic linux-headers-server linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up linux-image-3.13.0-55-generic (3.13.0-55.94) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-3.13.0-55-generic
) points to /boot/initrd.img-3.13.0-55-generic
 (/boot/initrd.img-3.13.0-55-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-55-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-3.13.0-55-generic
) points to /boot/vmlinuz-3.13.0-55-generic
 (/boot/vmlinuz-3.13.0-55-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-55-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-55-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-55-generic /boot/vmlinuz-3.13.0-55-generic
Generating grub configuration file ...
grub-probe: error: disk `lvmid/uCggES-emwj-Lb0k-yUW2-OpiX-uNdC-buju7p/vA1BlD-je3U-8Bbt-qA8F-mbjo-0wiw-y8dR5S' not found.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-55-generic.postinst line 1025.
dpkg: error processing package linux-image-3.13.0-55-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-55-generic:
 linux-image-extra-3.13.0-55-generic depends on linux-image-3.13.0-55-generic; however:
  Package linux-image-3.13.0-55-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.13.0-55-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.13.0-55-generic; however:
  Package linux-image-3.13.0-55-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-3.13.0-55-generic; however:
  Package linux-image-...

Read more...

Revision history for this message
Knickers Brown (metta-crawler) wrote :

This Debian wiki page https://wiki.debian.org/DebianInstaller/SataRaid
suggests that in /etc/default/grub
the line:
GRUB_DISABLE_LINUX_UUID=true
must be uncommented.

Has anyone tried that? Thanks.

Revision history for this message
Данило Шеган (danilo) wrote :

I had this problem as well with software raid after recent upgrade to Xenial (and then after another update to Xenial packages to 2.02~beta2-36ubuntu1 — however, at about the same time (at least after the last reboot), I've also added lvm-cache to the root partition, and that seems to have been the actual problem.

Latest Xenial grub cannot boot from lvm-cached system/boot (they are one and the same for me) partitions.

Workaround: disable caching of the system partition. I'll probably move /boot out into separate partition as well, but thought I'd throw this out as well.

Revision history for this message
Данило Шеган (danilo) wrote :

FWIW, I've tried the suggestion from Metta Crawler to set GRUB_DISABLE_LINUX_UUID=true and that didn't help.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.