{"id":462,"date":"2025-06-01T11:05:32","date_gmt":"2025-06-01T11:05:32","guid":{"rendered":"https:\/\/www.aran.cat\/wp\/?p=462"},"modified":"2025-09-08T09:55:10","modified_gmt":"2025-09-08T09:55:10","slug":"una-mica-de-linux","status":"publish","type":"post","link":"https:\/\/www.aran.cat\/wp\/?p=462","title":{"rendered":"Una mica de linux&#8230;"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">FONT:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.linuxjournal.com\/content\/how-build-custom-distributions-scratch\">https:\/\/www.linuxjournal.com\/content\/how-build-custom-distributions-scratch<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Build Custom Distributions from Scratch<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Introduction<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In a world teeming with Linux distributions \u2014 from Ubuntu to Arch, Debian to Fedora \u2014 the idea of building your own may seem daunting, if not redundant. Yet, for many technologists, enthusiasts, and developers, creating a custom Linux distribution isn&#8217;t just an exercise in reinvention; it&#8217;s an act of empowerment. Whether your goal is to tailor a lightweight OS for embedded devices, create a secure workstation, develop an education-focused system, or simply understand Linux more intimately, building your own distribution is one of the most fulfilling journeys in open-source computing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide walks you through every stage of creating your own Linux distribution \u2014 from selecting core components to building, customizing, and distributing your personalized operating system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Understanding the Basics<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What is a Linux Distribution?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Linux distribution (or \u00abdistro\u00bb) is a complete operating system built on the Linux kernel. It includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Kernel<\/strong> \u2013 The core interface between hardware and software.<\/li>\n\n\n\n<li><strong>Init System<\/strong> \u2013 Handles booting and service management (e.g., systemd, OpenRC).<\/li>\n\n\n\n<li><strong>Userland Tools<\/strong> \u2013 Basic utilities from projects like GNU Coreutils and BusyBox.<\/li>\n\n\n\n<li><strong>Package Manager<\/strong> \u2013 Tool to install, upgrade, and remove software (e.g., APT, Pacman, DNF).<\/li>\n\n\n\n<li><strong>Optional GUI<\/strong> \u2013 A desktop environment or window manager (e.g., GNOME, XFCE, i3).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why Create Your Own Distribution?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reasons vary, but common motivations include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Learning<\/strong> \u2013 Deepen your understanding of system internals.<\/li>\n\n\n\n<li><strong>Performance<\/strong> \u2013 Remove bloat for a leaner, faster system.<\/li>\n\n\n\n<li><strong>Branding<\/strong> \u2013 Create a branded OS for an organization or product.<\/li>\n\n\n\n<li><strong>Customization<\/strong> \u2013 Tailor software stacks for specific use-cases.<\/li>\n\n\n\n<li><strong>Embedded Applications<\/strong> \u2013 Create firmware or OS images for hardware devices.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Planning Your Custom Linux Distro<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Define Your Goals<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start by asking:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Who is the target user?<\/li>\n\n\n\n<li>What hardware should it support?<\/li>\n\n\n\n<li>Will it be a desktop, server, or headless system?<\/li>\n\n\n\n<li>Should it boot live or be installed?<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Choose a Foundation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can either:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Build from scratch<\/strong>: Using projects like <em>Linux From Scratch (LFS)<\/em>.<\/li>\n\n\n\n<li><strong>Remix an existing distro<\/strong>: Customize Ubuntu, Arch, or Debian using tools like Cubic or Archiso.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Select Core Components<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Kernel<\/strong>: Choose between vanilla, long-term support (LTS), or custom-patched kernels.<\/li>\n\n\n\n<li><strong>Init System<\/strong>: Popular choices include systemd (modern), SysVinit (classic), and OpenRC (lightweight).<\/li>\n\n\n\n<li><strong>Shell<\/strong>: Bash, Zsh, Fish \u2014 depending on user preference.<\/li>\n\n\n\n<li><strong>File System<\/strong>: ext4, Btrfs, XFS depending on performance and snapshotting needs.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Tools and Methods for Building a Custom Distro<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Linux From Scratch (LFS)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">LFS is a book and toolkit that walks you through compiling and configuring every part of a Linux system. You gain a bare-metal understanding of how each component fits together.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros<\/strong>: Maximum control, great learning experience.<\/li>\n\n\n\n<li><strong>Cons<\/strong>: Time-consuming, steep learning curve.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Yocto Project<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ideal for building embedded Linux systems.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros<\/strong>: Powerful, flexible, industry standard for embedded development.<\/li>\n\n\n\n<li><strong>Cons<\/strong>: Complex build system, not beginner-friendly.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Archiso<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Allows you to create a custom Arch Linux live ISO.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros<\/strong>: Lightweight, rolling-release, Arch\u2019s simplicity.<\/li>\n\n\n\n<li><strong>Cons<\/strong>: Arch\u2019s bleeding edge can introduce instability.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Debian Live Build<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create live bootable Debian-based systems.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros<\/strong>: Extensive documentation, stable base.<\/li>\n\n\n\n<li><strong>Cons<\/strong>: Slightly more involved setup process.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ubuntu Customization Tools (Cubic, Systemback)<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GUI tools for modifying Ubuntu ISOs.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros<\/strong>: User-friendly, great for quick custom ISOs.<\/li>\n\n\n\n<li><strong>Cons<\/strong>: Limited to Ubuntu base.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step-by-Step Example: Creating a Minimal Distro with Debian Live Build<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s walk through building a Debian-based custom live system.<strong>Step 1: Setup Environment<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>sudo apt install live-build mkdir mydistro &amp;&amp; cd mydistro lb config <\/code><strong>Step 2: Customize Configuration<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Edit configuration files under <code>config\/<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>config\/package-lists\/my.list.chroot<\/code>: Add your desired packages.<\/li>\n\n\n\n<li><code>config\/includes.binary\/isolinux<\/code>: Add branding.<\/li>\n\n\n\n<li><code>config\/hooks<\/code>: Scripts to run at build time.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: Build the Image<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>sudo lb build <\/code><strong>Step 4: Test<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use VirtualBox or QEMU to test the generated ISO:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>qemu-system-x86_64 -cdrom live-image-amd64.hybrid.iso<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Advanced Customization<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Theming and Branding<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Replace logos in the bootloader and desktop.<\/li>\n\n\n\n<li>Customize wallpapers, GTK\/QT themes, shell prompt.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Preconfigured Desktop Environments<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Provide ready-to-use desktop setups with preferred settings.<\/li>\n\n\n\n<li>Add user accounts, aliases, and shell scripts.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Security and Performance<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Strip unnecessary daemons.<\/li>\n\n\n\n<li>Harden kernel and firewall configurations.<\/li>\n\n\n\n<li>Integrate audit and SELinux\/AppArmor policies.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Automation and CI<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use scripting to automate builds.<\/li>\n\n\n\n<li>Integrate with CI\/CD systems (e.g., Jenkins, GitHub Actions) to auto-generate ISO releases.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Testing and Debugging<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Boot Testing<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use QEMU, VirtualBox, or real hardware. Check:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Boot time<\/li>\n\n\n\n<li>Device compatibility<\/li>\n\n\n\n<li>Package availability<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Troubleshooting<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check logs: <code>\/var\/log\/<\/code>, <code>dmesg<\/code>, <code>journalctl<\/code><\/li>\n\n\n\n<li>Use <code>strace<\/code> and <code>gdb<\/code> for debugging userland binaries.<\/li>\n\n\n\n<li>Validate init and bootloader behavior.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Packaging and Distribution<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Create ISO and Installer<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tools like <code>genisoimage<\/code>, <code>xorriso<\/code>, and <code>calamares<\/code> (graphical installer) help prepare your system for distribution.<strong>Hosting Your Distro<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use GitHub Releases, SourceForge, or a dedicated server.<\/li>\n\n\n\n<li>Offer torrents for better availability.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Documentation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Essential for users and contributors. Include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Installation guide<\/li>\n\n\n\n<li>FAQ<\/li>\n\n\n\n<li>Changelog<\/li>\n\n\n\n<li>Developer setup instructions<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Case Studies: Inspiration from the Linux Ecosystem<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Kali Linux<\/strong>: Security-focused, based on Debian.<\/li>\n\n\n\n<li><strong>Puppy Linux<\/strong>: Extremely lightweight, runs in RAM.<\/li>\n\n\n\n<li><strong>Garuda Linux<\/strong>: A themed, performance-oriented Arch-based distro.<\/li>\n\n\n\n<li><strong>Tails<\/strong>: Privacy-first Debian remix for anonymity.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These projects demonstrate the diversity of purpose and execution possible with custom distributions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Building a custom Linux distribution is a rewarding challenge that opens the door to a deeper understanding of operating systems. Whether you\u2019re fine-tuning for performance, tailoring for a target audience, or just exploring the core of Linux, the journey from kernel to desktop is one of transformation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From scratch-built LFS systems to polished Debian or Arch remixes, the tools are there \u2014 only your vision and patience are required. Take the leap, forge your OS, and leave your mark in the vast Linux universe.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.linuxjournal.com\/sites\/default\/files\/pictures\/george-whittaker-linuxjournal%20%281%29%20%281%29.jpeg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">George Whittaker is the editor of&nbsp;Linux Journal, and also a regular contributor. George has been writing about technology for two decades, and has been a Linux user for over 15 years. In his free time he enjoys programming, reading, and gaming.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FONT: https:\/\/www.linuxjournal.com\/content\/how-build-custom-distributions-scratch How to Build Custom Distributions from Scratch Introduction In a world teeming with Linux distributions \u2014 from Ubuntu to Arch, Debian to Fedora \u2014 the idea of building your own may seem daunting, if not redundant. Yet, for many technologists, enthusiasts, and developers, creating a custom Linux distribution [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-462","post","type-post","status-publish","format-standard","hentry","category-pendents-de-categoritzar"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/posts\/462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=462"}],"version-history":[{"count":2,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/posts\/462\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/posts\/462\/revisions\/481"}],"wp:attachment":[{"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}