Linux Distro creation

Create Linux Distribution

There are so many ways for building a linux distro like LFS(Linux From Scratch), Buildroot, choosing a base distro, etc..

We are going to build the distro by “choosing a base distro“.

Building a distro by “choosing a base distro” means making your own customized version of a Linux operating system, by taking an existing Linux system and make modifications according to your needs and adding your signature to it to declare that this is your modifications.

After you’ve made your modifications and added your signature, you create a ‘snapshot’ or ‘image’ of this customized system. This image can be used to install your custom system on other computers.

And we can also use the created Linux distro without installing it into your system by using an option called `Live-boot`.

For creating a distro, we are using debian os as base and furthermore debian tool called `live-build`(lb) to create our distro.There are few basic commands for `live-build`. They are :

  • lb config
  • lb bootstrap
  • lb chroot
  • lb binary

Instead of running the last three stages (bootstrap, chroot, binary) you can run a single command i.e, “lb build” after finishing the config stage.

Steps to design a linux distro :-

  • Initially you have to enter into the root terminal by typing `sudo su`
  • After that you have to install live-build in terminal using the command `apt install live-build`
  • After installing successfully create a directory using command `mkdir <directory_name>` and get into that directory using command `cd <directory_name>`
    Once you have entered into the directory you can start with creating a configuration tree for working on our distro.
  • you can now type `lb config` command in your terminal

With this command you can specify the option that you want to change like setting the bootloader, image format, archive mirrors,and others as per your requirements. However some of the suggested changes are done by adding following options with lb_config command:

–backports
–binary-images
–bootappend-install
–bootappend-live
–bootloader
–debconf-frontend
–debian-installer
–debian-installer–distribution
–distribution
–interactive
–linux-flavours
–mirror-bootstrap
–mirror-chroot
–mirror-debian-installer
–syslinux-theme