X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb;h=b57d6cc79b03d129191be82adc45ac5bd7f17b38;hp=5f01825e3a9ea6177c028161f223b51b9b5f43d5;hb=2297a3ea92198bdef731142274df74c246b039fd;hpb=fc369c3e6d5b633fcbce134caeefcda78e359d91 diff --git a/grml2usb b/grml2usb index 5f01825..b57d6cc 100755 --- a/grml2usb +++ b/grml2usb @@ -10,22 +10,6 @@ This script installs a grml system (either a running system or ISO[s]) to a USB :license: GPL v2 or any later version :bugreports: http://grml.org/bugs/ -TODO ----- - -* implement missing options (--grub, --kernel, --initrd, --squashfs, --uninstall) -* validate partition schema/layout: is the partition schema ok and the bootable flag set? (--validate?) -* provide --create-partition option? -* implement logic for storing information about copied files -> register every file in a set() -* the last line in bootsplash (boot.msg) should mention all installed grml flavours -* code improvements: - - improve error handling wherever possible :) - - use 'with open("...", "w") as f: ... f.write("...")' - - simplify functions/code as much as possible, especially: - Too many local variables - Too many branches - Too many statements -* graphical version? any volunteers? :) """ from __future__ import with_statement @@ -308,7 +292,6 @@ APPEND initrd=/boot/release/%(grml_flavour)s/initrd.gz apm=power-off boot=live n # memtest LABEL memtest KERNEL /boot/addons/memtest -#APPEND BOOT_IMAGE=memtest # grub LABEL grub @@ -710,7 +693,7 @@ def copy_addons(iso_mount, target): proc = subprocess.Popen(["install", "--mode=664", balderimg, addons + 'balder10.imz']) proc.wait() - # memtest86+ image + # memdisk image memdiskimg = search_file('memdisk', iso_mount) if memdiskimg is None: logging.warn("Warning: memdisk not found - can not install it") @@ -719,6 +702,15 @@ def copy_addons(iso_mount, target): proc = subprocess.Popen(["install", "--mode=664", memdiskimg, addons + 'memdisk']) proc.wait() + # memtest86+ image + memtestimg = search_file('memtest', iso_mount) + if memtestimg is None: + logging.warn("Warning: memtest not found - can not install it") + else: + logging.debug("cp %s %s" % (memtestimg, addons + '/memtest')) + proc = subprocess.Popen(["install", "--mode=664", memtestimg, addons + 'memtest']) + proc.wait() + def copy_bootloader_files(iso_mount, target): """"TODO""" @@ -1006,10 +998,6 @@ def handle_vfat(device): else: sys.exit(1) - # format partition: - if options.fat16: - mkfs_fat16(device) - def handle_compat_warning(device): """TODO"""