Chroot: Difference between revisions

From 太極
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Intro =
= Intro =


* [https://linuxtldr.com/atoms-tool/ Atoms is a GUI Tool for Chroot Management on Linux]
* https://help.ubuntu.com/community/BasicChroot
* https://help.ubuntu.com/community/BasicChroot
* https://help.ubuntu.com/community/DebootstrapChroot
* https://help.ubuntu.com/community/DebootstrapChroot
Line 39: Line 40:
* [https://www.stgraber.org/2012/02/03/ever-wanted-an-armel-or-armhf-container-on-an-x86-machine-its-now-possible-with-lxc-in-ubuntu-precise/ Create an armhf container on your x86 machine?]
* [https://www.stgraber.org/2012/02/03/ever-wanted-an-armel-or-armhf-container-on-an-x86-machine-its-now-possible-with-lxc-in-ubuntu-precise/ Create an armhf container on your x86 machine?]
* [https://www.linuxuprising.com/2021/02/archbox-makes-it-easy-to-install.html Archbox Makes It Easy To Install Software From Arch Linux On Other Linux Distributions (Using A Chroot Environment)]
* [https://www.linuxuprising.com/2021/02/archbox-makes-it-easy-to-install.html Archbox Makes It Easy To Install Software From Arch Linux On Other Linux Distributions (Using A Chroot Environment)]
* [https://www.makeuseof.com/chroot-in-linux/ What Is chroot in Linux and How Does It Work?] 5/15/2023
= Jetson =
See [[Jetson#Ubuntu_20.04/22.04/24.04|Jetson nano]].


= vmlinux =
= vmlinux =

Latest revision as of 22:36, 15 December 2024

Intro

Note that we have to change the conf file a little bit. The 'location' word needs to be changed to 'directory'. Also at the last step when we are ready to test a 32-bit GUI app, we need to issue DISPLAY in a separate line; such as

export DISPLAY=:0.0
su brb # brb is my root user in the host system that can invoke the schroot program
       # firefox does not allow to use root to start it
firefox

For a recap:

1. Install the packages
sudo apt-get install debootstrap schroot -y
2. Create a schroot configuration file
sudo nano /etc/schroot/chroot.d/precise_i386.conf
3. Install 32-bit ubuntu with debootstrap
sudo mkdir -p /srv/chroot/precise_i386
sudo debootstrap --variant=buildd --arch=i386 precise /srv/chroot/precise_i386 http://archive.ubuntu.com/ubuntu/
4. Test the chroot environment
schroot -l
schroot -c precise_i386 -u root
uname -a
cat /etc/issue
5. Additional configuration
apt-get install ubuntu-minimal
# That's all.

The article also mentioned the home directories (Documents, Downloads, ...) of the users within the chroot are shared with the host. How to access them from the host?

Jetson

See Jetson nano.

vmlinux