Many Linux systems boot to an initrd/initramfs, then mount the real root filesystem, chroot to it, and continue booting. My initrd is still technically mounted, but how can I get to it? If I modify my initrd to bind mount itself into the new root, then I can see it. But is it possible to access it without taking those steps? Is there a particular device file associated with initrds that I could bind mount?
On why I want this...
I have an embedded system where the root file system is an overlay of a tmpfs sitting on top of a squashfs image. I'd like to do work on a system, and then look at the tmpfs to see what file system changes I've made. Under normal operation without me modifying the boot, the mounts for the tmpfs and squashfs layers are hidden/lost once the system switches to the overlay root.
mount
then you should see it listed as something likeoverlay on / type overlay (rw,lowerdir=/media/overlay-ro,upperdir=/media/overlay-rw/overlay,workdir=/media/overlay-rw/_)
. You should be able to access the tmpfs directly via/media/overlay-rw/overlay/
. – lane Jun 15 '17 at 12:45