Wiki

Clone wiki

Mageia-chroot / mageia-chroot.tarball

About

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

Limits

  • 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

Usage

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

Keys

Required:

Optional:

  • -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

Example

./mageia-chroot.tarball -d http://ftp.belnet.be/mageia/distrib/4/i586

Will install system to /mnt/chroot and get packages from http://ftp.belnet.be/mageia/distrib/4/i586

./mageia-chroot.tarball -p /mnt/mageia -d http://ftp.belnet.be/mageia/distrib/4/i586

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 http://ftp.belnet.be/mageia/distrib/4/i586 -m /home/user/.rpmmacros -o /tmp

Will install system to /mnt/chroot; get packages from http://ftp.belnet.be/mageia/distrib/4/i586; add to chroot macros /home/user/.rpmmacros and place output tarball to /tmp.

Updated