> > The directory is created after inserting the stick, but there is only > > one file in there (.created_by_pmount). Following your recipe didn't > > change anything, unfortunately. > > I can't tell if you answered the question or not. Does the directory show > up in the chroot environment? If so, then your problem lies elsewhere, > like maybe a permissions thing.
I have not had time to completely figure it out yet, but you might want to look into "rbind" mounts instead of plain bind mounts. When I set up my chroot I bind mounted /home into the chroot, but then found that when I mounted files from my fileserver (mounted to /home/daniel/Remote), I couldn't see them in the chroot. (ie, "ooffice ~/Remote/foo.odt" fails with "File not Found". ooffice is symlinked to the do_chroot script) Unmounting /chroot/home and remounting it as "-o rbind" did the trick. I attempted to make this permanent with a change in fstab, but it didn't seem to work there - only when I did it manually. When I get time I'll have another look at it and see if I can't make it work. There is some magic to the mounting to make it work. You can apparently do it as a "bind" mount if the original mounpoint is "shared" (but not if it's not). There is some documentation: http://lwn.net/Articles/159092/ . This would also explain why you can mount /media in the chroot, but then not see any submounts. Hope this helps... Daniel. (Apologies to Andrew; you'll get two of these. I keep forgetting to "reply to all" instead of "reply".)

