X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=66c40c38fcc9dda0d0e0c56164f5478f75463868;hp=fcb9e3554e84f78f05322386f73d391f83afe560;hb=d10b71b7c6dda652f3a00ecd9ace6c5710e94543;hpb=5a158f07ef9bed9c19ced83cb95a0bdea5786405 diff --git a/grml2usb b/grml2usb index fcb9e35..66c40c3 100755 --- a/grml2usb +++ b/grml2usb @@ -582,6 +582,7 @@ def install_grub(device): else: grub_device = device + logging.info("Installing grub as bootloader") logging.debug("grub-install --recheck --no-floppy --root-directory=%s %s", device_mountpoint, grub_device) proc = subprocess.Popen(["grub-install", "--recheck", "--no-floppy", @@ -1109,6 +1110,11 @@ def copy_bootloader_files(iso_mount, target): bootsplash = search_file(ffile, iso_mount) exec_rsync(bootsplash, syslinux_target + ffile) + # avoid the "file is read only, overwrite anyway (y/n) ?" question + # of mtools by syslinux ("mmove -D o -D O s:/ldlinux.sys $target_file") + if os.path.isfile(syslinux_target + 'ldlinux.sys'): + os.unlink(syslinux_target + 'ldlinux.sys') + if not search_file('default.cfg', iso_mount + '/boot/isolinux/'): logging.critical("Fatal: file default.cfg could not be found.") logging.critical("Note: this grml2usb version requires an ISO generated by grml-live >=0.9.24 ...") @@ -1365,11 +1371,18 @@ def adjust_syslinux_bootoptions(src_name, dst_name, flavour): src = open(src_name, "r") dst = open(dst_name, "w") + # do NOT write "None" in kernel cmdline + if options.bootoptions is None: + bootopt = "" + else: + bootopt = options.bootoptions + for line in src: line = boot_re.sub(r'/boot/release/%s/\2 ' % flavour, line) line = flavour_re.sub(r'\1 %s-\2' % flavour, line) line = default_re.sub(r'%s-\1' % flavour, line) line = append_re.sub(r'\1 live-media-path=/live/%s/ ' % flavour, line) + line = append_re.sub(r'\1 boot=live %s ' % bootopt, line) dst.write(line) src.close() dst.close()