grub-install already resolved passed install device to grub device. So do the same as grub-setup and strip parenthesis if we get legacy (hdX). --- ChangeLog | 4 ++-- util/grub-install.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog index b93db5e..161c568 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2013-11-29 Andrey Borzenkov <arvidj...@gmail.com> - Revert commit 69ca97c820, it cause failures in using OS device name - in grub-install. + Revert commit 69ca97c820, it caused failures when using OS device name + in grub-install. Instead just strip off parenthesis in grub-install if (hdX) was passed. 2013-12-06 Vladimir Serbinenko <phco...@gmail.com> diff --git a/util/grub-install.c b/util/grub-install.c index 7a1db42..831c550 100644 --- a/util/grub-install.c +++ b/util/grub-install.c @@ -1098,7 +1098,11 @@ main (int argc, char *argv[]) { if (install_device[0] == '(' && install_device[grub_strlen (install_device) - 1] == ')') - install_drive = xstrdup (install_device); + { + install_device[grub_strlen (install_device) - 1] = '\0'; + install_drive = xstrdup (install_device + 1); + install_device[grub_strlen (install_device) - 1] = ')'; + } else { grub_util_pull_device (install_device); -- 1.8.1.4 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel