Remastering AryaLinuxIn this article
- Downloading the base tarball for remastering
- Getting the build tools
- Restoring backup, chrooting and installing applications
- Building the ISO
Remastering is the process of building your own Linux system by modifiying some other Linux and you can remaster AryaLinux as well to create your own system. Since applications cannot be uninstalled from AryaLinux, we provide slim backups of AryaLinux on top which customizations can be done and packages installed and remastering can be done.
Downloading the base tarball for remastering
You can download base tarballs from the download section. You can download the following base tarballs:
- Base System: The base system is the most mimimal version of AryaLinux. The base system backup is a backup of AryaLinux root filesystem without X-Server and Desktop Enironment.
- Base System with X-Server: This backup has X-Server on top of the base system. One can use this backup to install any desktop environment on top of the X-Server. Sometimes even the slimmest desktop environments can be heavy for the needs of some users. For building such systems this backup can be used.
- Base system with desktop environment: If you do not want the applications we ship with AryaLinux, then you can use this backup and install the applications of your choice on top of it. This backup just contains the dekstop environment and very few applications.
All the above backups have alps installed so that you can install the application of your choice on it.
Getting the build tools
Once you download the backup tarball, you need to download the build tools. You can clone the build tools repository by running the following command from the terminal. Please run the command as a root user so that you have sufficient permissions to remaster.
sudo su git clone https://bitbucket.org/chandrakantsingh/aryalinux cd aryalinux/base-system
Restoring backup, chrooting and installing applications
You need to have an empty partition of size at least 20GB to restore the backup. Though AryaLinux gets installed in much smaller partitions, the extra space would be used to download and build packages. The partition should be formatted using ext4 filesystem. Run the following commands to prepare the target partition:
In the above command, please replace sdxx with the partition which you want to format. Now mount the partition and restore the backup.
mkdir -pv /mnt/lfs mount /dev/sdxx /mnt/lfs sudo tar xf /path/to/the/backup/tarball -C /
This would extract the tarball into the /mnt/lfs directory where the target partition is extracted. Once the tarball is extracted, you can chroot into the target partition by running the following commands. Before chrooting however some preparation needs to be done. Please substitue /dev/sdxx with the target partition. Run the following commands to prepare the target system and chroot into it:
mkdir /mnt/lfs/sources ln -svf /mnt/lfs/sources /sources cat > build-properties<<EOF LFS=/mnt/lfs ROOT_PART=/dev/sdxx EOF cp -r * /sources/ cp -v build-properties /sources/ pushd /sources wget http://aryalinux.info/files/build-log echo 7 > currentstage popd
Now you can chroot into restored AryaLinux so that you can customize the rest of the system.
Now you can install applications using alps and make changes in the chrooted system. Once the changes are made you can exit out of the chrooted system by entering the exit command till you are back to the base-system directory. Once you are back to the base-system directory, you can either build a live ISO out of it or you can add an option to grub to show this new system in the boot menu. Run the following command to build an ISO:
cat >> build-properties <<EOF INSTALL_BOOTLOADER=n CREATE_LIVE_ISO=y EOF
Building the ISO
Run the following command to start the ISO building process.
You would be prompted if you want to start from the beginning or resume build. Enter 2 as option. Then you would be prompted to enter the name of the partition where build is being done. Enter /dev/sdxx in response. Please change /dev/sdxx to the name of the partition where you restored the system.