[Bug 922673] Re: grub install/update boot device /dev/sdap1
Marcus Tomlinson
marcus.tomlinson at canonical.com
Thu Mar 5 12:57:55 UTC 2020
This release of Ubuntu is no longer receiving maintenance updates. If
this is still an issue on a maintained version of Ubuntu please let us
know.
** Changed in: grub2 (Ubuntu)
Status: New => Incomplete
--
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:
Incomplete
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