Re: Need help on #539948 & #522993
Chris Lamb <lamby@debian.org> writes:
> John Goerzen wrote:
>> Hugs is breaking if run under a chroot, but not otherwise. Any ideas
>> where to go with this?
>
> I've seen similar things with other VMs and chroots (in particular, the
> Sun JVM and Mono) as well as other chroot-like path mungers like union
> filesystems.
>
> IIRC they both use{,d} the /proc/self symlink to orient themselves in
> some way, but it was dangling at (for example) /chroot/proc/self or
> /filesystem.squashfs/proc/self.
I found this when trying to install sun-java6 (bleh) into a chroot. The
solution was to create symlinks such that the chroot's dir pointed back
to /. For example (from memory) supposing a chroot of /var/tmp/c:
chroot /var/tmp/c mkdir -p /var/tmp
chroot /var/tmp/c ln -s / /var/tmp/c
mount -t proc none /var/tmp/c/proc
chroot /var/tmp/c file -h /proc/self/exe
--> /proc/self/exe: symbolic link to `/var/tmp/c/usr/bin/file'
chroot /var/tmp/c file -L /proc/self/exe
--> /proc/self/exe: ELF 32-bit LSB executable [...]
HTH, etc.
Reply to: