Wiki

Clone wiki

Mageia-chroot / mageia-chroot.run

About

This script run chroot.

How it work

  • Script extract mageia files to chroot's dir from tarball (tar.gz created with mageia-chroot.tarball);
  • or use already exists dir with Mageia installation;
  • copy /etc/resolv.conf, mount /dev and /proc to chroot;
  • run chroot.

Usage

./mageia-chroot.run -key1 VALUE1 -key2 VALUE2 ... -k[n] VALUE[n]

Keys

  • -t TARBALL = path to tar.gz archive with installed system files for chroot

  • -p PATH = path to dir with installed system

  • -e SCRIPT = path to script (execute script and exit chroot)

Example

Extract files from tarball and exec chroot

./mageia-chroot.run -t Mageia4_i586.tar.gz

Exec chroot at dir

./mageia-chroot.run -p /mnt/chroot

Exec only script in chroot (after script execution chroot will be exited)

./mageia-chroot.run -p /mnt/chroot -e /home/user/super_script.sh

Updated