en :: ru

RAD GNU/Linux project home is under development. Thank you for your patience.

site root/ faq/ system build/

I had downloaded the scripts. What's next? (index)

shadow
shadow  

You have these packages to be installed in your system:

apt
bash
curl
mkisofs
rpm
sudo
tar
termutils

Then adjust your ./aptbox/etc/apt/sources.list. For example:

rpm [alt] ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus i586 classic

rpm     ftp://ftp.radlinux.org/public/distributions/common   i586 main
rpm     ftp://ftp.radlinux.org/public/distributions/radlinux i586 main

rpm     ftp://ftp.radlinux.org/public/distributions/common   noarch main
rpm     ftp://ftp.radlinux.org/public/distributions/radlinux noarch main

After all, you have to run make; it will ask you for sudo password and then, before mkisofs, you'll have to enter new root passwod for your system.

If you want to build system images with different configs, software sets and hotfixes, you can use these dirs and files:

hotfixes/default — hotfixes for all images
hotfixes/bala    — hotfixes for image "bala" (will be applied after default hotfixes)
profiles/config/bala — config for image "bala"
profiles/install/bala — package list for image "bala"
profiles/post/bala — script to run after packages and hotfixes installation in a chroot

Having config and package list and hostfixes, you can build your own image with "make profile=bala". If there is no package list "bala", a default one will be used. If there are hotfixes for "bala", they will be applied after default. If there is no config for "bala", build will fall.

You can use "make clean" to cleanup build tree (for re-distribution etc.)

default config and root password

If you want to make an image with your own default config, create the one in "profiles/config/" directory with name you choosed for your profile, e.g. "profiles/config/gateway". To use this config, you have to choose a profile, e.g. "make profile=gateway" (note: if there is no config for this profile, a default one will be used).

Default root password can be changed with a post-install script. Such script has to be created in "profiles/post" directory and must be named as the profile you choosed.

#!/bin/sh
# Example of a post-install script, "profiles/post/gateway"
# it will be used in "make profile=gateway"
#
# Note, that this script is to be executed in a chroot, so,
# there will be no bash. Use /bin/sh instead and do not forget
# to chmod 755 profiles/post/gateway

# change default root password
passwd root

# end of script

package lists and hotfixes

If you want to install your own package set into rootfs, you have to create custom package list. In our example it will be named "profiles/install/gateway" (note: if there is no package list for current profile, a default one will be used). This file can contain complete package list as well as only key packages. Usually, you don't have to include in this list all libraries and other support packages: apt will install all dependencies automatically. To choose exact package version, use "name=version" format.

Hotfixes are files that you don't want to place in a packages. For instance: if you want to change "/etc/issue" in the system, create file "hotfixes/gateway/etc/issue" and use "make profile=gateway" (note: default hotfixes, "hotifxes/default", will be applied anyway before custom hotfixes; this is done to allow sharing of common hotfixes between profiles). In the build process "/etc/issue" (usually installed from "setup" package) will overwritten by your file.

Another way to "hot fix" a system rootfs is to use patches. Assume you want to do the same with "/etc/issue", but with patch:

  1. create hotfix directory: mkdir hotfixes/gateway
  2. change working dir to it: cd hotfixes/gateway
  3. copy default file from "install" tree (run plain make before): cp -a ../../install/etc etc
  4. save a default copy of etc: cp -a etc etc.default
  5. make changes: vi etc/issue
  6. create patch: diff -Nurp etc.default etc >etc.patch
  7. cleanup: rm -rf etc etc.default

After this you will have a patch file: "hotfixes/gateway/etc.patch". This patch will be applied automatically during system build ("make profile=gateway")