for opt in ["", "--force"]:
logging.debug("grub-install --recheck %s --no-floppy --root-directory=%s %s",
opt, device_mountpoint, grub_device)
- proc = subprocess.Popen([GRUB_INSTALL, "--recheck", opt, "--no-floppy",
+ proc = subprocess.Popen([GRUB_INSTALL, "--recheck", opt,
+ "--no-floppy", "--target=i386-pc",
"--root-directory=%s" % device_mountpoint, grub_device],
stdout=file(os.devnull, "r+"))
proc.wait()
def add_entry_if_not_present(filename, entry):
"""Write entry into filename if entry is not already in the file
- @filanme: name of the file
+ @filename: name of the file
@entry: data to write to the file
"""
data = open(filename, "a+")