Wiki
Clone wikiMageia-chroot / mageia-chroot.install
About
This script install Mageia to chroot.
How it work
Script make dir for chroot (if doesn't exist) and install to to it via urpmi packages "basesystem-minimal", "urpmi" and additional packages (if entered by user).
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
- all keys (like -t, -d, ...) must be at the beginning of command's args (just after "./mrc-chroot.rpmbuild") before src.rpms
Wrong: ./mageia-chroot.install lynx -d http://packages.mageialinux.ru/mageia4/i586/
Ok: ./mageia-chroot.install -d http://packages.mageialinux.ru/mageia4/i586/ lynx
Usage
./mageia-chroot.install -key1 VALUE1 -key2 VALUE2 ... -k[n] VALUE[n] additional_pkg[1] additional_pkg[2] ... additional_pkg[n]
Keys
-
-d DISTRIB = url to repostiory. Like a http://ftp.belnet.be/mageia/distrib/4/i586
-
-p PATH = path to 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 ]
-
-h = show help
Example
./mageia-chroot.install -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. List of installed packages will be: basesystem-minimal, urpmi.
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.install -r 4 -a i586
If you need to install some additional packages add them to command's end
./mageia-chroot.install -d http://ftp.belnet.be/mageia/distrib/4/i586 lynx git
List of installed packages will be: basesystem-minimal, urpmi, lynx and git (of course, dependencies for lynx and git will be installed too).
Updated