From: Mihai Moldovan Date: Mon, 8 Mar 2021 05:30:50 +0000 (+0100) Subject: 9990-misc-helpers.sh: allow fs type override in fromiso feature. X-Git-Tag: debian/1%20210208+grml.1~2^2 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;h=9829d8a93e0e602829c09065ad7e776a9f905e23;hp=9829d8a93e0e602829c09065ad7e776a9f905e23;p=live-boot-grml.git 9990-misc-helpers.sh: allow fs type override in fromiso feature. The overriding feature can be turned on/used by prefixing the file system type to the path, separated from the device node with a colon. Example (good override): ext4:/dev/vda49/path/to/grml.iso If the file system specification contains any non-alphanumerical characters other than '-' or '_', it will be treated as part of the actual path, since, at least currently, all known file systems match this rule. Example (no override): cra$$$yf§:/dev/sr0/another_path/to/grml.iso In the former example, no file system type override is detected, which means that the code will eventually search for a device called 'cra$$$yf§:/dev/sr0' (which, granted, doesn't make a lot of sense). Sometimes it's necessary or at least handy to specify the file system used for mounting the fromiso backing device directly. For instance, putting the ISO file on a RAID1-backed device will fail to mount it through autodetection (which, really, in most cases is a good thing to not corrupt the array). This change also mounts the backing device read-only, which should enable safe usage and mounting even on RAID1 devices. Note, though, that read-only mounts are not really very much "read-only", since they actually sometimes still change on-disk file system metadata, like the last time the device was mounted). This said, it should be safe enough and users can easily re-sync the array to ensure consistency later on. ---