error: Running 'grub-install --no-floppy "/dev/md0"' failed.

Bug #457687 reported by Jamie Strandboge on 2009-10-21
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
High
Colin Watson
Karmic
High
Colin Watson
grub2 (Ubuntu)
High
Colin Watson
Karmic
High
Colin Watson

Bug Description

Binary package hint: debian-installer

Tried setting up raid1 according to http://testcases.qa.ubuntu.com/Install/ServerRAID1 as seen in http://iso.qa.ubuntu.com/qatracker/result/3238/286 and grub failed to install:

Oct 21 21:47:40 grub-installer: info: Installing grub on '/dev/md0'
Oct 21 21:47:40 grub-installer: info: grub-install supports --no-floppy
Oct 21 21:47:40 grub-installer: info: Running chroot /target grub-install --no-floppy "/dev/md0"
Oct 21 21:47:42 grub-installer: grub-setup: error: Unknown device number: 251, 1
Oct 21 21:47:42 grub-installer: error: Running 'grub-install --no-floppy "/dev/md0"' failed.

Attached are the saved logs.

Jamie Strandboge (jdstrand) wrote :
Jamie Strandboge (jdstrand) wrote :
Jamie Strandboge (jdstrand) wrote :
Jamie Strandboge (jdstrand) wrote :

The /dev/md0 device is major 9 and the /dev/vda device is major 251.

Jamie Strandboge (jdstrand) wrote :

I also set the bootable flag for each of the /dev/vd*1 partitions that made up /dev/md0, and I set raid to boot in degraded mode.

Jamie Strandboge (jdstrand) wrote :

I was able to reproduce using the following:
Manual
select vda - create empty - free space -create two partitions 1.8G, 345.5M, both primary/raid, /dev/vda1 has bootable flag
select vdb - create empty - free space -create two partitions 1.8G, 345.5M, both primary/raid, /dev/vdb1 has bootable flag

press 'Finish partitioning and write change to disk' accidentally

Configure raid: write change to the storage devices (both vda and vdb are listed)
Create MD Device (Raid 1, num active: 2, num spare 0, active devices are /dev/vda1 and /dev/vdb1)
Create MD Device (Raid 1, num active: 2, num spare 0, active devices are /dev/vda2 and /dev/vdb2)
Finish

set /dev/md0 as / and ext4 (everything else are defaults)
set /dev/md1 as swap

do you want to boot your system if your raid becomes degraded? yes
write changes to disk: yes

ubuntu (name)
ubuntu (username)
ubuntu (password)
ubuntu (use weak, yes)
encrypt home (no)
proxy (none)
no automatic updates
no extra packages

Jamie Strandboge (jdstrand) wrote :

virsh dumpxml test-iso-1 output

Jamie Strandboge (jdstrand) wrote :

This is the command line I used to create the VM (using virt-install):
$ ps auxww|grep kvm|grep test-iso-1
jamie 31361 0.0 0.3 74328 15248 pts/8 S 09:51 0:00 /usr/bin/python -tt /usr/bin/virt-install --connect=qemu:///system --name=test-iso-1 --ram=384 --vcpus=2 --disk path=/home/jamie/vms/kvm/test-iso-1/disk1.img,size=2.00 --disk path=/home/jamie/vms/kvm/test-iso-1/disk2.img,size=2.00 --accelerate --hvm --cdrom=./karmic-server-amd64.iso --os-type=linux --os-variant=ubuntuKarmic --vnc --network=network:default
root 31371 33.3 10.2 572896 407852 ? Sl 09:51 15:45 /usr/bin/kvm -S -M pc-0.11 -m 384 -smp 2 -name test-iso-1 -uuid 58d8f49f-287c-a6c5-59f3-6323076f6a2e -monitor unix:/var/run/libvirt/qemu/test-iso-1.monitor,server,nowait -no-reboot -boot d -drive file=/home/jamie/vms/isos/karmic/karmic-server-amd64.iso,if=ide,media=cdrom,index=2 -drive file=/home/jamie/vms/kvm/test-iso-1/disk1.img,if=virtio,index=0 -drive file=/home/jamie/vms/kvm/test-iso-1/disk2.img,if=virtio,index=1 -net nic,macaddr=54:52:00:75:e0:47,vlan=0,model=virtio,name=virtio.0 -net tap,fd=19,vlan=0,name=tap.0 -serial pty -parallel none -usb -vnc 127.0.0.1:2 -k en-us -vga cirrus

Jamie Strandboge (jdstrand) wrote :

This disk files:
$ ls -1
disk1.img
disk2.img
$ file ./*
./disk1.img: x86 boot sector; partition 1: ID=0xfd, active, starthead 1, startsector 63, 3518172 sectors; partition 2: ID=0xfd, starthead 0, startsector 3518235, 674730 sectors, code offset 0xb8
./disk2.img: x86 boot sector; partition 1: ID=0xfd, active, starthead 1, startsector 63, 3518172 sectors; partition 2: ID=0xfd, starthead 0, startsector 3518235, 674730 sectors, code offset 0xb8

Jamie Strandboge (jdstrand) wrote :

There are no relevant messages in the host dmesg or libvirt logs.

Jamie Strandboge (jdstrand) wrote :

Here are the logs for my second attempt, along with screenshots along the way.

Jamie Strandboge (jdstrand) wrote :

Marking confirmed since I was able to reproduce.

Changed in debian-installer (Ubuntu):
status: New → Confirmed
Colin Watson (cjwatson) on 2009-10-23
affects: debian-installer (Ubuntu) → grub2 (Ubuntu)
Colin Watson (cjwatson) on 2009-10-23
Changed in grub2 (Ubuntu Karmic):
milestone: none → ubuntu-9.10
importance: Undecided → Medium
status: Confirmed → Triaged
importance: Medium → High
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson) wrote :

I have a fix for the grub2 part of this, but then grub-installer falls over because it tries to install to /dev/md0, but that's a RAID of two partitions not two disks in this case, and it doesn't like that at all. I'll need to change both.

Changed in grub-installer (Ubuntu Karmic):
status: New → Triaged
importance: Undecided → High
milestone: none → ubuntu-9.10
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson) on 2009-10-23
Changed in grub2 (Ubuntu Karmic):
status: Triaged → Fix Committed
Changed in grub-installer (Ubuntu Karmic):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 1.97~beta4-1ubuntu3

---------------
grub2 (1.97~beta4-1ubuntu3) karmic; urgency=low

  * Backport from Debian (Felix Zielcke):
    - Add a build dependency on texinfo (LP: #453442).
  * debian/patches/968_raid_virtio.diff: Handle RAID devices containing
    virtio components (LP: #457687).

 -- Colin Watson <email address hidden> Fri, 23 Oct 2009 21:58:13 +0100

Changed in grub2 (Ubuntu Karmic):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub-installer - 1.43ubuntu8

---------------
grub-installer (1.43ubuntu8) karmic; urgency=low

  * 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 (LP: #457687).

 -- Colin Watson <email address hidden> Fri, 23 Oct 2009 22:02:19 +0100

Changed in grub-installer (Ubuntu Karmic):
status: Fix Committed → Fix Released
tags: added: iso-testing
ceg (ceg) wrote :

There is again the same error message in 9.10 when installing grub to md device. -> Bug #462171

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

Duplicates of this bug

Other bug subscribers