• chevron_right

      Mastering Linux Disk Management: LVM and Disk Partitioning

      pubsub.slavino.sk / linuxyournal · Thursday, 28 March - 16:00 edit · 1 minute

    Mastering Linux Disk Management: LVM and Disk Partitioning

    Linux stands as a bastion of power and flexibility in the world of operating systems, particularly when it comes to managing disk storage. Whether you're a seasoned sysadmin, a developer, or a Linux enthusiast, understanding how to efficiently manage disk space is crucial. This guide delves into the intricacies of Disk Partitioning and Logical Volume Management (LVM), equipping you with the knowledge to optimize your Linux system's storage.

    Understanding Disk Partitioning

    Disk Partitioning is the first step towards organizing the storage on a disk. It involves dividing a disk into separate sections, each functioning as an independent disk, which can be managed separately. This segregation helps in managing files, running different operating systems on the same disk, or creating a dedicated space for specific data.

    Types of Disk Partitions

    There are three main types of partitions:

    • Primary Partitions: Directly accessible and used for booting the system. A disk can have up to four primary partitions.
    • Extended Partitions: Created within a primary partition, acting as a container that can hold multiple logical partitions. This is a workaround for the four-partition limit.
    • Logical Partitions: Nested within an extended partition, allowing for more than four partitions on a disk.
    File Systems and Their Importance

    A file system dictates how data is stored and retrieved. Each partition can use a different file system (ext4, NTFS, FAT32, etc.), affecting performance, storage efficiency, and compatibility.

    Tools for Disk Partitioning in Linux

    Linux offers a plethora of tools for disk partitioning, including:

    • fdisk: A command-line utility ideal for MBR disks.
    • gdisk: Similar to fdisk but for GPT disks.
    • parted: A versatile tool that supports both MBR and GPT disks.

    The Basics of Logical Volume Management (LVM)

    LVM is a more flexible approach to managing disk space. It allows for resizing partitions (logical volumes) on the fly, creating snapshots, and combining multiple physical disks into one large virtual one.


    Značky: #Linux

    • chevron_right

      Crafting Minimal Ubuntu Images for Embedded Brilliance

      pubsub.slavino.sk / linuxyournal · Tuesday, 26 March - 15:11 · 1 minute

    Crafting Minimal Ubuntu Images for Embedded Brilliance

    Introduction

    In the vast and evolving landscape of technology, embedded systems stand as silent yet powerful pillars supporting an array of applications, from the simplicity of a digital watch to the complexity of autonomous vehicles. These dedicated computing behemoths often operate within constrained environments, necessitating an operating system that is not just robust but also refined in its minimalism. Enter Ubuntu, a versatile and widely acclaimed Linux distribution, which emerges as an unexpected yet fitting candidate for this purpose. This article delves into the art of constructing minimal Ubuntu images tailored for the unique demands of embedded systems, illuminating the pathway towards enhanced performance, fortified security, and streamlined maintenance.

    Understanding the Core of Minimalism in Embedded Systems

    Embedded systems are intricately designed to perform specific tasks, where every millisecond of processing time and every byte of memory counts. In such a landscape, Ubuntu, known for its user-friendly approach and comprehensive support, may not seem like the obvious choice. However, its adaptability and the vast repository of packages make Ubuntu a prime candidate for customization into a lean operating system footprint suitable for embedded applications. The quest for minimalism isn't merely about shedding weight; it's about achieving the pinnacle of efficiency and security.

    The Pillars of Performance Enhancement

    A minimal Ubuntu image, stripped of unnecessary packages and services, boots faster and runs more efficiently, allowing embedded systems to dedicate more resources to their primary functions. This streamlined approach ensures that embedded devices can operate within their limited computational and memory capacities without compromising on their core functionalities.

    The Fortress of Security

    In the realm of embedded systems, where devices often operate in critical and sometimes inaccessible environments, security is paramount. A minimal Ubuntu image inherently possesses fewer vulnerabilities, as each removed package eliminates potential entry points for attackers. This minimalistic approach not only secures the device but also simplifies compliance with stringent security standards.

    The Ease of Updates and Maintenance

    Maintaining embedded systems, particularly those deployed in remote or challenging locations, can be daunting. Minimal Ubuntu images, with their reduced complexity, offer a more manageable solution. Updates are quicker and less intrusive, minimizing system downtime and reducing the risk of update-induced failures.


    Značky: #Linux

    • chevron_right

      Linux Version Odyssey: Navigating Through Time and Technology

      pubsub.slavino.sk / linuxyournal · Thursday, 21 March - 16:00 edit · 1 minute

    Linux Version Odyssey: Navigating Through Time and Technology

    Linux, the cornerstone of modern computing, powers everything from tiny embedded devices to the world's most formidable supercomputers. Its open-source nature has fostered a rich ecosystem of distributions (distros), each tailored to different needs and preferences. However, this diversity also introduces complexity, especially when it comes to managing different versions of Linux over time. This article will navigate you through the labyrinth of past, present, and future Linux versions, equipping you with the knowledge to manage and utilize these systems effectively.

    Understanding Linux Versioning

    Linux versioning might seem daunting at first glance, but it follows a logical structure once understood. Major Linux distributions like Ubuntu, Fedora, and CentOS have their own versioning schemes, typically involving a mix of numbers and, sometimes, names. For example, Ubuntu versions are numbered based on the year and month of release (e.g., Ubuntu 20.04 was released in April 2020), and LTS (Long Term Support) versions are released every two years, offering five years of support.

    Navigating Past Linux Versions

    Older versions of Linux distros often face compatibility issues with newer hardware, limiting their functionality. Additionally, as software evolves, applications may no longer support outdated versions, complicating tasks that require up-to-date software. Moreover, security is a significant concern; older, unsupported versions do not receive security updates, exposing systems to vulnerabilities.

    Maintaining legacy systems securely requires a strategic approach. One can isolate these systems from the internet or use them in a controlled environment. Furthermore, communities and special-interest groups often support older versions, providing patches or advice on managing these systems.

    Embracing Current Linux Versions

    Regular updates are crucial for security and performance. Most Linux distros offer simple commands or graphical interfaces to check and apply updates, ensuring your system is protected and efficient. Transitioning between versions, although daunting, is made manageable through guides provided by most distributions, detailing steps to upgrade without losing data.

    Transitioning requires careful planning. Always back up your data before upgrading. Understand the changes and new features introduced in the new version to adapt quickly and leverage improvements.

    Preparing for Future Linux Versions

    Staying informed about upcoming releases allows users to anticipate changes and prepare accordingly. Engaging with Linux communities and news sources can provide insights into future developments. Additionally, participating in beta testing offers a glimpse into new features and the opportunity to contribute to the Linux ecosystem.


    Značky: #Linux

    • chevron_right

      Integrating Linux and Windows in a Dual-Boot Setup

      pubsub.slavino.sk / linuxyournal · Tuesday, 19 March - 16:00 edit · 1 minute

    Integrating Linux and Windows in a Dual-Boot Setup

    In the realm of computing, the choice between operating systems often feels like a crossroads. Each path—Windows with its widespread application support and user-friendly interface, and Linux with its unparalleled customization and robustness—offers distinct advantages. Yet, why choose one when you can walk both paths? Dual-booting, the practice of hosting Linux and Windows on a single machine, presents a solution. This article delves into the nuanced world of dual-boot systems, unraveling the challenges and laying down step-by-step solutions to integrate Linux and Windows seamlessly.

    Understanding Dual-Boot Systems

    A dual-boot system allows a computer to host two operating systems, giving you the choice of loading one of two (or more) operating systems at startup. This setup is ideal for users who need the robustness and flexibility of Linux for development or programming, alongside the accessibility and application support of Windows. Beyond the versatility, dual-boot systems can also serve as a safety net; if one OS fails, you can boot into the other to troubleshoot or recover data.

    Pre-Installation Considerations

    Before embarking on your dual-boot journey, a few preliminary steps are essential to ensure a smooth setup process.

    Hardware Requirements and Compatibility
    • Check Compatibility: Ensure your hardware is compatible with both Windows and Linux. Most modern hardware supports both, but checking the compatibility lists for your Linux distribution is wise.
    • System Requirements: Verify that your system meets the requirements for both operating systems. Generally, if it can run Windows, Linux won't be a problem.
    Backup Strategies

    Backup your data before proceeding. This can include personal files, application data, and even a full system backup of your current operating system. Tools like Macrium Reflect for Windows or Timeshift for Linux can help.

    Partitioning the Hard Drive

    Partitioning your hard drive is crucial for dual-booting. You'll need separate partitions for each operating system and possibly a shared partition for data accessible by both.

    1. Partition Scheme: Use a tool like GParted to resize your current partitions and create new ones for the second OS.
    2. File Systems: Windows primarily uses NTFS, while Linux favors ext4. For shared data, NTFS is recommended as both systems can access it reliably.
    Installation Order

    Install Windows first, followed by Linux. Windows' bootloader doesn't play nicely with others, whereas Linux's GRUB bootloader can easily add Windows to its boot menu.


    Značky: #Linux

    • chevron_right

      Secure A Multi-Server Security Engine Installation With HTTPS

      pubsub.slavino.sk / linuxyournal · Thursday, 14 March - 16:00 edit · 1 minute

    Secure A Multi-Server Security Engine Installation With HTTPS

    Welcome to the second part of our tutorial on how to set up and secure a multi-server CrowdSec Security Engine installation. In the first part , I walked you through the setup of CrowdSec Security Engines across multiple servers, with one server serving as the parent and two additional machines forwarding alerts to it.

    In this part, I will address security issues posed by clear HTTP communication in the previous multi-server Security Engine installation. To solve this, I propose establishing the communication between Security Engines over encrypted channels. This solution allows server-2 or server-3 to trust the server-1 identity and avoid man-in-the-middle attacks.

    Using self-signed certificates

    Create the certificate

    First, you need to create a certificate. This can be achieved with the following one-liner.

    bash
    openssl req -x509 -newkey rsa:4096 -keyout encrypted-key.pem -out cert.pem -days 365 -addext "subjectAltName = IP:172.31.100.242"
    

    For now, the Security Engine is not able to ask for the passphrase of the private key when starting. So, you have the choice to decipher the private key by hand each time you start or reload the Security Engine or store the key unencrypted. In any way, to strip the passphrase, you can use the following:

    bash
    openssl rsa -in encrypted-key.pem -out key.pem
    

    Then, the unencrypted key file can be safely deleted after the Security Engine is started.

    Configure the Security Engine to use a self-signed certificate

    On server-1 , you need to configure the Security Engine to use the generated certificate. As seen below, the tls.cert_file and tls.key_file options in the api.server section of the following /etc/crowdec/config.yaml excerpt is set to the generated certificate file.

    yaml
    api:
      server:
        log_level: info
        listen_uri: 10.0.0.1:8080
        profiles_path: /etc/crowdsec/profiles.yaml
        online_client: # Crowdsec API credentials (to push signals and receive bad 
    
        tls:
          cert_file: /etc/crowdsec/ssl/cert.pem
          key_file: /etc/crowdsec/ssl/key.pem
    

    On the client side, configuration changes happen in two files. First, modify /etc/crowdec/config.yaml to accept self-signed certificates by setting the insecure_skip_verify to true.

    You also need to change HTTP for HTTPS in the /etc/crowdsec/local_api_credentials.yaml file in order to reflect the changes. This small change has to be done on all three servers ( server-1 , server-2 , and server-3 ).


    Značky: #Linux

    • wifi_tethering open_in_new

      This post is public

      www.linuxjournal.com /content/improve-crowdsec-multi-server-installation-https-between-agents

    • chevron_right

      Unlocking the Power of DPKG with Debian Package Management Skills

      pubsub.slavino.sk / linuxyournal · Thursday, 14 March - 16:00 edit · 1 minute

    Unlocking the Power of DPKG with Debian Package Management Skills

    Introduction

    In the realm of Linux distributions, Debian stands out for its stability, security, and rich repository of software packages. Managing these packages efficiently is fundamental to maintaining system integrity and ensuring software runs smoothly. Central to this management is DPKG, Debian's package manager, a tool that often works behind the scenes but is incredibly powerful when used directly. This guide dives into the world of DPKG, offering insights from basic usage to advanced management techniques.

    Understanding DPKG and Its Ecosystem

    What is DPKG?

    DPKG (Debian Package) is the core package management system in Debian-based Linux distributions. It is responsible for installing, removing, and providing information about .deb packages, the format used by Debian packages.

    The DPKG Ecosystem

    DPKG does not operate in isolation; it is part of a larger ecosystem of tools designed to make package management more manageable and automated. While DPKG deals directly with package files, APT (Advanced Package Tool) and other utilities work at a higher level, handling repositories and automatic dependency resolution. Understanding DPKG's role within this ecosystem is crucial for mastering package management in Debian.

    Setting Up Your Environment for DPKG

    Before delving into DPKG's operations, ensure your Debian system is up-to-date. Running sudo apt update && sudo apt upgrade will refresh your package lists and upgrade the existing packages to their latest versions. Verifying DPKG's installation and version can be achieved with dpkg --version , which is essential for compatibility and troubleshooting.

    Basic DPKG Operations

    Installing Packages

    To install a package, the command sudo dpkg -i package_file.deb is used. This command requires the path to a .deb file, which DPKG will then unpack and install. One of the nuances of using DPKG directly is handling dependencies; DPKG will notify you of any missing dependencies but will not fetch them automatically.

    Removing Packages

    Removing software with DPKG can be done with sudo dpkg -r package_name . If you wish to remove the package along with its configuration files, the purge option ( sudo dpkg -P package_name ) is your go-to command.

    Querying Installed Packages

    To list all installed packages, dpkg -l is incredibly useful. For checking if a specific package is installed, dpkg -l | grep package_name narrows down the search efficiently.


    Značky: #Linux

    • chevron_right

      Setting up a Multi-Server Security Engine Installation

      pubsub.slavino.sk / linuxyournal · Thursday, 14 March - 16:00 edit · 1 minute

    Setting up a Multi-Server Security Engine Installation

    With the launch of Security Engine 1.0.x, we enabled the Security Engine to function as an HTTP REST API, allowing it to gather signals from other Security Engines.

    I will guide you through the steps to set up the CrowdSec Security Engine across multiple servers, where one server will serve as the parent and two additional machines will forward alerts to it.

    Benefits

    Sharing cybersecurity incidents across machines using the CrowdSec Security Engine is a highly effective strategy to enhance collective security defenses. By leveraging CrowdSec's capability to distribute remediations among connected machines, each machine benefits from real-time updates about new threats detected elsewhere in the network.

    Architecture

    CrowdSec Goals Infographic

    In the diagram above, the parent Security Engine, designated as server-1 , will be set up as the HTTP REST API, commonly known as the LAPI (Local API). This engine will be in charge of storing and distributing the gathered signals. Remediation is managed through the Remediation Components , which depend on the LAPI offered by server-1 . It's crucial to understand that mitigation can occur independently from detection.

    Server-2 and server-3 are designated as internet-facing machines that will host services available to the public and will be known as the child Log Processors. On these servers, we will install CrowdSec Security Engine and Remediation Components , which will interact with the server-1 LAPI.

    Note: The phrase child Log Processors refers to a CrowdSec Security Engine that operates with its LAPI turned off. For more information on this, consult our Taxonomy Update Article .

    We strongly encourage you to explore the CrowdSec Hub to learn about the extensive range of services the Security Engine can protect. This platform showcases the diverse capabilities of the Engine in securing everything from web applications to databases against cyber threats.


    Značky: #Linux

    • chevron_right

      How to Optimize Your Linux Kernel with Custom Parameters

      pubsub.slavino.sk / linuxyournal · Tuesday, 12 March - 16:00 edit · 1 minute

    How to Optimize Your Linux Kernel with Custom Parameters

    Linux stands at the heart of countless operating systems, driving everything from personal computers to servers and embedded systems across the globe. Its flexibility and open-source nature allow for extensive customization, much of which is achieved through the adept manipulation of kernel parameters. These boot options are not just tools for the Linux connoisseur but essential instruments for any user seeking to optimize and troubleshoot their systems. This guide demystifies kernel parameters, illustrating their importance, common uses, and methods for modification.

    Understanding Kernel Parameters

    Kernel parameters, often referred to as boot options, are settings or arguments passed to the Linux kernel at the time of system boot. These parameters can control a wide range of system behaviors, from hardware compatibility and device management to system security and performance characteristics. By adjusting these parameters, users can tailor the operating system to meet their specific needs or resolve issues that may arise during the boot process.

    Commonly Used Kernel Parameters

    A myriad of kernel parameters exist, each serving a unique purpose. Some of the most commonly used include:

    • quiet : Reduces the verbosity of the kernel messages during boot, leading to a cleaner boot process. This is useful for users who prefer a minimalistic boot screen.
    • splash : Works in conjunction with quiet to display a graphical boot splash screen instead of textual boot messages.
    • nomodeset : Prevents the kernel from loading video drivers until after the boot process is complete. This parameter can be invaluable when troubleshooting display issues.
    • ro and rw : Dictate whether the root filesystem is mounted as read-only ( ro ) or read-write ( rw ) during boot. ro is often used during system maintenance to protect filesystem integrity.

    How to Modify Kernel Parameters

    Temporary Changes

    For temporary modifications—lasting only for the current boot session—parameters can be adjusted through the boot loader. Here’s how:


    Značky: #Linux

    • chevron_right

      How to Build Custom Linux Live Environments

      pubsub.slavino.sk / linuxyournal · Thursday, 7 March - 17:00 edit · 1 minute

    How to Build Custom Linux Live Environments

    In the vast and versatile world of Linux, the concept of a live environment allows users to run an entire operating system directly from a USB stick or CD without installing it on a computer's hard drive. This portability and flexibility make Linux live environments incredibly valuable for software testing, system rescue, secure browsing, or simply carrying your desktop with you without the need for a laptop. However, the pre-built live environments might not fit all your needs or preferences. That's where creating a custom Linux live environment comes into play, allowing you to tailor everything to your liking. This guide will walk you through the process of crafting your portable operating system, ensuring you have all the tools and knowledge at your disposal.

    Understanding the Foundations

    Live Environments Explained

    A live environment refers to a complete operating system that runs from a removable medium like a USB stick or CD. Unlike a traditional OS installation, it doesn't make changes to the computer's hard drive (unless specifically instructed). It's an ideal solution for trying out different distributions, troubleshooting, or maintaining privacy.

    Why Go Custom?

    Creating a custom live Linux environment allows you to:

    • Include specific software : Tailor the applications and tools to your needs.
    • Customize settings and appearance : Pre-configure network settings, themes, and wallpapers to your preference.
    • Increase portability and convenience : Carry a fully personalized desktop experience in your pocket.

    Preparing for Your Build

    Choosing Your Base

    Selecting the right base distribution is crucial. Popular options include:

    • Ubuntu : Known for its user-friendliness and extensive community support.
    • Fedora : Offers the latest software and features, ideal for those who prefer cutting-edge technology.
    • Debian : Valued for its stability and simplicity, making it a solid choice for beginners and advanced users alike.

    Consider your familiarity with the distribution, its compatibility with your hardware, and the size of its community when making your choice.

    Tools of the Trade

    To create your live environment, you'll need specific tools depending on your base distribution. Some of the most widely used include:


    Značky: #Linux