[Bug 1027951] Re: grub-probe fails with "no such disk" when using /dev/mapper/vg0-rootlv, but now with /dev/dm-2 (which should be the same)

Daniel Hahler launchpad at thequod.de
Mon Jul 23 15:23:20 UTC 2012


** Attachment added: "media-info"
   https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1027951/+attachment/3232992/+files/media-info

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1027951

Title:
  grub-probe fails with "no such disk" when using
  /dev/mapper/vg0-rootlv, but now with /dev/dm-2 (which should be the
  same)

Status in “grub2” package in Ubuntu:
  New

Bug description:
  /dev/mapper/vg0-rootlv is a symlink to /dev/dm-2 ("../dm-2").

  When running "grub-probe -d /dev/mapper/vg0-rootlv" it results in this
  error:

      grub-probe: error: no such disk.

  "grub-probe -d /dev/dm-2" outputs "ext2" (it is a ext4 partition).

  I am attaching the strace and ltrace of these calls.

  From the ltrace output it can be seen that using /dev/dm-2 goes into
  calling strcmp and compares "/dev/dm-2" with itself in the end:

      25675 strncmp("sd", "dm-2", 2)                               = 15
      25675 strcmp("/dev/sda", "/dev/dm-2")                        = 15
      25675 strcmp("/dev/sdb", "/dev/dm-2")                        = 15
      25675 __xstat64(1, "/dev/dm-2", 0x7fffe3a77100)              = 0
      25675 malloc(4096)                                           = 0x00ca5f70
      25675 realpath(0x7fffe3a77e3f, 0xca5f70, 0x7fdb1e322720, 22881, 3) = 0xca5f70
      25675 strncmp("sd", "dm-2", 2)                               = 15
      25675 strcmp("/dev/sda", "/dev/dm-2")                        = 15
      25675 strcmp("/dev/sdb", "/dev/dm-2")                        = 15
      25675 strlen("/dev/dm-2")                                    = 9
      25675 malloc(10)                                             = 0x00ca4cd0
      25675 malloc(4096)                                           = 0x00ca6f80
      25675 realpath(0x7fffe3a77e3f, 0xca6f80, 0x7fdb1e322720, 18769, 3) = 0xca6f80
      25675 strncmp("sd", "dm-2", 2)                               = 15
      25675 vasprintf(0x7fffe3a77008, 0x43dec1, 0x7fffe3a76ff0, 0x43cc39, 3) = 9
      25675 malloc(16)                                             = 0x00ca4b60
      25675 malloc(64)                                             = 0x00ca4b80
      25675 malloc(10)                                             = 0x00ca4bd0
      25675 dcgettext(0, 0x439b92, 5, 10, 2)                       = 0x439b92
      25675 dcgettext(0, 0x43a154, 5, 0, 109)                      = 0x43a154
      25675 dcgettext(0, 0x43a51e, 5, 9, 0)                        = 0x43a51e
      25675 strcmp("hd0", "/dev/dm-2")                             = 57
      25675 strcmp("hd1", "/dev/dm-2")                             = 57
      25675 strcmp("/dev/dm-2", "/dev/dm-2")                       = 0

  While when using /dev/mapper/vg0-rootlv it looks different after the
  first line "strncmp(sd, dm-2").

  This issue prevents me from installing Ubuntu on a MacBook Pro (9,2),
  where grub-probe gets used with grub-install.

  The partition table looks as follows, where sda3 should become the
  boot partition and sda4 is a cryptsetup LUKS container (containing a
  LVM):

    Model: ATA APPLE SSD SM256E (scsi)
    Disk /dev/sda: 251GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt

    Number  Start   End    Size   File system  Name                  Flags
     1      20.5kB  210MB  210MB  fat32        EFI system partition  boot
     2      210MB   100GB  100GB  hfs+         Macintosh HD
     3      100GB   101GB  650MB  ext3         /boot                 boot
     4      101GB   251GB  150GB

  I have tried using the latest Grub from Debian (1.99-22.1, without
  success).

  (NOTE: this bug is reported via Apport from another Precise system)

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: grub-pc 1.99-21ubuntu3.1
  ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
  Uname: Linux 3.2.0-27-generic x86_64
  ApportVersion: 2.0.1-0ubuntu11
  Architecture: amd64
  Date: Mon Jul 23 15:21:34 2012
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
  SourcePackage: grub2
  UpgradeStatus: No upgrade log present (probably fresh install)

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




More information about the foundations-bugs mailing list