Support USB keys with superfloppy format
authorChristian Hofstaedtler <ch@grml.org>
Sat, 23 Jul 2011 20:05:32 +0000 (22:05 +0200)
committerChristian Hofstaedtler <ch@grml.org>
Sat, 23 Jul 2011 20:09:36 +0000 (22:09 +0200)
grml2usb

index 217020d..d63d60a 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -1980,10 +1980,6 @@ def main():
             if int(device[-1:]) > 4 or device[-2:].isdigit():
                 logging.critical("Fatal: installation on partition number >4 not supported. (BIOS won't support it.)")
                 sys.exit(1)
-        elif os.path.exists(device):
-            logging.critical("Fatal: installation on raw device not supported. (BIOS won't support it.)")
-            sys.exit(1)
-
 
     # provide upgrade path
     handle_compat_warning(device)
@@ -1996,7 +1992,11 @@ def main():
         install(iso, device)
 
     # install mbr
-    if not options.skipmbr and not os.path.isdir(device):
+    is_superfloppy = not device[-1:].isdigit()
+    if is_superfloppy:
+        logging.info("Detected superfloppy format - not installing MBR")
+
+    if not options.skipmbr and not os.path.isdir(device) and not is_superfloppy:
         handle_mbr(device)
 
     handle_bootloader(device)