#50 mksquashfs - no way to preserve leading directories

open
nobody
None
5
2013-02-09
2013-02-09
Guan Xin
No

Suppose I want to make a squashfs of my "lib/modules/" and "lib/firmware/" directories, but not all the mess under "lib/", this seems impossible.
If I run "mksquashfs lib/modules lib/firmware squashfs.img" then the resulting filesystem does not contain the "lib/" directory.
I know this is expected. But is there a way to preserve the "lib/" dir in this case other than playing some mount --bind tricks and so on?

Discussion