Exactly! That is why partitions should be unmounted.
I think there is a misunderstanding:
I have posted at beginning that I successfully made a livecd.iso unmounting filesystems, that's clear, nothing to discuss, therefore I was wondering if using --nodir option was or not equivalent to unmounting the filesystem(s).
Theoretically should be, in my view at least.
Later, going deeper into the details, it appears that some big files are not excluded as supposed.
Additionally, if I copy my 5 Gb file under a directory say /test
inside the '/
' filesystem, and then I try the following command:
mylivecd --gzip --nodir ^/test/ /tmp/as.iso
the above command will fail, even if the "--nodir ^/test/" option was used, because it's trying to include the 5 Gb file.
Now, I'have taken a look mylivecd and have discovered that the error is in the trailing slash following the directory name inside the option: "--nodir /vbox/
if instead of the above command, I specify the following, without the trailing slash:
mylivecd --gzip --nodir ^/test /tmp/as.iso
the directory /test and it's content is correctly excluded from the live image.
The reason is that mylivecd perform a test about the option arguments, searching for a directory ( find /dir -type d ):/test
result of type directory
will not result as type directory
Now, why I've used the trainling slash ? because I have a partition name /u
and when I was using:
mylivecd --gzip --nodir ^/u /tmp/as.iso
what happens was that also all files in /usr were been excluded; the program (mylivecd) search for a pattern where the filename begin with /u ...
and yes this is stated in mylivecd help page:
--nodir <ex1>[,][...] Excludes directories from the final image.
Patterns passed to this option (as with the
--nofile option) should be valid in a grep(1)
search, e.g. --nodir=^/home/jaco,^/root/.mcop
will exclude both the /home/jaco and
/root/.mcop directories from the final
because of this help page, mylivecd behave as described in documentation, therefore it's not a bug
I'm going to mark the thread as SOLVED.