You are not logged in.
Pages: 1
I have an embedded linux device that i would like to install certain programs on. These programs have dependencies that conflict with the base system, therefore I cannot use a package management system or build from source. So my question,
Is is possible to chroot an application, so that the application looks at the physical / partition except for certain directories. In my case /usr/bin or /usr/local/bin.
What i would like to do is get several programs running on different versions of /usr/bin or /usr/local/bin.
Am I understanding chroot correctly? Is there an alternative?
any help is greatly appreciated.
Offline
I don't know if it's possible to do that with chroot, but I don't think it would be a good idea... If these programs conflict with the base system it's for a good reason. But I must stay I don't see where the problem is. What exactly does conflict with what?
V=RI sweet V=RI
Offline
You could do something like this:
mkdir /newplace/{root,usrbin,usrlocalbin}
mount -o bind / /newplace/root
mount -o bind /newplace/usrbin /newplace/root/usr/bin
mount -o bind /newplace/usrlocalbin /newplace/root/usr/local/bin
chroot /newplace/root /bin/bash
Then you'll be chrooted into a live copy of your filesystem, with an empty /usr/bin and /usr/local/bin layered on top. To leave, do:
exit
umount /newplace/root{/usr/local/bin,/usr/bin,/}
Offline
@Ber: it is a Debian based system, in which certain versions of libraries cannot be updated because it breaks the device itself. (eg. libc6). And these programs im trying to install on it require a higher version that is currently supported.
@Profjim: that looks exactly like what im trying to achieve, I wonder, can I symlink everything from /usr/bin to /opt/[appname]/usrbin apart from those individual libraries that need to be updated.
Of course the next step is trying to figure out how i can compile these libraries in those directories. If i do a "make" and then copy the binary file across, should that work?
Thanks guys.
Offline
Pages: 1