X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=e465ebe2528a12fd1a9781b21d07274877289261;hp=624aa42d5341980271bffefc2e6a1ee5920ee9bb;hb=9cbb2312cb49156f1daa60e1a9f91d0516dc68e3;hpb=c7391636f9ef258cabc1370b0508e4c48cef44d5 diff --git a/grml2usb b/grml2usb index 624aa42..e465ebe 100755 --- a/grml2usb +++ b/grml2usb @@ -502,8 +502,6 @@ def install_grub(device): device_mountpoint = tempfile.mkdtemp(prefix="grml2usb") register_tmpfile(device_mountpoint) try: - mount(device, device_mountpoint, "") - # If using --grub-mbr then make sure we install grub in MBR instead of PBR if options.grubmbr: logging.debug("Using option --grub-mbr ...") @@ -511,6 +509,9 @@ def install_grub(device): else: grub_device = device + set_rw(device) + mount(device, device_mountpoint, "") + logging.info("Installing grub as bootloader") for opt in ["", "--force"]: set_rw(device) @@ -1593,6 +1594,8 @@ def install_grml(mountpoint, device): check_for_fat(device) if not options.skipbootflag: check_boot_flag(device) + + set_rw(device) mount(device, device_mountpoint, ['-o', 'utf8,iocharset=iso8859-1']) except CriticalException as error: mount(device, device_mountpoint, "")