SliTaz GNU/Linux official and community documentation wiki.
.png

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:handbook:chroot [2010/02/20 21:28]
jozee created
en:handbook:chroot [2011/05/03 22:47]
domcox old revision restored
Line 31: Line 31:
 </​code>​ </​code>​
  
-Using the environment+===== Using the environment ​=====
  
 To begin using the chrooted environment,​ you just need to mount some virtual filesystems and use the chroot command. To simplify things, we can write a small script automating the process. Example using the chroot directory ///​home/​slitaz/​chroot-env//​ and creating a script chroot_in_env.sh in ///​home/​slitaz//​. On any systems other than SliTaz you can uncomment the lines about ///dev// and ///tmp// - Note to save typing you can copy and paste: To begin using the chrooted environment,​ you just need to mount some virtual filesystems and use the chroot command. To simplify things, we can write a small script automating the process. Example using the chroot directory ///​home/​slitaz/​chroot-env//​ and creating a script chroot_in_env.sh in ///​home/​slitaz//​. On any systems other than SliTaz you can uncomment the lines about ///dev// and ///tmp// - Note to save typing you can copy and paste:
  
-<​code>​ # cat > /​home/​slitaz/​chroot_in_env.sh << "​EOF" ​+<​code>​ # cat > /​home/​slitaz/​chroot_in_env.sh << "​EOF" ​</​code>​
  
 +<​file>​
 #!/bin/sh #!/bin/sh
 # Chroot in SliTaz to hack. # Chroot in SliTaz to hack.
Line 66: Line 67:
  
 EOF EOF
- +</file>
-</code>+
  
 To finish and test the environment,​ you just make the script executable and run: To finish and test the environment,​ you just make the script executable and run:
Line 76: Line 76:
 </​code>​ </​code>​
  
-To activate the network+=== To activate the network ​===
  
 In order to have the network up to download and install some development packages, just start the DHCP client on the correct interface. Example using eth1: In order to have the network up to download and install some development packages, just start the DHCP client on the correct interface. Example using eth1:
Line 82: Line 82:
  <​code>​ # udhcpc -i eth1 </​code>​  <​code>​ # udhcpc -i eth1 </​code>​
  
-===== Installing packages ​=====+=== Installing packages ===
  
 If the network is functional, just reload the list of packages and use tazpkg get-install to install them. If a connection is not possible, you can download the packages from another system, copy them to the chrooted environment and install them with the tazpkg install command. To install the basic compilation tools: If the network is functional, just reload the list of packages and use tazpkg get-install to install them. If a connection is not possible, you can download the packages from another system, copy them to the chrooted environment and install them with the tazpkg install command. To install the basic compilation tools:
  
- <​code>#​ tazpkg recharge+ <​code>​ # tazpkg recharge
  # tazpkg get-install slitaz-toolchain </​code>​  # tazpkg get-install slitaz-toolchain </​code>​
  
 Once the environment is configured, you can compile applications from source to create packages, test scripts, etc. The Cookbook should help you out here: Once the environment is configured, you can compile applications from source to create packages, test scripts, etc. The Cookbook should help you out here:
  
-===== Exit the environment ​=====+=== Exit the environment ===
  
 To exit the chrooted environment,​ just type exit, the //​chroot_in_env.sh//​ script will then end by unmounting the virtual filesystems from the Linux Kernel: To exit the chrooted environment,​ just type exit, the //​chroot_in_env.sh//​ script will then end by unmounting the virtual filesystems from the Linux Kernel:
 
en/handbook/chroot.txt · Last modified: 2011/05/03 22:47 by domcox