[Bug 922673] Re: grub install/update boot device /dev/sdap1

Steve Langasek steve.langasek at canonical.com
Sat Jan 28 03:29:22 UTC 2012


Reassigning to grub2, which is the grub implementation used for Ubuntu
10.04 LTS and above.

What exactly is this /dev/sdap1 device you're using?  That's not a
standard device name at all; indeed, that looks like the device name one
would get from running kpartx on /dev/sda.  I'm not convinced this is a
grub bug.

** Package changed: grub (Ubuntu) => grub2 (Ubuntu)

-- 
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/922673

Title:
  grub install/update boot device /dev/sdap1

Status in “grub2” package in Ubuntu:
  New

Bug description:
  My boot disk in /dev/sdap1 in linux, I was unable to update grub. I tracked the
  problem down to grub-probe

  ./grub-probe -v --device /dev/sdap1 --target=fs_uuid
  ./grub-probe: info: »/boot/grub/device.map« kann nicht geöffnet werden.
  ./grub-probe: info: /dev/sdap1 starts from 2048.
  ./grub-probe: info: opening the device /dev/sda.
  ./grub-probe: info: the size of /dev/sda is 289406976.
  ./grub-probe: info: DOS partition 0 starts from 498048.
  ./grub-probe: info: DOS partition 2 starts from 17773312.
  ./grub-probe: info: DOS partition 3 starts from 63.
  ./grub-probe: error: cannot find a GRUB drive for /dev/sdap1.  Check your device.map.

  and this is my solution

  *** /tmp/hostdisk.c	2012-01-27 16:19:31.380013407 +0100
  --- hostdisk.c	2012-01-27 16:54:35.160011194 +0100
  ***************
  *** 1099,1114 ****
          p[6] = '\0';
          return path;
        }
          if ((strncmp ("hd", p, 2) == 0
           || strncmp ("vd", p, 2) == 0
           || strncmp ("sd", p, 2) == 0)
  !       && p[2] >= 'a' && p[2] <= 'z')
        {
          /* /dev/[hsv]d[a-z][0-9]* */
          p[3] = '\0';
          return path;
        }

          /* If this is a Xen virtual block device.  */
          if ((strncmp ("xvd", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z')
        {
  --- 1099,1128 ----
          p[6] = '\0';
          return path;
        }
  +
          if ((strncmp ("hd", p, 2) == 0
           || strncmp ("vd", p, 2) == 0
           || strncmp ("sd", p, 2) == 0)
  !       && p[2] >= 'a' && p[2] <= 'z'
  !       && p[3] >= '0' && p[3] <= '9')
        {
          /* /dev/[hsv]d[a-z][0-9]* */
          p[3] = '\0';
          return path;
        }

  +       if ((strncmp ("hd", p, 2) == 0
  +        || strncmp ("vd", p, 2) == 0
  +        || strncmp ("sd", p, 2) == 0)
  +       && p[2] >= 'a' && p[2] <= 'z'
  +       && p[3] >= 'a' && p[3] <= 'z'
  +       && p[4] >= '0' && p[4] <= '9')
  +     {
  +       /* /dev/[hsv]d[a-z][0-9]* */
  +       p[4] = '\0';
  +       return path;
  +     }
  +
          /* If this is a Xen virtual block device.  */
          if ((strncmp ("xvd", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z')
        {

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




More information about the foundations-bugs mailing list