def installBootloader(self): ctx.debugger.log("Bootloader is installing...") loader = yali.bootloader.BootLoader() root_part_req = ctx.partrequests.searchPartTypeAndReqType(parttype.root, partrequest.mountRequestType) _ins_part = root_part_req.partition().getPath() loader.write_grub_conf(_ins_part,ctx.installData.bootLoaderDev) # Check for windows partitions. for d in yali.storage.devices: for p in d.getPartitions(): fs = p.getFSName() if fs in ("ntfs", "fat32"): if is_windows_boot(p.getPath(), fs): win_fs = fs win_dev = basename(p.getDevicePath()) win_root = basename(p.getPath()) loader.grub_conf_append_win(ctx.installData.bootLoaderDev, win_dev, win_root, win_fs) continue # finally install it loader.install_grub(ctx.installData.bootLoaderDev) ctx.debugger.log("Bootloader installed.")
def execute(self): loader = yali.bootloader.BootLoader() rootreq = ctx.partrequests.searchPartTypeAndReqType(parttype.root, request.mountRequestType).next() loader.install_dev = basename(self.device.getPath()) loader.install_root = basename(rootreq.partition().getPath()) # TODO: use logging! loader.write_grub_conf() # Windows partitions... for d in yali.storage.devices: for p in d.getPartitions(): fs = p.getFSName() if fs in ("ntfs", "fat32"): if is_windows_boot(p.getPath(), fs): loader.win_fs = fs loader.win_dev = basename(p.getDevicePath()) loader.win_root = basename(p.getPath()) loader.grub_conf_append_win() continue print self.install_bootloader.isChecked() if self.install_bootloader.isChecked(): loader.install_grub() return True
def execute(self): # show information window... info_window = InformationWindow(self, _("Please wait while installing bootloader!")) loader = yali.bootloader.BootLoader() root_part_req = ctx.partrequests.searchPartTypeAndReqType( parttype.root, request.mountRequestType) loader.install_dev = basename(self.device.getPath()) loader.install_root = basename(root_part_req.partition().getPath()) # TODO: use logging! loader.write_grub_conf() # Windows partitions... for d in yali.storage.devices: for p in d.getPartitions(): fs = p.getFSName() if fs in ("ntfs", "fat32"): if is_windows_boot(p.getPath(), fs): loader.win_fs = fs loader.win_dev = basename(p.getDevicePath()) loader.win_root = basename(p.getPath()) loader.grub_conf_append_win() continue if self.install_bootloader.isChecked(): loader.install_grub() # close window info_window.close(True) return True
def execute(self): if self.noInstall.isChecked(): return True # show information window... info_window = InformationWindow(self, _("Please wait while installing bootloader!")) loader = yali.bootloader.BootLoader() root_part_req = ctx.partrequests.searchPartTypeAndReqType(parttype.root, request.mountRequestType) if self.installPart.isChecked(): install_dev = basename(root_part_req.partition().getPath()) elif self.installMBR.isChecked(): install_dev = basename(self.device.getPath()) else: #install to hd0 install_dev = str(filter(lambda u: u.isalpha(),basename(root_part_req.partition().getPath()))) _ins_part = root_part_req.partition().getPath() ctx.debugger.log("Pardus installed to : %s" % _ins_part) ctx.debugger.log("GRUB will be installed to : %s" % install_dev) loader.write_grub_conf(_ins_part,install_dev) # Windows partitions... for d in yali.storage.devices: for p in d.getPartitions(): fs = p.getFSName() #ctx.debugger.log("install_dev %s" % install_dev) #ctx.debugger.log("win_fs %s" % fs) #ctx.debugger.log("win_dev %s" % basename(p.getDevicePath())) #ctx.debugger.log("win_root %s" % basename(p.getPath())) if fs in ("ntfs", "fat32"): if is_windows_boot(p.getPath(), fs): win_fs = fs win_dev = basename(p.getDevicePath()) win_root = basename(p.getPath()) loader.grub_conf_append_win(install_dev, win_dev, win_root, win_fs) continue # finally install it loader.install_grub(install_dev) # close window info_window.close(True) return True