Reputation: 33
Lets say I have two squashfs-images, containing parts of a filesystem.
└─> tree one-fs/
one-fs/
└── usr
├── firmware
│ └── onefirmware
└── lib
└── onelib
└─> tree two-fs/
two-fs/
├── twosomething
│ └── somethingtest
└── twotest
I mount the first squashfs-image (one.sqfs) to a folder called one. Then I mount the second squashfs-image (two.sqfs) to a folder called two/usr.
mkdir one
mkdir -p two/usr
mkdir three
sudo mount -t squashfs one.sqfs one
sudo mount -t squashfs two.sqfs two/usr
After doing so, I use overlayfs to merge both folders, like so:
sudo mount -t overlay -o lowerdir=one:two overlay three/
So I dont use the mountpoint two/usr but the folder two as lowerdir. Unfortunately, in the merged folder three, there is no folder usr with the contents of two.sqfs available.
└─> tree three/
three/
└── usr
├── firmware
│ └── onefirmware
└── lib
└── onelib
Can someone enlighten me why it seems, that mounted fs inside of the lower directory are not merged and treated as empty directories? Also swapping one and two in the overlay mount command does not change anything.
Upvotes: 0
Views: 32