Clone wiki

Mageia-chroot / mageia-chroot.tarball


This script make a tarball (tar.gz) with Mageia for using in chroot.

How it work

  • Script make dir for chroot (if not created);
  • install mageia to this dir;
  • install minimal set of packages to mageia: basesystem-minimal, urpmi and rpm-build
  • make a tarball and then clear chroot's dir


  • chroot's dir cannot be /
  • chroot's dir cannot in first level of / (/bin, /etc, /dev, /usr, ...)
  • chroot's dir cannot be in first level of /usr (/usr/share, /usr/bin/, /usr/lib, ...)

Wrong: /

Wrong: /var

Ok: /mnt/chroot

Ok: /etc/chroot


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




  • -h = show help

  • -p PATH = path where will be created (if not exist) chroot's dir [Default: /mnt/chroot]

  • -r RELEASE = set Mageia release: 1 - 4, cauldron [ needed if you what to use default mirror by geoip, see below ]

  • -a ARCH = set Mageia arch: i586 or x86_64 [ needed if you what to use default mirror by geoip, see below ]

  • -m MACROS = path to rpmmacros file which will be included to chroot's system

  • -o OUTPUT = path to dir where will be created tar.gz archive with mageia installation for chroot [ Default: $PWD ]

  • -h = show help message


./mageia-chroot.tarball -d

Will install system to /mnt/chroot and get packages from

./mageia-chroot.tarball -p /mnt/mageia -d

Will install system to /mnt/mageia.

If you want to use default mirror based on yours geo ip, you not need to use -d. Just set arch and release number for system in chroot:

./mageia-chroot.tarball -r 4 -a i586

./mageia-chroot.tarball -d -m /home/user/.rpmmacros -o /tmp

Will install system to /mnt/chroot; get packages from; add to chroot macros /home/user/.rpmmacros and place output tarball to /tmp.