def install_bootloader(self): pinfo("Setting up bootloader") try: subprocess.call(["sync"]) subprocess.call( [ "/opt/openwide/vmc-grub-ubuntu1604/sbin/grub2-bios-setup", "-d", self.new_root + "/boot/grub", "-b", "i386-pc/boot.img", "-c", "i386-pc/core.img", "-f", self.disk_loop_dev, ] ) subprocess.call(["chmod", "644", self.new_root + "/boot/grub/grub.cfg"]) subprocess.call( [ "sed", "-i", "s/OWO_ROOTFSUUID/" + fs_uuid(self.partition["root"]) + "/g", self.new_root + "/boot/grub/grub.cfg", ] ) subprocess.call(["chmod", "444", self.new_root + "/boot/grub/grub.cfg"]) except: pass
def install_bootloader(self): pinfo("Setting up bootloader") try: subprocess.call(["sync"]) subprocess.call(["/opt/openwide/vmc-grub-debian6/sbin/grub2-setup", "-d", self.new_root + "/boot/grub", "-r", "(%s,msdos3)" % self.disk_loop_dev, self.disk_loop_dev]) subprocess.call(["chmod", "644", self.new_root + "/boot/grub/grub.cfg"]) subprocess.call(["sed", "-i", "s/OWO_ROOTFSUUID/" + fs_uuid(self.partition['root']) + "/g", self.new_root + "/boot/grub/grub.cfg"]) subprocess.call(["chmod", "444", self.new_root + "/boot/grub/grub.cfg"]) except: pass