[Bug 604335] Re: grub-pc.postinst script fails to detect virtio vda disk in KVM guest

nutznboltz 604335 at bugs.launchpad.net
Mon Jun 13 19:23:00 UTC 2011


TEST CASE:

Environment:

VM with virtio boot disk /dev/vda partition (like /dev/vda1) mounted on
/ possibly also a partition (like /dev/vda1) on mounted on /boot and no
/dev/disk/by-id directory (because of missing udev rules.)

Example Environment:

$ ls /dev/[shv]d*
/dev/vda  /dev/vda1  /dev/vda2
$ ls -ld /dev/disk/by-id
ls: cannot access /dev/disk/by-id: No such file or directory

Run:

sudo dpkg-reconfigure grub-pc

If you get these error messages:

``You chose not to install GRUB to any devices.  If you continue, the
boot loader may not be properly configured, and when your computer next
starts up it will use whatever was previously in the boot sector.  If
there is an earlier version of GRUB 2 in the boot sector, it may be
unable to load modules or handle the current  configuration file.

If you are already running a different boot loader and want to carry on
doing so, or if this is a special environment where you do not need a
boot loader, then you should continue anyway.  Otherwise, you should
install GRUB somewhere.

Continue without installing GRUB?''

Then the bug this ticket (LP: #604335) is about is present.

If you get

$ ls -ld /dev/disk/by-id
drwxr-xr-x 2 root root 120 2011-06-09 16:00 /dev/disk/by-id

Plus when you run "sudo dpkg-reconfigure grub-pc" you see /dev/vda and
/dev/vda1 offered as targets for installing grub2 into and do not get
the above error messages then you do not have the bug.

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/604335

Title:
  grub-pc.postinst script fails to detect virtio vda disk in KVM guest

Status in “grub2” package in Ubuntu:
  Triaged

Bug description:
  A statement explaining the impact of the bug on users and
  justification for backporting the fix to the stable release: Multiple
  people report they cannot install grub2 on virtio disk on Ubuntu 10.04
  LTS

  An explanation of how the bug has been addressed in the development
  branch, including the relevant version numbers of packages modified in
  order to implement the fix.: Fixed (at least) in udev 167-0ubuntu3 in
  Natty 11.04

  A minimal patch applicable to the stable version of the package. If
  preparing a patch is likely to be time-consuming, it may be preferable
  to get a general approval from the SRU team first.: see provided patch

  Detailed instructions how to reproduce the bug. These should allow
  someone who is not familiar with the affected package to reproduce the
  bug and verify that the updated package fixes the problem. Please mark
  this with a line "TEST CASE:": on KVM/qemu with /dev/vda only try
  running "dpkg-reconfigure grub-pc" the scripts in that package will
  fail because /dev/disk/by-id does not exist due to missing udev rules.

  A discussion of the regression potential of the patch and how users
  could get inadvertently affected.: only two additional lines of udev
  rules and only affects /dev/vd* devices.

  Binary package hint: grub-pc

  The grub-pc.postinst script fails to detect virtio "vda" disk in a KVM
  guest because it looks for entries in /dev/disk/by-id/* and there is
  absolutely no /dev/disk/by-id directory at all when the only disk is a
  vda virtio one.

  You can test this either by creating a new KVM VM guest running Ubuntu
  10.04 with only virtio vda disk or by converting an existing hda disk
  VM guest into a vda one and then trying to purge and re-install grub-
  pc.

  If the KVM VM guest running Ubuntu 10.04 is configured to boot from
  LVM this issue is not seen; the failure requires a guest with a bare
  /dev/vda disk.

  Applying the patch (attached) to grub-pc.postinst in the KVM VM guest
  allows you to install (or re-install) grub-pc; without it the grub-pc
  package will not configure.

  Patch is against grub-pc 1.98-1ubuntu6

  ProblemType: Bug
  DistroRelease: Ubuntu 10.04
  Package: grub-pc 1.98-1ubuntu6
  ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
  Uname: Linux 2.6.32-22-generic i686
  NonfreeKernelModules: nvidia
  Architecture: i386
  Date: Sun Jul 11 12:15:58 2010
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: grub2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/604335/+subscriptions



More information about the Ubuntu-sponsors mailing list