How to make own linux distro

Содержание
  1. The Blog
  2. The World of Operating Systems
  3. What Exactly is an Operating System?
  4. What is Linux? A Misconception about Linux One common misconception is that Linux is an operating system (OS). This is factually incorrect and it is rather that piece of software that directly communicates with the hardware. An OS is much more than that, it includes software libraries, runtimes, and usually a default set of executables. Most Linux distributions use GNU as the operating system (including TOS). GNU is the child of Richard Stallman and was designed to be Free (As in Freedom) and Open Source. This ranges from a compiler to system libraries as well as commonly used system programs. In the Linux world, we often say GNU + Linux otherwise referred to as GNU/Linux, because the Operating System is a combination of those 2 projects. Other versions of Linux also exist, for example, the busybox project. These Linux distributions are often more lightweight and can be found in embedded systems. Free Software vs. Open-source Software The Linux kernel is known to be open-source software. This means that the source code is openly available. Everybody can read the code and modify it to their heart’s content. It means we, as a community, can find bugs and fix them or add extra features. This is a very powerful feature and enables collaboration to improve the software, fix bugs, and increase the security. Open-source software is usually free (not to be confused with free as in freedom). Examples of such software are VLC, MediaWiki (Wikipedia), and Firefox. The open-source development model has led to a vast and interesting ecosystem. Then we also have free software (free as in freedom), which is even more open than open-source software. It not only allows you to look at the source code and modify it, but it also lets you resell the software for money and make a business out of it. The free software foundation describes it as “the users have the freedom to run, copy, distribute, study, change and improve the software”. Software like Microsoft Windows is known as proprietary software. This software is not owned by the user, so they are only allowed to use it. The users are not allowed to look at the code, reverse engineer, modify, or redistribute it. In other words, you have the freedom to do what you want with free and open-source software, but not with proprietary software. This is a key consideration in the Linux world. My Adventure to Building my own Linux Distribution The Birth of TOS Linux This brings us to the story of how I started to work on TOS GNU/Linux. First I used an OS known as Ubuntu (the most widely used Linux distribution). This gave me a well-established basis on how to use Linux, it was stable and supported my needs of software. However, when time grew, so did my curiosity. I began exploring the vast landscape of Linux distributions. This drove me to test different distributions. In order, I experimented with: Each distro had its own features and reason why to use it. But the story really begins with Arch Linux. It is known as a Do It Yourself (DIY) distribution. This means you actually had to completely do everything yourself. From installing all drivers to choosing the Desktop Environment (DE) and applications you want to use. Nothing is done for you and everything must be done by yourself. This distro gave me insight into how Linux works on a lower level. Because it was so low level it meant you have to make sure everything is installed and configured correctly. For example, if you forgot to install a wifi driver and network manager, then you couldn’t use the internet and thus couldn’t fix the problem. Soon after installing Arch Linux on my laptop, I wanted to install it on my desktop. This took a lot of setup work. Which meant I created a shell script that automatically installed Arch Linux with all my dependencies and favorite applications. Which, in essence, was my very first “installer”. This resulted in installations of 15 minutes instead of 1 to 2 days of manual work. I soon began to modify and fix bugs in the installation script. Each time I wanted a new feature, I added it to that script. You can imagine that over time it began growing and growing more massive. Eventually, the script was no longer, instead I made several components that each interacts with one another, and that in the end became TOS GNU/Linux. The TOS Linux Installer TOS Linux has a graphical installer that is responsible for installing the operating system on your hardware. It does a number of things. Mainly the following: Partition the hard drive/SSD Creating users and groups Installing all required packages (from the TOS repository) Configuring the OS (keyboard layout, permissions, repository mirrors, etc) Setting up the boot process Preparing and validating the environment Each section above has its own respective configuration. For example, people can decide how to partition their environment, which filesystem to use, and if they want to encrypt their data or not. The installer is fully featured and easy to use. Package Management and Repository A major part of a distribution is its package management and the repositories. TOS uses the “PacMan” (package manager). It is responsible for keeping the system up-to-date along with all the applications. A naive approach to package management is how windows does it. There you have to go to a website and download the executable. This is obviously unsafe as you can download a malicious executable. TOS has what is called a repository. It contains a list of packages that are known to be safe and get updated daily. This guarantees up-to-date and secure packages. Packages get built by the TOS developers and are verified to come from reputable sources. To prevent Man In the Middle attacks, TOS uses what is called package signing. In short, each package gets built and compressed (much like a zip file, instead it uses zstd) after it is compressed it will be signed with a private key. The resulting signature will be provided in the repository with the package. The basic installation includes the public key on their computer. When they download a package, they also download the signature and verify if the package is signed by the matching private key. The TOS repository and security topic is vast and should have their own blog post. At this moment, you can install over 80,000 packages from the repository. TOS Desktop Environment Outside maintaining packages, kernels, configurations, installers, repositories, and more, TOS also provides its own desktop environment. Before continuing TOS can also use other desktop environments such as GNOME, KDE, Deepin, Cinnamon, Mate, and more, they are all provided in the official repository. The default desktop environment is called TDE (TOS Desktop Environment). A desktop environment sits on top of the Operating System and provides a Graphical User Interface that helps you maintain your daily life. Here is a list of what a desktop environment does: Managing applications/windows Giving a default set of applications (text editor, file manager, settings, etc) Managing the state (WiFi, Bluetooth, display settings, keyboard layout, etc) Managing privileges (asks for password or fingerprint when needed) Managing look and feel, icons, themes, folders, mouse pointer, wallpaper, and more Login management To keep it simple, it does everything that you can visually see except for applications that you install manually. For macOS and Windows, the desktop environment is baked into the operating system. On Linux, you are free to swap them. If you wish to read more on TDE, read this guide. TOS Linux Kernel TOS wants to support as many computers and hardware as it can. Because of this, we have a modified version of the Linux kernel that supports the broadest set of hardware. By default, the vanilla kernel contains only a subset of what you can do. In TOS, we extend this subset with more features and saner defaults for the ultimate desktop experience. The vanilla kernel contains configurations for servers, whilst the TOS kernel is designed for graphical use and support for most hardware. You can take a look at the TOS kernel source code. Booting up To be able to use TOS GNU/Linux we have to start it up, usually called the bootup sequence. The TOS Linux bootloader supports multiple operating systems. It can boot any version of Linux, BSD, macOS, and Windows. So you can run TOS Linux side by side with, for example, windows. The above image (from GoLinuxCloud) demonstrates the boot sequence. In TOS we both support MBR and GPT(UEFI) systems to boot up. The bootloader used is Grand Unified Bootloader (GRUB) Which will launch an initial ramdisk (initrd) that will be loaded into RAM (it contains everything needed to start all applications). It is responsible for mounting the hard drives, running the kernel, starting the init process, etc. The initialization process is responsible for launching every program. It, for example, starts all required drivers, starts the GUI, and all background processes. In the case of TOS, this is systemd. Once everything is booted up, you will be presented with a login screen. TOS provides an excellent wiki that should help you in case you have questions or are having issues. The wiki covers topics about how to use TOS, how to install it, and what you can do as a developer. It also covers other topics such as how to configure certain software. The wiki can be found under the link wiki.odex.be. Here are some example pages you can find in the wiki: At the moment, the wiki has over 2400 pages/tutorials which will cover most of the daily issues that users might run into. Conclusion TOS GNU/Linux was started as a project so that I had a machine that was totally under my control. It contains a huge number of packages in the repository and provides the needed control for the user. It allows you to completely modify and alter your system. And it comes along with an extensible wiki that covers most (if not all) of your problems. I would also like to thank the work that Allen McRae and the other developers did on Arch Linux as they founded the basis that later became TOS. Some people might want to take a look at TOS and for that reason, I will leave here a list of useful links SUBSCRIBE TO OUR NEWSLETTER Источник 8 Tools to Easily Create a Custom Linux Distro When there are so many Linux distros out there, you are probably wondering why someone would want to create their own distro instead of getting a readymade one. While in most cases a readymade distro is fine, if you want to have a distro that is 100 percent tailored to your needs (or your mum or dad’s needs), you may have to create your own custom Linux distro. With the right tools, creating your own Linux distro isn’t as hard as it seems, though it takes time for sure. There are many tools for the purpose – some of them are universal, and some of them are distro-specific. Here are eight of them. Also read: VIM Keyboard Shortcuts Cheatsheet 1. Linux Respin Linux Respin is a fork of the now discontinued Remastersys. Years ago, Remastersys was one of the most popular tools to create your own Linux distro and/or a backup of your OS. Linux Respin doesn’t offer as much as Remastersys used to, but still it does a great job if you are using a distro it’s available for. Linux Respin is available for Debian, Mint and Trisquel only, which kind of limits its popularity. What I don’t like about this tool is its almost nonexistent documentation. 2. Linux Live Kit Linux Live Kit is a tool you can use to create your own distro or back up your system. It prefers Debian but fortunately can be run on other distros as well, provided it supports aufs and squashfs kernel modules. Linux Live Kit has a very short and sweet wizard on how to build a distro – just follow the steps and you are done. 3. Ubuntu Imager Ubuntu Imager is a good tool to create your own Ubuntu-based distro. It’s not the only such app for Ubuntu, but since it’s a good one, I chose to mention it on this list. I am not going to review it in detail because we already have a very detailed how-to with instructions for installation and operation. 4. Linux from Scratch If you want to have absolute control on what is included in your distro and have lots of free time, you can have a look at the Linux from Scratch project. LFS has very extensive documentation and is a great learning resource about Linux in general, not just how to create your own distro. Linux from Scratch allows you to build your own customized Linux system entirely from source code. LFS is not exactly a tool like others on this list, but you can still use it for the same purpose – to create your own Linux distro (and to learn a lot about Linux as a whole). 5. Slax Modules Tool If you are looking for an easy-to-use tool and like Slax – a lightweight distro based on Slackware, you are lucky because they have an online tool to pick the modules you would like included in your distro. I’ve used this tool in the past numerous times when I wanted to create a lightweight live system for friends of mine, and it works like a charm. Browse through the categories of software, pick the apps you want and add them to the build. Don’t worry if you miss a thing or two, as you can always add more apps after you build and run it. Note, though, that this approach is considered old and deprecated, and for newer versions of Slax it’s suggested you use apt to install software instead of relying on modules. 6. Live Magic Live Magic is one more Debian tool for distro creation. It can create CDs, USBs, and netboot images. It’s much simpler to use than some of the other apps on this list, such as Remastersys, but it does not use your running system to build the image. Instead, follow a wizard and choose your configuration options as you go. The program will pull the packages from your repositories and install them into your image. 7. Revisor Another great tool with which you can create your own distribution, Revisor allows you to put your own spin on Fedora. It was initially intended as a GUI to release build tools but evolved to enable users to create customized distributions. Revisor allows the creation of Installation Media for permanent installation of the distribution on a computer, live media, from which you can boot and use the distribution without making permanent changes to the computer, virtualization media, for use in virtual guests in Xen or KVM, and utility media, that can incorporate programs to help recover data or deal with problems in the operating system. 8. Customizer Customizer isn’t under active development anymore, but that, according to its developer, is because it is considered stable. It is another tool with which you can remix Ubuntu, but it also supports its different flavors, like Xubuntu and Kubuntu. A critical restriction, though, is that the host system under which you are using it should share the same release number and architecture as the guest system you are remixing. These tools for creating your own custom Linux distro should help you. Their level of complexity (and power) varies, but we’ve tried to include both easy-to-use apps and apps that give you more power. For more Linux tips, see our guides on how to repair a corrupted USB drive in Linux and how to install .deb packages in Arch Linux. OK’s real life started at around 10, when he got his first computer — a Commodore 128. Since then, he’s been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read. Источник
  5. A Misconception about Linux
  6. Free Software vs. Open-source Software The Linux kernel is known to be open-source software. This means that the source code is openly available. Everybody can read the code and modify it to their heart’s content. It means we, as a community, can find bugs and fix them or add extra features. This is a very powerful feature and enables collaboration to improve the software, fix bugs, and increase the security. Open-source software is usually free (not to be confused with free as in freedom). Examples of such software are VLC, MediaWiki (Wikipedia), and Firefox. The open-source development model has led to a vast and interesting ecosystem. Then we also have free software (free as in freedom), which is even more open than open-source software. It not only allows you to look at the source code and modify it, but it also lets you resell the software for money and make a business out of it. The free software foundation describes it as “the users have the freedom to run, copy, distribute, study, change and improve the software”. Software like Microsoft Windows is known as proprietary software. This software is not owned by the user, so they are only allowed to use it. The users are not allowed to look at the code, reverse engineer, modify, or redistribute it. In other words, you have the freedom to do what you want with free and open-source software, but not with proprietary software. This is a key consideration in the Linux world. My Adventure to Building my own Linux Distribution The Birth of TOS Linux This brings us to the story of how I started to work on TOS GNU/Linux. First I used an OS known as Ubuntu (the most widely used Linux distribution). This gave me a well-established basis on how to use Linux, it was stable and supported my needs of software. However, when time grew, so did my curiosity. I began exploring the vast landscape of Linux distributions. This drove me to test different distributions. In order, I experimented with: Each distro had its own features and reason why to use it. But the story really begins with Arch Linux. It is known as a Do It Yourself (DIY) distribution. This means you actually had to completely do everything yourself. From installing all drivers to choosing the Desktop Environment (DE) and applications you want to use. Nothing is done for you and everything must be done by yourself. This distro gave me insight into how Linux works on a lower level. Because it was so low level it meant you have to make sure everything is installed and configured correctly. For example, if you forgot to install a wifi driver and network manager, then you couldn’t use the internet and thus couldn’t fix the problem. Soon after installing Arch Linux on my laptop, I wanted to install it on my desktop. This took a lot of setup work. Which meant I created a shell script that automatically installed Arch Linux with all my dependencies and favorite applications. Which, in essence, was my very first “installer”. This resulted in installations of 15 minutes instead of 1 to 2 days of manual work. I soon began to modify and fix bugs in the installation script. Each time I wanted a new feature, I added it to that script. You can imagine that over time it began growing and growing more massive. Eventually, the script was no longer, instead I made several components that each interacts with one another, and that in the end became TOS GNU/Linux. The TOS Linux Installer TOS Linux has a graphical installer that is responsible for installing the operating system on your hardware. It does a number of things. Mainly the following: Partition the hard drive/SSD Creating users and groups Installing all required packages (from the TOS repository) Configuring the OS (keyboard layout, permissions, repository mirrors, etc) Setting up the boot process Preparing and validating the environment Each section above has its own respective configuration. For example, people can decide how to partition their environment, which filesystem to use, and if they want to encrypt their data or not. The installer is fully featured and easy to use. Package Management and Repository A major part of a distribution is its package management and the repositories. TOS uses the “PacMan” (package manager). It is responsible for keeping the system up-to-date along with all the applications. A naive approach to package management is how windows does it. There you have to go to a website and download the executable. This is obviously unsafe as you can download a malicious executable. TOS has what is called a repository. It contains a list of packages that are known to be safe and get updated daily. This guarantees up-to-date and secure packages. Packages get built by the TOS developers and are verified to come from reputable sources. To prevent Man In the Middle attacks, TOS uses what is called package signing. In short, each package gets built and compressed (much like a zip file, instead it uses zstd) after it is compressed it will be signed with a private key. The resulting signature will be provided in the repository with the package. The basic installation includes the public key on their computer. When they download a package, they also download the signature and verify if the package is signed by the matching private key. The TOS repository and security topic is vast and should have their own blog post. At this moment, you can install over 80,000 packages from the repository. TOS Desktop Environment Outside maintaining packages, kernels, configurations, installers, repositories, and more, TOS also provides its own desktop environment. Before continuing TOS can also use other desktop environments such as GNOME, KDE, Deepin, Cinnamon, Mate, and more, they are all provided in the official repository. The default desktop environment is called TDE (TOS Desktop Environment). A desktop environment sits on top of the Operating System and provides a Graphical User Interface that helps you maintain your daily life. Here is a list of what a desktop environment does: Managing applications/windows Giving a default set of applications (text editor, file manager, settings, etc) Managing the state (WiFi, Bluetooth, display settings, keyboard layout, etc) Managing privileges (asks for password or fingerprint when needed) Managing look and feel, icons, themes, folders, mouse pointer, wallpaper, and more Login management To keep it simple, it does everything that you can visually see except for applications that you install manually. For macOS and Windows, the desktop environment is baked into the operating system. On Linux, you are free to swap them. If you wish to read more on TDE, read this guide. TOS Linux Kernel TOS wants to support as many computers and hardware as it can. Because of this, we have a modified version of the Linux kernel that supports the broadest set of hardware. By default, the vanilla kernel contains only a subset of what you can do. In TOS, we extend this subset with more features and saner defaults for the ultimate desktop experience. The vanilla kernel contains configurations for servers, whilst the TOS kernel is designed for graphical use and support for most hardware. You can take a look at the TOS kernel source code. Booting up To be able to use TOS GNU/Linux we have to start it up, usually called the bootup sequence. The TOS Linux bootloader supports multiple operating systems. It can boot any version of Linux, BSD, macOS, and Windows. So you can run TOS Linux side by side with, for example, windows. The above image (from GoLinuxCloud) demonstrates the boot sequence. In TOS we both support MBR and GPT(UEFI) systems to boot up. The bootloader used is Grand Unified Bootloader (GRUB) Which will launch an initial ramdisk (initrd) that will be loaded into RAM (it contains everything needed to start all applications). It is responsible for mounting the hard drives, running the kernel, starting the init process, etc. The initialization process is responsible for launching every program. It, for example, starts all required drivers, starts the GUI, and all background processes. In the case of TOS, this is systemd. Once everything is booted up, you will be presented with a login screen. TOS provides an excellent wiki that should help you in case you have questions or are having issues. The wiki covers topics about how to use TOS, how to install it, and what you can do as a developer. It also covers other topics such as how to configure certain software. The wiki can be found under the link wiki.odex.be. Here are some example pages you can find in the wiki: At the moment, the wiki has over 2400 pages/tutorials which will cover most of the daily issues that users might run into. Conclusion TOS GNU/Linux was started as a project so that I had a machine that was totally under my control. It contains a huge number of packages in the repository and provides the needed control for the user. It allows you to completely modify and alter your system. And it comes along with an extensible wiki that covers most (if not all) of your problems. I would also like to thank the work that Allen McRae and the other developers did on Arch Linux as they founded the basis that later became TOS. Some people might want to take a look at TOS and for that reason, I will leave here a list of useful links SUBSCRIBE TO OUR NEWSLETTER Источник 8 Tools to Easily Create a Custom Linux Distro When there are so many Linux distros out there, you are probably wondering why someone would want to create their own distro instead of getting a readymade one. While in most cases a readymade distro is fine, if you want to have a distro that is 100 percent tailored to your needs (or your mum or dad’s needs), you may have to create your own custom Linux distro. With the right tools, creating your own Linux distro isn’t as hard as it seems, though it takes time for sure. There are many tools for the purpose – some of them are universal, and some of them are distro-specific. Here are eight of them. Also read: VIM Keyboard Shortcuts Cheatsheet 1. Linux Respin Linux Respin is a fork of the now discontinued Remastersys. Years ago, Remastersys was one of the most popular tools to create your own Linux distro and/or a backup of your OS. Linux Respin doesn’t offer as much as Remastersys used to, but still it does a great job if you are using a distro it’s available for. Linux Respin is available for Debian, Mint and Trisquel only, which kind of limits its popularity. What I don’t like about this tool is its almost nonexistent documentation. 2. Linux Live Kit Linux Live Kit is a tool you can use to create your own distro or back up your system. It prefers Debian but fortunately can be run on other distros as well, provided it supports aufs and squashfs kernel modules. Linux Live Kit has a very short and sweet wizard on how to build a distro – just follow the steps and you are done. 3. Ubuntu Imager Ubuntu Imager is a good tool to create your own Ubuntu-based distro. It’s not the only such app for Ubuntu, but since it’s a good one, I chose to mention it on this list. I am not going to review it in detail because we already have a very detailed how-to with instructions for installation and operation. 4. Linux from Scratch If you want to have absolute control on what is included in your distro and have lots of free time, you can have a look at the Linux from Scratch project. LFS has very extensive documentation and is a great learning resource about Linux in general, not just how to create your own distro. Linux from Scratch allows you to build your own customized Linux system entirely from source code. LFS is not exactly a tool like others on this list, but you can still use it for the same purpose – to create your own Linux distro (and to learn a lot about Linux as a whole). 5. Slax Modules Tool If you are looking for an easy-to-use tool and like Slax – a lightweight distro based on Slackware, you are lucky because they have an online tool to pick the modules you would like included in your distro. I’ve used this tool in the past numerous times when I wanted to create a lightweight live system for friends of mine, and it works like a charm. Browse through the categories of software, pick the apps you want and add them to the build. Don’t worry if you miss a thing or two, as you can always add more apps after you build and run it. Note, though, that this approach is considered old and deprecated, and for newer versions of Slax it’s suggested you use apt to install software instead of relying on modules. 6. Live Magic Live Magic is one more Debian tool for distro creation. It can create CDs, USBs, and netboot images. It’s much simpler to use than some of the other apps on this list, such as Remastersys, but it does not use your running system to build the image. Instead, follow a wizard and choose your configuration options as you go. The program will pull the packages from your repositories and install them into your image. 7. Revisor Another great tool with which you can create your own distribution, Revisor allows you to put your own spin on Fedora. It was initially intended as a GUI to release build tools but evolved to enable users to create customized distributions. Revisor allows the creation of Installation Media for permanent installation of the distribution on a computer, live media, from which you can boot and use the distribution without making permanent changes to the computer, virtualization media, for use in virtual guests in Xen or KVM, and utility media, that can incorporate programs to help recover data or deal with problems in the operating system. 8. Customizer Customizer isn’t under active development anymore, but that, according to its developer, is because it is considered stable. It is another tool with which you can remix Ubuntu, but it also supports its different flavors, like Xubuntu and Kubuntu. A critical restriction, though, is that the host system under which you are using it should share the same release number and architecture as the guest system you are remixing. These tools for creating your own custom Linux distro should help you. Their level of complexity (and power) varies, but we’ve tried to include both easy-to-use apps and apps that give you more power. For more Linux tips, see our guides on how to repair a corrupted USB drive in Linux and how to install .deb packages in Arch Linux. OK’s real life started at around 10, when he got his first computer — a Commodore 128. Since then, he’s been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read. Источник
  7. My Adventure to Building my own Linux Distribution
  8. The Birth of TOS Linux
  9. The TOS Linux Installer
  10. Package Management and Repository
  11. TOS Desktop Environment
  12. TOS Linux Kernel
  13. Booting up
  14. Conclusion
  15. 8 Tools to Easily Create a Custom Linux Distro
  16. 1. Linux Respin
  17. 2. Linux Live Kit
  18. 3. Ubuntu Imager
  19. 4. Linux from Scratch
  20. 5. Slax Modules Tool
  21. 6. Live Magic
  22. 7. Revisor
  23. 8. Customizer
Читайте также:  Windows print queue printing

The Blog

Manoosh November 13, 2020 Uncategorized

This article was written by Tom Meyers, a DevOps engineer at iDalko.

There’s a lot you can do when it comes to open-source software thanks to its in-built flexibility, scalability, and adaptability. You can even decide to make a new product based on your specific requirements. In this blog post, I will walk you through the journey I took to build my own Linux distribution called TOS.

Before we get started, let’s sketch the landscape.

Here’s what I’m going to cover in this blog post:

The World of Operating Systems

We all use computers on a daily basis. Most of you know about Microsoft Windows and Apple’s macOS. However, did you also know about GNU/Linux also referred to as Linux? This world is dominated by Windows with macOS being in second place, and far down the charts, we see Linux.

Microsoft Windows takes up to about 80% of the market and macOS around 16%. This leaves almost no space for Linux. But don’t stop reading just yet. It is used more than you think as these numbers only reflect desktop usage. Did you know that Android runs on Linux? When you are using Facebook, Instagram, or Google, you are also using Linux. It is the most used server operating system by a fair margin.

What Exactly is an Operating System?

An operating system is a piece of software that sits in between the hardware that you interact with and the software that you wish to run. When you are typing on a keyboard or looking at your screen, you are touching the hardware. When you start your web browser you are using software, the web browser is executing code on your CPU (Central Processing Unit).

Читайте также:  Linux как подобрать пароль

However, it doesn’t do this directly. It talks with your Operating System, which then talks with your hardware. In essence, it translates and manages hardware so that software can use it. (See below)

What is Linux?

A Misconception about Linux

One common misconception is that Linux is an operating system (OS). This is factually incorrect and it is rather that piece of software that directly communicates with the hardware. An OS is much more than that, it includes software libraries, runtimes, and usually a default set of executables.

Most Linux distributions use GNU as the operating system (including TOS). GNU is the child of Richard Stallman and was designed to be Free (As in Freedom) and Open Source. This ranges from a compiler to system libraries as well as commonly used system programs.

In the Linux world, we often say GNU + Linux otherwise referred to as GNU/Linux, because the Operating System is a combination of those 2 projects. Other versions of Linux also exist, for example, the busybox project. These Linux distributions are often more lightweight and can be found in embedded systems.

Free Software vs. Open-source Software

The Linux kernel is known to be open-source software. This means that the source code is openly available. Everybody can read the code and modify it to their heart’s content.

It means we, as a community, can find bugs and fix them or add extra features. This is a very powerful feature and enables collaboration to improve the software, fix bugs, and increase the security. Open-source software is usually free (not to be confused with free as in freedom). Examples of such software are VLC, MediaWiki (Wikipedia), and Firefox. The open-source development model has led to a vast and interesting ecosystem.

Then we also have free software (free as in freedom), which is even more open than open-source software. It not only allows you to look at the source code and modify it, but it also lets you resell the software for money and make a business out of it. The free software foundation describes it as “the users have the freedom to run, copy, distribute, study, change and improve the software”.

Software like Microsoft Windows is known as proprietary software. This software is not owned by the user, so they are only allowed to use it. The users are not allowed to look at the code, reverse engineer, modify, or redistribute it.

In other words, you have the freedom to do what you want with free and open-source software, but not with proprietary software. This is a key consideration in the Linux world.

My Adventure to Building my own Linux Distribution

The Birth of TOS Linux

This brings us to the story of how I started to work on TOS GNU/Linux. First I used an OS known as Ubuntu (the most widely used Linux distribution). This gave me a well-established basis on how to use Linux, it was stable and supported my needs of software.

However, when time grew, so did my curiosity. I began exploring the vast landscape of Linux distributions. This drove me to test different distributions. In order, I experimented with:

Each distro had its own features and reason why to use it. But the story really begins with Arch Linux. It is known as a Do It Yourself (DIY) distribution. This means you actually had to completely do everything yourself. From installing all drivers to choosing the Desktop Environment (DE) and applications you want to use. Nothing is done for you and everything must be done by yourself.

This distro gave me insight into how Linux works on a lower level. Because it was so low level it meant you have to make sure everything is installed and configured correctly. For example, if you forgot to install a wifi driver and network manager, then you couldn’t use the internet and thus couldn’t fix the problem.

Soon after installing Arch Linux on my laptop, I wanted to install it on my desktop. This took a lot of setup work. Which meant I created a shell script that automatically installed Arch Linux with all my dependencies and favorite applications. Which, in essence, was my very first “installer”.

This resulted in installations of 15 minutes instead of 1 to 2 days of manual work. I soon began to modify and fix bugs in the installation script. Each time I wanted a new feature, I added it to that script.

You can imagine that over time it began growing and growing more massive. Eventually, the script was no longer, instead I made several components that each interacts with one another, and that in the end became TOS GNU/Linux.

The TOS Linux Installer

TOS Linux has a graphical installer that is responsible for installing the operating system on your hardware. It does a number of things. Mainly the following:

  1. Partition the hard drive/SSD
  2. Creating users and groups
  3. Installing all required packages (from the TOS repository)
  4. Configuring the OS (keyboard layout, permissions, repository mirrors, etc)
  5. Setting up the boot process
  6. Preparing and validating the environment

Each section above has its own respective configuration.

For example, people can decide how to partition their environment, which filesystem to use, and if they want to encrypt their data or not. The installer is fully featured and easy to use.

Package Management and Repository

A major part of a distribution is its package management and the repositories. TOS uses the “PacMan” (package manager). It is responsible for keeping the system up-to-date along with all the applications.

A naive approach to package management is how windows does it. There you have to go to a website and download the executable. This is obviously unsafe as you can download a malicious executable.

TOS has what is called a repository. It contains a list of packages that are known to be safe and get updated daily. This guarantees up-to-date and secure packages. Packages get built by the TOS developers and are verified to come from reputable sources.

To prevent Man In the Middle attacks, TOS uses what is called package signing. In short, each package gets built and compressed (much like a zip file, instead it uses zstd) after it is compressed it will be signed with a private key. The resulting signature will be provided in the repository with the package.

The basic installation includes the public key on their computer. When they download a package, they also download the signature and verify if the package is signed by the matching private key.

The TOS repository and security topic is vast and should have their own blog post. At this moment, you can install over 80,000 packages from the repository.

TOS Desktop Environment

Outside maintaining packages, kernels, configurations, installers, repositories, and more, TOS also provides its own desktop environment.

Before continuing TOS can also use other desktop environments such as GNOME, KDE, Deepin, Cinnamon, Mate, and more, they are all provided in the official repository.

The default desktop environment is called TDE (TOS Desktop Environment).

A desktop environment sits on top of the Operating System and provides a Graphical User Interface that helps you maintain your daily life. Here is a list of what a desktop environment does:

  1. Managing applications/windows
  2. Giving a default set of applications (text editor, file manager, settings, etc)
  3. Managing the state (WiFi, Bluetooth, display settings, keyboard layout, etc)
  4. Managing privileges (asks for password or fingerprint when needed)
  5. Managing look and feel, icons, themes, folders, mouse pointer, wallpaper, and more
  6. Login management

To keep it simple, it does everything that you can visually see except for applications that you install manually.

For macOS and Windows, the desktop environment is baked into the operating system. On Linux, you are free to swap them.

If you wish to read more on TDE, read this guide.

TOS Linux Kernel

TOS wants to support as many computers and hardware as it can. Because of this, we have a modified version of the Linux kernel that supports the broadest set of hardware. By default, the vanilla kernel contains only a subset of what you can do.

In TOS, we extend this subset with more features and saner defaults for the ultimate desktop experience. The vanilla kernel contains configurations for servers, whilst the TOS kernel is designed for graphical use and support for most hardware.

You can take a look at the TOS kernel source code.

Booting up

To be able to use TOS GNU/Linux we have to start it up, usually called the bootup sequence.

The TOS Linux bootloader supports multiple operating systems. It can boot any version of Linux, BSD, macOS, and Windows. So you can run TOS Linux side by side with, for example, windows.

The above image (from GoLinuxCloud) demonstrates the boot sequence. In TOS we both support MBR and GPT(UEFI) systems to boot up. The bootloader used is Grand Unified Bootloader (GRUB) Which will launch an initial ramdisk (initrd) that will be loaded into RAM (it contains everything needed to start all applications). It is responsible for mounting the hard drives, running the kernel, starting the init process, etc.

The initialization process is responsible for launching every program. It, for example, starts all required drivers, starts the GUI, and all background processes. In the case of TOS, this is systemd.

Once everything is booted up, you will be presented with a login screen.

TOS provides an excellent wiki that should help you in case you have questions or are having issues.

The wiki covers topics about how to use TOS, how to install it, and what you can do as a developer. It also covers other topics such as how to configure certain software. The wiki can be found under the link wiki.odex.be.

Here are some example pages you can find in the wiki:

At the moment, the wiki has over 2400 pages/tutorials which will cover most of the daily issues that users might run into.

Conclusion

TOS GNU/Linux was started as a project so that I had a machine that was totally under my control. It contains a huge number of packages in the repository and provides the needed control for the user. It allows you to completely modify and alter your system. And it comes along with an extensible wiki that covers most (if not all) of your problems.

I would also like to thank the work that Allen McRae and the other developers did on Arch Linux as they founded the basis that later became TOS.

Some people might want to take a look at TOS and for that reason, I will leave here a list of useful links

SUBSCRIBE TO OUR NEWSLETTER

Источник

8 Tools to Easily Create a Custom Linux Distro

When there are so many Linux distros out there, you are probably wondering why someone would want to create their own distro instead of getting a readymade one. While in most cases a readymade distro is fine, if you want to have a distro that is 100 percent tailored to your needs (or your mum or dad’s needs), you may have to create your own custom Linux distro.

With the right tools, creating your own Linux distro isn’t as hard as it seems, though it takes time for sure. There are many tools for the purpose – some of them are universal, and some of them are distro-specific. Here are eight of them.

Also read: VIM Keyboard Shortcuts Cheatsheet

1. Linux Respin

Linux Respin is a fork of the now discontinued Remastersys. Years ago, Remastersys was one of the most popular tools to create your own Linux distro and/or a backup of your OS. Linux Respin doesn’t offer as much as Remastersys used to, but still it does a great job if you are using a distro it’s available for. Linux Respin is available for Debian, Mint and Trisquel only, which kind of limits its popularity. What I don’t like about this tool is its almost nonexistent documentation.

2. Linux Live Kit

Linux Live Kit is a tool you can use to create your own distro or back up your system. It prefers Debian but fortunately can be run on other distros as well, provided it supports aufs and squashfs kernel modules. Linux Live Kit has a very short and sweet wizard on how to build a distro – just follow the steps and you are done.

3. Ubuntu Imager

Ubuntu Imager is a good tool to create your own Ubuntu-based distro. It’s not the only such app for Ubuntu, but since it’s a good one, I chose to mention it on this list. I am not going to review it in detail because we already have a very detailed how-to with instructions for installation and operation.

4. Linux from Scratch

If you want to have absolute control on what is included in your distro and have lots of free time, you can have a look at the Linux from Scratch project. LFS has very extensive documentation and is a great learning resource about Linux in general, not just how to create your own distro. Linux from Scratch allows you to build your own customized Linux system entirely from source code. LFS is not exactly a tool like others on this list, but you can still use it for the same purpose – to create your own Linux distro (and to learn a lot about Linux as a whole).

5. Slax Modules Tool

If you are looking for an easy-to-use tool and like Slax – a lightweight distro based on Slackware, you are lucky because they have an online tool to pick the modules you would like included in your distro. I’ve used this tool in the past numerous times when I wanted to create a lightweight live system for friends of mine, and it works like a charm. Browse through the categories of software, pick the apps you want and add them to the build. Don’t worry if you miss a thing or two, as you can always add more apps after you build and run it.

Note, though, that this approach is considered old and deprecated, and for newer versions of Slax it’s suggested you use apt to install software instead of relying on modules.

6. Live Magic

Live Magic is one more Debian tool for distro creation. It can create CDs, USBs, and netboot images. It’s much simpler to use than some of the other apps on this list, such as Remastersys, but it does not use your running system to build the image. Instead, follow a wizard and choose your configuration options as you go. The program will pull the packages from your repositories and install them into your image.

7. Revisor

Another great tool with which you can create your own distribution, Revisor allows you to put your own spin on Fedora. It was initially intended as a GUI to release build tools but evolved to enable users to create customized distributions.

Revisor allows the creation of Installation Media for permanent installation of the distribution on a computer, live media, from which you can boot and use the distribution without making permanent changes to the computer, virtualization media, for use in virtual guests in Xen or KVM, and utility media, that can incorporate programs to help recover data or deal with problems in the operating system.

8. Customizer

Customizer isn’t under active development anymore, but that, according to its developer, is because it is considered stable. It is another tool with which you can remix Ubuntu, but it also supports its different flavors, like Xubuntu and Kubuntu. A critical restriction, though, is that the host system under which you are using it should share the same release number and architecture as the guest system you are remixing.

These tools for creating your own custom Linux distro should help you. Their level of complexity (and power) varies, but we’ve tried to include both easy-to-use apps and apps that give you more power. For more Linux tips, see our guides on how to repair a corrupted USB drive in Linux and how to install .deb packages in Arch Linux.

OK’s real life started at around 10, when he got his first computer — a Commodore 128. Since then, he’s been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.

Источник

Оцените статью