From: Michael Prokop Date: Wed, 31 May 2017 09:19:49 +0000 (+0200) Subject: Option --rw-blockdev: set r/w also in GRUB specific steps X-Git-Tag: v0.15.3~2 X-Git-Url: http://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=9cbb2312cb49156f1daa60e1a9f91d0516dc68e3 Option --rw-blockdev: set r/w also in GRUB specific steps Thanks: Ralf Moll --- 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, "")