From: Michael Prokop Date: Tue, 11 Sep 2012 14:09:20 +0000 (+0200) Subject: Exit with better error message if running with toram=... and invoking with /live... X-Git-Tag: v0.13.2~1 X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=commitdiff_plain;h=cf525c6031463d42ed8c7f9b84d83e3b2c36f600 Exit with better error message if running with toram=... and invoking with /live/image If running in RAM mode without all the files in /live/image (happens if using boot option "toram=....squashfs", but NOT when using just "toram"!) then there are several files missing. We could use kernel + initrd from /boot, but files like logo.16 aren't available at all. Inform the user about this situation and possible workarounds. --- diff --git a/grml2usb b/grml2usb index 63c26b3..68565db 100755 --- a/grml2usb +++ b/grml2usb @@ -1108,9 +1108,16 @@ def identify_grml_flavour(mountpath): version_files = search_file('grml-version', mountpath, lst_return=True) if not version_files: - logging.critical("Error: could not find grml-version file.") - cleanup() - sys.exit(1) + if mountpath.startswith("/live/image"): + logging.critical("Error: could not find grml-version file.") + logging.critical("Looks like your system is running from RAM but required files are not available.") + logging.critical("Please either boot without toram=... or use boot option toram instead of toram=...") + cleanup() + sys.exit(1) + else: + logging.critical("Error: could not find grml-version file.") + cleanup() + sys.exit(1) flavours = [] logging.debug("version_files = %s", version_files)