grub fails to install on dmraid during upgrade to 12.10

Bug #1072880 reported by Paul Boven
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

During the upgrade from 12.04LTS to 12.10, grub reported the following errors:

run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-30-generic /boot/vmlinuz-3.2.0-30-generic
generating grub.cfg
/usr/sbin/grub-probe: error: cannot find a GRUB driv for /dev/mapper/isw_cbfbcabehj_Volume0p1. Check your device.map.
(repeated 34 more times).

And a big popup:
"GRUB failed to install to the following devices:
/dev/dm-0
Do you want to continue anyway? If you do your computer may not start up properly.
Writing GRUB to boot device failed - continue? "
(I decided to continue, as the system already had a working grub, and there seemed no way out of the situation anyway)

After reboot, the system is stuck in "grub rescue" and is currently unbootable.

When booting from a rescue-USB, I can activate the fakeraid (Intel Matrix raid) with 'dmraid -ay' and can mount the root
partition, but I am unable to put grub on it:
grub-installer fails (cannot find device for /, /boot - grub installer clobbers much of its own output)
/mnt/usr/sbin/grub-install fails (Cannot open /usr/share/grub/grub-mkconfig_lib)
chroot /mnt grub-install fails (Path /boot/grub is not readable by GRUB on boot. Installation is impossible. Aborting)

The system was originally installed, brand new, with 12.04 LTS (no other OS on it). DMraid was configured through the regular installer, I don't recall any grub issues back then.

I'm happy to provide any additional information that's needed, but this might be difficult due to the system not being bootable.

While running a chroot on /mnt (the dmraid-device with my original root filesystem) I get:

lsb_release -rd: Description: Ubuntu 12.10, Release: 12.10

apt-cache policy grub2-common:
Installed: 2.00-7ubuntu11, Candidate: 2.00-7ubuntu11

Recovery CD has kernel 3.2.0-32, target system has 3.5.0-32 on it but does not boot into that.

Expected: a clean upgrade to 12.10 and being able to use the system again.

What happened instead: system is currently unbootable, hangs in "grub rescue", though no dataloss seems to have happened. I cannot even boot into an older kernel.

Revision history for this message
Paul Boven (p-boven) wrote :

Managed to get the system bootable again.
From the rescue CD, I did these steps:
Do NOT assemble any raids. Start a shell on the rescue root file system.
Then:
dmraid -ay
mount /dev/mapper/isw_isw_cbfbcabehj_Volume0p1 /mnt
mount -o bind /mnt/dev /dev
mount -t proc none /mnt/chroot/proc
chroot /mnt /bin/bash
grub-install /dev/dm-0

reboot!

(please note, the above commands were recreated from memory, but the main idea is that grub-install under chroot only works once you have access to /dev from the chroot environment).

Revision history for this message
Phillip Susi (psusi) wrote :

Can you run sudo dpkg-reconfigure grub-pc and verify that /dev/mapper/isw_isw_cbfbcabehj_Volume0 is selected as the location to install to, and that you get no errors?

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Paul Boven (p-boven) wrote : Re: [Bug 1072880] Re: grub fails to install on dmraid during upgrade to 12.10

Hi Philip,

On 10/30/2012 09:22 PM, Phillip Susi wrote:
> Can you run sudo dpkg-reconfigure grub-pc and verify that
> /dev/mapper/isw_isw_cbfbcabehj_Volume0 is selected as the location to
> install to, and that you get no errors?

When I run sudo dpkg-reconfigure grub-pc, I get:

"Configuring grub-pc. The grub-pc package is being ugpraded, this menu
allows you to select which devices (etc.)"

It then provides a list of devices: /dev/sda, /dev/sdb (the hard drives
themselves), /dev/mapper/isw_cbfbcabehj_Volume0 (the raid device for the
full disk) and /dev/dm-1 (the mirrored root partition). None of these is
highlighted. I can select the /dev/mapper/isw_(...)_Volume0, and then
dpkg-reconfigure ends with "Installation finished. No error reported.
Generating grub.cfg..." (and concludes with all the Linux kernel images
it found).

Regards, Paul Boven.

Revision history for this message
Phillip Susi (psusi) wrote :

Then it should be fine now. You probably manually installed grub previously so it was not properly configured to reinstall itself on upgrade.

Changed in grub2 (Ubuntu):
status: Incomplete → Invalid
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.