ubiquity and grub-install: fails to install grub on software RAID

Bug #880766 reported by Andrew Cranwell
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Installing from a Mythbuntu amd64 CD booted in UEFI mode. Manually created partitions using gdisk, created RAID1 using mdadm. Ran Ubiquity installer to create /dev/md0p1 as ext4, install proceeded until aborting at the end saying that grub-efi could not be installed.

Manual attempts to install grub also failed (both from the CD and chroot), so the problem package may actually be grub2.

Linux ubuntu 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: ubiquity 2.8.7
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
CasperVersion: 1.287
Date: Mon Oct 24 20:26:43 2011
LiveMediaBuild: Mythbuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcEnviron:
 LANGUAGE=en_AU.UTF-8
 PATH=(custom, no user)
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Andrew Cranwell (andrew-cranwell) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : Traceback

Exception during installation:
Oct 24 20:26:36 ubuntu plugininstall.py: Traceback (most recent call last):
Oct 24 20:26:36 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 1641, in <module>
Oct 24 20:26:36 ubuntu plugininstall.py: install.run()
Oct 24 20:26:36 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 55, in wrapper
Oct 24 20:26:36 ubuntu plugininstall.py: func(self)
Oct 24 20:26:36 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 199, in run
Oct 24 20:26:36 ubuntu plugininstall.py: self.configure_bootloader()
Oct 24 20:26:36 ubuntu plugininstall.py: File "/usr/share/ubiquity/plugininstall.py", line 942, in configure_bootloader
Oct 24 20:26:36 ubuntu plugininstall.py: "GrubInstaller failed with code %d" % ret)
Oct 24 20:26:36 ubuntu plugininstall.py: InstallStepError: GrubInstaller failed with code 1
Oct 24 20:26:36 ubuntu plugininstall.py:

tags: added: installer-crash
Revision history for this message
Brian Murray (brian-murray) wrote : Re: Ubiquity fails with EFI and software RAID

Oct 24 20:24:03 ubuntu ubiquity: Creating config file /etc/default/grub with new version
Oct 24 20:24:04 ubuntu ubiquity: /usr/sbin/grub-probe: error: no such disk.
Oct 24 20:24:04 ubuntu ubiquity: Auto-detection of a filesystem of /dev/md0p1 failed.
Oct 24 20:24:04 ubuntu ubiquity: Try with --recheck.
Oct 24 20:24:04 ubuntu ubiquity: If the problem persists please report this together with the output of "/usr/sbin/grub-probe --device-map="/boot/grub/device.map" --target=fs -v /boot/grub" to <email address hidden>
Oct 24 20:24:05 ubuntu ubiquity: dpkg: error processing grub-efi-amd64 (--configure):
Oct 24 20:24:05 ubuntu ubiquity: subprocess installed post-installation script returned error exit status 1

affects: ubiquity (Ubuntu) → grub-installer (Ubuntu)
tags: added: raid
Revision history for this message
Andrew Cranwell (andrew-cranwell) wrote :

I tried chrooting into the system and running grub-install then grub-probe from there; the final lines were

/usr/sbin/grub-probe: info: opening md0,1.
/usr/sbin/grub-probe: error: no such disk.

Then I build grub from source (bzr revision 3473 from lp:grub) and ran grub-probe, this time getting

/usr/sbin/grub-probe: info: opening mduuid/77de814b368e97ab4029c9d92332ed91,1.
ext2

So it looks like something has been fixed in grub that hasn't been packaged yet.

Revision history for this message
Andrew Cranwell (andrew-cranwell) wrote :

Sorry, just looked through the logs that I kept and realised I didn't run grub-mkdevicemap before grub-probe; I'll try again tonight and post back on this.

Does grub-installer run this check (grub-mkdevicemap) before attempting grub-install?

Revision history for this message
Andrew Cranwell (andrew-cranwell) wrote :

Attached is the log of grub-probe from grub_1.99-12ubuntu5.

Revision history for this message
Andrew Cranwell (andrew-cranwell) wrote :

Attached is the output of grub-probe built from revision 3473 of lp:grub.

summary: - Ubiquity fails with EFI and software RAID
+ ubiquity and grub-install: fails to install grub on software RAID
Revision history for this message
Andrew Cranwell (andrew-cranwell) wrote :

Updating bug description - I'm having the same problem in a VirtualBox environment (disks partitioned as GPT, no EFI).

I was able to use ubuntu-11.10-server-amd64 to install a system with mdadm RAID1 (GPT partitioning, 1MB "BIOS GRUB" partition, ~20GB RAID) and have the system boot successfully, but trying to install ubuntu-11.10-desktop-amd64 with the same partitoning failed.

chrooting in and running grub-install again gave 'grub-probe: error: no such disk' as above.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in grub-installer (Ubuntu):
status: New → Confirmed
Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrew Cranwell (andrew-cranwell) wrote :

Finally found the solution, which leaves me with a question.

Having successfully installed an 11.10 server with RAID, I tried again on 11.10 desktop: this time, after getting the message that GRUB had not installed, I chrooted into /target/, did 'sudo-apt-get install mdadm', then 'sudo grub-install /dev/sda'. No errors.

So the Ubuntu graphical installer (Ubiquity? or whatever underlying package is responsible) is not installing mdadm into the target installation, and consequently GRUB can't be installed.

Which package should this bug be filed against?

Revision history for this message
Georges Giralt (georges-giralt) wrote :
Download full text (7.0 KiB)

Hello !
The problem actually is that the mdadm program is NOT installed on the new system.
I opened a shell and did :
[code]root@ubuntu:~# chroot /target
root@ubuntu:/# grub-install /dev/sda
Installing for i386-pc platform.
grub-install: error: disk `md0' not found.
root@ubuntu:/# ls /dev/md*
/dev/md0 /dev/md1
root@ubuntu:/# mount
/dev/mapper/vg0-lv1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/md0 on /boot type ext4 (rw,relatime,stripe=4,data=ordered)
/dev/mapper/vg0-lvhome on /home type ext4 (rw,relatime,data=ordered)
/dev/mapper/vg0-lv5 on /opt type ext4 (rw,relatime,data=ordered)
/dev/mapper/vg0-lv2 on /usr type ext4 (rw,relatime,data=ordered)
/dev/mapper/vg0-lv3 on /var type ext4 (rw,relatime,data=ordered)
/dev/sr0 on /cdrom type iso9660 (ro,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=3916776k,nr_inodes=979194,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=785676k,mode=755)
root@ubuntu:/# ls /boot
abi-3.19.0-25-generic memtest86+.elf
abi-3.19.0-30-generic memtest86+_multiboot.bin
config-3.19.0-25-generic System.map-3.19.0-25-genericinitrd.img-3.19.0-25-generic vmlinuz-3.19.0-25-generic.efi.signed
initrd.img-3.19.0-30-generic vmlinuz-3.19.0-30-generic
lost+found vmlinuz-3.19.0-30-generic.efi.signed
memtest86+.bin
root@ubuntu:/# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdc2[0] sdb2[2] sda2[1]
      312359700 blocks [3/3] [UUU]

md0 : active raid1 sda1[0] sdc1[2] sdb1[1]
      208704 blocks [3/3] [UUU]

unused devices: <none>
root@ubuntu:/# grub-install --force /dev/sda
Installing for i386-pc platform.
grub-install: error: disk `md0' not found.
root@ubuntu:/# mdadm --help
The program 'mdadm' is currently not installed. You can install it by typing:
apt-get install mdadm
root@ubuntu:/# apt-get install mdadm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  postfix
Suggested packages:
  procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin
  dovecot-common postfix-cdb postfix-doc
Recommended packages:
  default-mta mail-transport-agent
The following NEW packages will be installed:
  mdadm postfix
0 upgraded, 2 newly installed, 0 to remove and 116 not upgraded.
Need to get 0 B/1,445 kB of archives.
After this operation, 4,799 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)
Selecting previously unselected package mdadm.
(Reading database ... 203167 files and directories currently installed.)
Preparing to unpack .../mdadm_3.2.5-5ubuntu4.2_amd64.deb ...
Unpacking mdadm (3.2.5-5ubuntu4.2) ...
Selecting previously unselected package postfix.
Preparing to unpack .../postfix_2.11.0-1ubuntu1_amd64.deb ...
Unpacking postfix (2.11.0-1ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for doc-base (0.10.5) ...
Processing 32 change...

Read more...

Revision history for this message
MarcRandolph (mrand) wrote :

Confirmed still reproducible with 16.04 LTS

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Phillip Susi (psusi)
affects: grub → grub (Ubuntu)
Changed in grub (Ubuntu):
status: New → Confirmed
Phillip Susi (psusi)
no longer affects: grub (Ubuntu)
no longer affects: grub2 (Ubuntu)
affects: grub-installer (Ubuntu) → ubiquity (Ubuntu)
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.