Fix check boot record device.

lvmraid
Mike Hiretsky 13 years ago
parent ec86249e99
commit f1a1b077b1

@ -632,10 +632,10 @@ class fillVars(object, glob_attr):
def get_os_install_kernel_attr(self):
"""Kernel attributes"""
# on usb-hdd install must be "delay=5"
attr = ""
if self.Get('os_install_root_type') == 'usb-hdd':
return " scandelay=5"
else:
return ""
attr = " scandelay=5"
def get_os_install_kernel_resume(self):
"""install kernel resume parameter"""

@ -1534,13 +1534,6 @@ class cl_install(color_print, SignalInterrupt):
else:
self.printERROR(_("Cann't found disk '%s'")%mbrDisk)
return False
mbr = self.clVars.Get('os_install_mbr')
tableOnBootDisk = self.varSelect('os_device_table',
where="os_device_dev",eq='mbr')
if not tableOnBootDisk:
self.printERROR(_("Disk '%s' without partition table cann't "
"contains boot record")%mbr)
return False
return True
def createListOptions(self):
@ -2192,6 +2185,17 @@ class cl_install(color_print, SignalInterrupt):
raise InstallError(_("Can not migrate users to new system"))
self.printByResult(True)
def checkCorrectBootRecordDisk(self):
"""Check boot record disk"""
mbr = self.clVars.Get('os_install_mbr')
tableOnBootDisk = self.varSelect('os_device_table',
where="os_device_dev",eq=mbr)
if not tableOnBootDisk:
self.printERROR(_("Disk '%s' without partition table cann't "
"contains boot record")%mbr)
return False
return True
def installSystem(self, force=False, bootDisk=None, stdinReadPwd=False,
builder=False, flagSpinner=True, update=False):
"""install System by current variable enviroment"""
@ -2199,6 +2203,8 @@ class cl_install(color_print, SignalInterrupt):
targetDistr = None
error = None
distrCopy = False
if not self.checkCorrectBootRecordDisk():
return False
try:
rootPartdev = self.clVars.Get('os_install_root_dev')
rootPartCmdList = filter(lambda x: x['dev']==rootPartdev,

Loading…
Cancel
Save