X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=cb841c53365e538e16cf0a4612016511964c99ea;hp=e32495426199f5abc5f9e7b07ea41c34fa77e429;hb=6274d137cc2f0849aea747b9a12d9096aa9765cb;hpb=7a6e10df1c335b447ed9e60e2cc1226a42b5f5c8 diff --git a/grml2usb b/grml2usb index e324954..cb841c5 100755 --- a/grml2usb +++ b/grml2usb @@ -493,7 +493,8 @@ def install_grub(device): 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() @@ -1291,7 +1292,7 @@ def initial_syslinux_config(target): 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+") @@ -1736,6 +1737,9 @@ def check_options(opts): if opts.grubmbr and not opts.grub: raise CriticalException("--grub-mbr requires --grub option.") + if opts.copyonly and opts.grub: + raise CriticalException("Cannot use --copy-only and --grub at the same time.") + def check_programs(): """check if all needed programs are installed"""