Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3954  / 2 Years ago, thu, february 24, 2022, 11:07:07

It has been suggested to me that the use of a chroot might solve my problem of building an application that must run on an embedded device. I have inferred from this description that it is somehow similar to creating the embedded environment locally on my machine which I can then use to develop on from my desktop development machine. Is this the right way to look at the functionality or have I totally misunderstood?



In order to get some idea of how it works I read this https://wiki.ubuntu.com/DebootstrapChroot which I will attempt to make a chroot for an old Ubuntu version on my machine. However, as I am a total linux novice, I am a bit concerned that as I do not entirely know what I am doing is there anyway that I could end up with an unusable system?? Is this something that a novice should even attempt???


More From » chroot

 Answers
1

chroot has nothing to do with dual booting. The idea behind chroot is the ability to switch one program, or one shell, etc., to a new root directory, allowing you to have multiple "systems" at the same time. "systems" is in quotes because there is still only one Linux kernel running. This other "system" is an additional set of the code tools, home directories, etc. So, if you are on an x86 machine, and are trying to build some software for ARM on your machine, you could create a chrooted environment whose /proc tells the software that it's on ARM, an ARM GCC toolchain, etc. (There are many programs that do that). The other thing chroot can do is some very limited sandboxing, that combined with something like SELinux and basic Linux permissions, could create a relatively secure sandbox, in which this application thinks it's on a different system. Another use of chroot would be testing. If you have an application that does different things based on some system directory, you can create a chroot to test it in.


[#36902] Saturday, February 26, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
shionnky

Total Points: 276
Total Questions: 104
Total Answers: 108

Location: Montenegro
Member since Thu, Jun 16, 2022
2 Years ago
shionnky questions
;