[Bug 1501015] Re: ISST-LTE: Multipath disk is not automatically set as 1st boot device after installation
bugproxy
bugproxy at us.ibm.com
Wed Sep 30 16:21:02 UTC 2015
------- Comment From mauricfo at br.ibm.com 2015-09-30 16:11 EDT-------
I think the problem is grub_util_devname_to_ofpath() doesn't handle multipath devices (mpathX on installer) -- only hd/sd/sr/vdisk/fd devices.
So, it would handle scsi disks (sd) -- the individual paths --
correctly.
Options:
1) Arbitrate an individual path (/dev/sdX) to do grub-install on -- not all simple (e.g., you choose an offline path? it goes offline during grub-install? -- i.e., don't reinvent the multipath wheel)
2) Add logic for grub-install to handle multipath devices (/dev/mapper/mpathX).
Code:
=====
util/grub-install.c
main()
...
if (platform == GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275)
...
switch (platform)
...
case GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275:
case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275:
case GRUB_INSTALL_PLATFORM_I386_IEEE1275:
{
const char * ofpath = grub_util_devname_to_ofpath (*curdev);
g = xasprintf ("ieee1275/%s", ofpath);
break;
}
...
grub-core/osdep/linux/ofpath.c
grub_util_devname_to_ofpath()
...
if (device[0] == 'h' && device[1] == 'd')
ofpath = of_path_of_ide(name_buf, device, devnode, devicenode);
else if (device[0] == 's'
&& (device[1] == 'd' || device[1] == 'r'))
ofpath = of_path_of_scsi(name_buf, device, devnode, devicenode);
else if (device[0] == 'v' && device[1] == 'd' && device[2] == 'i'
&& device[3] == 's' && device[4] == 'k')
ofpath = of_path_of_vdisk(name_buf, device, devnode, devicenode);
else if (device[0] == 'f' && device[1] == 'd'
&& device[2] == '0' && device[3] == '\0')
/* All the models I've seen have a devalias "floppy".
New models have no floppy at all. */
ofpath = xstrdup ("floppy");
else
{
grub_util_warn (_("unknown device type %s\n"), device);
return NULL;
}
...
** Tags removed: targetmilestone-inin---
** Tags added: targetmilestone-inin1510
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub-installer in Ubuntu.
https://bugs.launchpad.net/bugs/1501015
Title:
ISST-LTE: Multipath disk is not automatically set as 1st boot device
after installation
Status in grub-installer package in Ubuntu:
New
Bug description:
== Comment: #11 - Gary M. Gaydos <gmgaydos at us.ibm.com> - 2015-09-29 14:37:05 ==
Steps to reproduce:
Install 15.10 beta 1 ppc little endian using multipath disks (in this case mpatha)
After the installation is finished no device is set as the first boot device.
The symptom is the same as launchpad bug 1486022 against 14.04.3.
Syslog from 1486022 and this bug are different however. In 1486022 no
mpath devices are found. In this bug mpath2a (the installation
target) has an unknown device type, and the volume group is not found.
Here's a snippet from the syslog
cat syslog |grep -a2 -b2 mpatha2
423185-Sep 28 07:42:34 in-target: grub-common is already the newest version.
423255-Sep 28 07:42:34 in-target: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
423345:Sep 28 07:42:41 grub-installer: info: Identified partition label for /dev/mapper/mpatha2: loop
423440-Sep 28 07:42:44 grub-installer: info: Wiping PReP partition /dev/mapper/mpatha1
423520-Sep 28 07:42:45 in-target: Reading package lists...
--
426988-Sep 28 07:42:51 in-target: Creating config file /etc/default/grub with new version^M
427073-Sep 28 07:42:51 in-target: Installing for powerpc-ieee1275 platform.^M
427144:Sep 28 07:42:55 in-target: grub-install: warning: unknown device type mpatha2^M
427224-Sep 28 07:42:55 in-target: .^M
427255-Sep 28 07:42:56 in-target: Installation finished. No error reported.^M
--
459265-Sep 28 07:45:40 main-menu[843]: (process:73364): File descriptor 5 (/dev/hvc0) leaked on lvdisplay invocation. Parent PID 74098: /bin/sh
459402-Sep 28 07:45:40 main-menu[843]: (process:73364): File descriptor 6 (/dev/hvc0) leaked on lvdisplay invocation. Parent PID 74098: /bin/sh
459539:Sep 28 07:45:40 main-menu[843]: (process:73364): Volume group "mpatha2" not found
459623:Sep 28 07:45:40 main-menu[843]: (process:73364): Cannot process volume group mpatha2
459710-Sep 28 07:45:40 main-menu[843]: (process:73364): umount: can't umount /target/proc /sys: No such file or directory
459825-Sep 28 07:45:40 main-menu[843]: INFO: Menu item 'finish-install' selected
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1501015/+subscriptions
More information about the foundations-bugs
mailing list