diff --git a/pym/install/install.py b/pym/install/install.py index 7c0242f..5381246 100644 --- a/pym/install/install.py +++ b/pym/install/install.py @@ -241,7 +241,7 @@ class Install: "--target=x86_64-efi", "--efi-directory=%s"% target.getEfiDirectory(), - "-f"] + "--force"] # в случае установки на usb-hdd EFI загрузчик не прописывается # в efivars if self.clVars.Get('os_install_root_type') == 'usb-hdd': @@ -281,8 +281,8 @@ class Install: # если GRUB2 версии 2.00 и выше, обычная установка требует # параметра --target=i386-pc, иначе GRUB2 может попытаться # прописать себя как UEFI - if filter(lambda x:"2.00" in x, - process(cmdGrubInstall,'-v')): + if filter(lambda x:"2." in x, + process(cmdGrubInstall,'--version')): platform = ["--target=i386-pc"] else: platform = [] @@ -291,7 +291,7 @@ class Install: grubProcess = process(cmdGrubInstall, "--boot-directory=%s"%pathJoin(prefixBoot, target.getBootDirectory()), - mbrDisk, "-f", *platform, + mbrDisk, "--force", *platform, stderr=STDOUT,envdict=os.environ) if grubProcess.failed(): raise DistributiveError(_("Failed to install the bootloader")) diff --git a/pym/install/variables/system.py b/pym/install/variables/system.py index bbe5926..08a0006 100644 --- a/pym/install/variables/system.py +++ b/pym/install/variables/system.py @@ -533,8 +533,8 @@ class VariableOsGrub2Path(Variable): return grubInstall # find grub-install and check, that this is grub2-install (ver 1.99) grubInstall = getProgPath('/usr/sbin/grub-install') - if grubInstall and filter(lambda x:"1.99" in x or "2.00" in x, - process(grubInstall,'-v')): + if grubInstall and filter(lambda x:"1.99" in x or "2." in x, + process(grubInstall,'--version')): return grubInstall return ""