grub fails to install on dmraid during upgrade to 12.10
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/
generating grub.cfg
/usr/sbin/
(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/
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.
Managed to get the system bootable again. isw_isw_ cbfbcabehj_ Volume0p1 /mnt
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/
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).