Skip to contentSkip to conversation

Problem with overlayfs and switch_root

DISCUSSION Weng Xuetian 1 participant 1 message Dec 10, 2014

lore
Share & tools
lore
#0 lore raw

Hi,
I'm trying to port Chakra's live cd from aufs to overlayfs since overlay fs is now in 3.18. Since I need multiple lowerdir support so I also grab the code from overlayfs-next.

Before switch_root, the mount setup is:
* squashfs is mounted at /ro_branch/root-image, /ro_branch/overlay-pkgs, /ro_branch/overlay
* tmpfs is mounted at /rw_branch
* Overlayfs is mounted at /new_root with option lowerdir=/ro_branch/overlay- pkgs:/ro_branch/overlay:/ro_branch/root- image,upperdir=/rw_branch/uppper,workdir=/rw_branch/work .

Then it will switch_root to /new_root .

Now system boots fine, but with one strange problem, if I execute ls / , it shows that there's nothing under / . But I can access files and directory with full path.

What's the possible problem that can cause this?

Thanks,
Xuetian