### Install Project Dependencies Source: https://wiki.almalinux.org/documentation/sbom-guide.html Installs the project's dependencies, including immudb-wrapper, from the setup configuration. ```bash pip install . ``` -------------------------------- ### Start AlmaLinux OS via WSL Command Source: https://wiki.almalinux.org/documentation/wsl.html Launches a specific installed AlmaLinux distribution from the command line. Replace 'AlmaLinux-10' with the distribution you wish to start. ```bash wsl -d AlmaLinux-10 ``` -------------------------------- ### Get Information on Server with GUI Package Group Source: https://wiki.almalinux.org/documentation/after-installation-guide.html View the list of packages included in the 'Server with GUI' group before installation. ```bash dnf group info "Server with GUI" ``` -------------------------------- ### Start Installed AlmaLinux Distribution Source: https://wiki.almalinux.org/documentation/wsl.html Launch your installed AlmaLinux distribution using its specific name. This can be done via Windows Terminal or the command line. ```bash wsl -d AlmaLinux-10-x64_v2 ``` -------------------------------- ### Install Server with GUI Package Group Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the 'Server with GUI' package group, which includes the GNOME Desktop Environment. ```bash sudo dnf groupinstall "Server with GUI" ``` -------------------------------- ### Start Firewall Service Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Start the firewalld service to activate the firewall. ```bash sudo systemctl start firewalld ``` -------------------------------- ### Install XFCE Desktop Environment Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the XFCE Desktop Environment on your AlmaLinux system. ```bash sudo dnf groupinstall "Xfce" ``` -------------------------------- ### Get Information on Workstation Package Group Source: https://wiki.almalinux.org/documentation/after-installation-guide.html View the list of packages included in the 'Workstation' group before installation. ```bash dnf group info "Workstation" ``` -------------------------------- ### Install AlmaLinux OS from File Source: https://wiki.almalinux.org/documentation/wsl.html Use this command to install AlmaLinux OS from a downloaded .wsl file. Ensure you have the correct file path and version. ```bash wsl --install --from-file AlmaLinux-10.1_x64_v2_.wsl ``` -------------------------------- ### Install SCAP Workbench Source: https://wiki.almalinux.org/documentation/openscap-guide.html Install SCAP Workbench and the scap-security-guide package using dnf. Ensure all dependencies are automatically handled. ```bash sudo dnf install scap-workbench ``` -------------------------------- ### Install KDE Plasma Workspaces Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the KDE Plasma Desktop Environment on your AlmaLinux system. ```bash sudo dnf groupinstall "KDE Plasma Workspaces" ``` -------------------------------- ### Install GNOME with Server Components Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Installs a more comprehensive GNOME environment that includes server functionalities. Use this for a fuller desktop experience. ```bash dnf groupinstall "Server with GUI" ``` -------------------------------- ### Install NVIDIA GPU Driver Source: https://wiki.almalinux.org/documentation/nvidia.html Install the minimal packages required for the NVIDIA GPU driver to function. For a more complete installation, use 'sudo dnf install nvidia-open'. ```bash sudo dnf install nvidia-open-kmod nvidia-driver ``` -------------------------------- ### Install GNOME Desktop Environment Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Installs a minimal GNOME desktop environment on the AlmaLinux system. This is for users who installed a standard image and want to add a GUI. ```bash dnf groupinstall gnome-desktop ``` -------------------------------- ### Install Workstation Package Group Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the 'Workstation' package group, which also includes the GNOME Desktop Environment. ```bash sudo dnf groupinstall "Workstation" ``` -------------------------------- ### Install Fedora Media Writer on Linux Source: https://wiki.almalinux.org/documentation/installation-guide.html Installs the Fedora Media Writer application using Flatpak. This GUI tool can be used to create USB installation media from ISO images. ```bash flatpak install flathub org.fedoraproject.MediaWriter ``` -------------------------------- ### Install AlmaLinux OS via WSL Source: https://wiki.almalinux.org/documentation/wsl.html Installs a specified AlmaLinux OS version using the WSL installation command. Replace 'AlmaLinux-10' with your desired version. ```bash wsl --install AlmaLinux-10 ``` -------------------------------- ### Install CUDA SDK Source: https://wiki.almalinux.org/documentation/nvidia.html Install the CUDA SDK, which provides a comprehensive set of tools and libraries for GPU-accelerated computing. ```bash sudo dnf install cuda ``` -------------------------------- ### Install WSL Without Distribution Source: https://wiki.almalinux.org/documentation/wsl.html Installs the core WSL components on your system, preparing it for Linux distribution installation. A system restart is required after execution. ```bash wsl --install --no-distribution ``` -------------------------------- ### Install NVIDIA Drivers Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the NVIDIA drivers using the akmod-nvidia package after enabling the RPM Fusion repository. ```bash sudo dnf install akmod-nvidia ``` -------------------------------- ### SPDX SBOM Example Output Source: https://wiki.almalinux.org/documentation/sbom-guide.html An example of a Software Bill of Materials (SBOM) in SPDX format, detailing build and package information. ```json { "SPDXID": "SPDXRef-DOCUMENT", "annotations": [ { "annotationDate": "2024-09-13T12:43:11Z", "annotationType": "OTHER", "annotator": "Tool: alma-sbom 0.0.2", "comment": "almalinux:albs:build:ID=17812" }, { "annotationDate": "2024-09-13T12:43:11Z", "annotationType": "OTHER", "annotator": "Tool: alma-sbom 0.0.2", "comment": "almalinux:albs:build:URL=https://build.almalinux.org/build/17812" }, { "annotationDate": "2024-09-13T12:43:11Z", "annotationType": "OTHER", "annotator": "Tool: alma-sbom 0.0.2", "comment": "almalinux:albs:build:timestamp=2024-09-03T13:17:19.527127" } ], "creationInfo": { "created": "2024-09-13T12:43:11Z", "creators": [ "Organization: AlmaLinux OS Foundation (cloud-infra@almalinux.org)", "Tool: AlmaLinux Build System 0.1", "Tool: alma-sbom 0.0.2", "Tool: Immudb Wrapper 0.1.2", "Tool: spdx-tools 0.8" ] }, "dataLicense": "CC0-1.0", "name": "build-17812", "spdxVersion": "SPDX-2.3", "documentNamespace": "https://security.almalinux.org/spdx-build-17812-e1b3e264-6c82-4052-b42d-fb88de7ef2bc", "packages": [ { "SPDXID": "SPDXRef-0", "annotations": [ { "annotationDate": "2024-09-13T12:43:11Z", "annotationType": "OTHER", "annotator": "Tool: alma-sbom 0.0.2", "comment": "almalinux:package:epoch=1" }, ... { "annotationDate": "2024-09-13T12:43:11Z", "annotationType": "OTHER", "annotator": "Tool: alma-sbom 0.0.2", "comment": "almalinux:sbom:immudbHash=f8e2a823ffc9fe9311dac3e3a50c349c3a0689b951656fefa955cd4405ddf510" } ] } ] } ``` -------------------------------- ### Enable Firewall Service on Boot Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Configure the firewalld service to start automatically every time the system boots. ```bash sudo systemctl enable firewalld ``` -------------------------------- ### Install AMD Drivers Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the AMD drivers using the akmod-amdgpu package after enabling the RPM Fusion repository. ```bash sudo dnf install akmod-amdgpu ``` -------------------------------- ### List Available Linux Distributions Source: https://wiki.almalinux.org/documentation/wsl.html Shows all Linux distributions available for installation via the WSL tool. Use this to find the exact name for installation. ```bash wsl --list --online ``` ```bash wsl -l -o ``` -------------------------------- ### List Installed WSL Distributions Source: https://wiki.almalinux.org/documentation/wsl.html Displays all currently installed WSL distributions along with their state and version. Useful for verifying installations. ```bash wsl --list --verbose ``` ```bash wsl -l -v ``` -------------------------------- ### Install NVIDIA Driver Repository Source: https://wiki.almalinux.org/documentation/nvidia.html Enable the AlmaLinux NVIDIA driver repository, CRB, CUDA, and EPEL repositories. This is the first step before installing the drivers. ```bash sudo dnf install almalinux-release-nvidia-driver ``` -------------------------------- ### Install Pantheon Desktop Environment for AlmaLinux 9 Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the Pantheon Desktop Environment on AlmaLinux 9 after enabling the necessary repositories. ```bash sudo dnf groupinstall "Pantheon Desktop" ``` -------------------------------- ### Generate Security Guide Source: https://wiki.almalinux.org/documentation/openscap-guide-for-9 Create a full security guide for your system based on an XCCDF profile using `oscap xccdf generate guide`. This command generates an HTML report that includes security-relevant configuration settings and potential remediation scripts. Remember to test remediation scripts in a controlled environment. ```bash sudo oscap xccdf generate guide --profile hipaa --fetch-remote-resources \/usr/share/xml/scap/ssg/content/ssg-almalinux9-ds.xml > ~/report/security_guide.html ``` -------------------------------- ### Develop and Preview Wiki Documentation Locally Source: https://wiki.almalinux.org Run this command to test your documentation updates in a local development environment before submitting pull requests. Ensure you have the necessary build tools installed. ```bash yarn docs:dev ``` -------------------------------- ### Install SCAP Packages Source: https://wiki.almalinux.org/documentation/openscap-guide.html Installs necessary SCAP packages for AlmaLinux 8 using the dnf package manager. The `openscap-scanner` package is installed as a dependency. ```bash sudo dnf install openscap openscap-utils scap-security-guide ``` -------------------------------- ### Wi-Fi Network Configuration with cloud-init (Unsupported) Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Example of Wi-Fi configuration using `network-config` for dynamic IP. Note that this specific method is not supported in AlmaLinux Raspberry Pi images. Use `nmcli` for Wi-Fi connections. ```yaml version: 2 wifis: wlan0: dhcp4: true optional: true access-points: "Wi-Fi_SSID": password: "Wi-Fi_PreSharedKey" ``` -------------------------------- ### Install nvidia-smi Utility Source: https://wiki.almalinux.org/documentation/nvidia.html Install the nvidia-smi utility, which provides information about your GPU(s). This utility is part of the nvidia-driver-cuda package. ```bash sudo dnf install nvidia-driver-cuda ``` -------------------------------- ### Install Firewall Management Tool Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the firewalld package, which is the default firewall management tool for AlmaLinux. ```bash sudo dnf install firewalld ``` -------------------------------- ### Install rpi-eeprom Package Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Install the `rpi-eeprom` package to manage Raspberry Pi bootloader configuration, including boot order. This is an optional package not pre-installed. ```bash dnf install -y rpi-eeprom ``` -------------------------------- ### Update System Packages Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Run this command to install all available system updates, including security patches. ```bash sudo dnf update ``` -------------------------------- ### Example Output of oscap info Source: https://wiki.almalinux.org/documentation/openscap-guide-for-9 This is an example of the output generated by the 'oscap info' command, detailing the document type, stream information, available profiles, and referenced check files. It also highlights warnings about remote resource fetching. ```text Document type: Source Data Stream Imported: 2022-05-25T01:55:58 Stream: scap_org.open-scap_datastream_from_xccdf_ssg-almalinux9-xccdf-1.2.xml Generated: (null) Version: 1.3 Checklists: Ref-Id: scap_org.open-scap_cref_ssg-almalinux9-xccdf-1.2.xml WARNING: Datastream component 'scap_org.open-scap_cref_oval-org.almalinux.alsa-9.xml.bz2' points out to the remote 'https://security.almalinux.org/oval/org.almalinux.alsa-9.xml.bz2'. Use the '--fetch-remote-resources' option to download it. WARNING: Skipping 'https://security.almalinux.org/oval/org.almalinux.alsa-9.xml.bz2' file which is referenced from datastream Status: draft Generated: 2022-05-24 Resolved: true Profiles: Title: ANSSI-BP-028 (enhanced) Id: xccdf_org.ssgproject.content_profile_anssi_bp28_enhanced Title: ANSSI-BP-028 (high) Id: xccdf_org.ssgproject.content_profile_anssi_bp28_high Title: ANSSI-BP-028 (intermediary) Id: xccdf_org.ssgproject.content_profile_anssi_bp28_intermediary Title: ANSSI-BP-028 (minimal) Id: xccdf_org.ssgproject.content_profile_anssi_bp28_minimal Title: [DRAFT] CIS AlmaLinux 9 Benchmark for Level 2 - Server Id: xccdf_org.ssgproject.content_profile_cis Title: [DRAFT] CIS AlmaLinux 9 Benchmark for Level 1 - Server Id: xccdf_org.ssgproject.content_profile_cis_server_l1 Title: [DRAFT] CIS AlmaLinux 9 Benchmark for Level 1 - Workstation Id: xccdf_org.ssgproject.content_profile_cis_workstation_l1 Title: [DRAFT] CIS AlmaLinux 9 Benchmark for Level 2 - Workstation Id: xccdf_org.ssgproject.content_profile_cis_workstation_l2 Title: [DRAFT] Unclassified Information in Non-federal Information Systems and Organizations (NIST 800-171) Id: xccdf_org.ssgproject.content_profile_cui Title: Australian Cyber Security Centre (ACSC) Essential Eight Id: xccdf_org.ssgproject.content_profile_e8 Title: Health Insurance Portability and Accountability Act (HIPAA) Id: xccdf_org.ssgproject.content_profile_hipaa Title: Australian Cyber Security Centre (ACSC) ISM Official Id: xccdf_org.ssgproject.content_profile_ism_o Title: [DRAFT] Protection Profile for General Purpose Operating Systems Id: xccdf_org.ssgproject.content_profile_ospp Title: PCI-DSS v3.2.1 Control Baseline for Red Hat Enterprise Linux 9 Id: xccdf_org.ssgproject.content_profile_pci-dss Title: [DRAFT] DISA STIG for Red Hat Enterprise Linux 9 Id: xccdf_org.ssgproject.content_profile_stig Title: [DRAFT] DISA STIG with GUI for Red Hat Enterprise Linux 9 Id: xccdf_org.ssgproject.content_profile_stig_gui Referenced check files: ssg-almalinux9-oval.xml system: http://oval.mitre.org/XMLSchema/oval-definitions-5 ssg-almalinux9-ocil.xml system: http://scap.nist.gov/schema/ocil/2 oval-org.almalinux.alsa-9.xml.bz2 system: http://oval.mitre.org/XMLSchema/oval-definitions-5 Checks: Ref-Id: scap_org.open-scap_cref_ssg-almalinux9-oval.xml Ref-Id: scap_org.open-scap_cref_ssg-almalinux9-ocil.xml Ref-Id: scap_org.open-scap_cref_--builddir--build--BUILD--scap-security-guide-0.1.60--build--ssg-almalinux9-cpe-oval.xml Ref-Id: scap_org.open-scap_cref_oval-org.almalinux.alsa-9.xml.bz2 Dictionaries: Ref-Id: scap_org.open-scap_cref_--builddir--build--BUILD--scap-security-guide-0.1.60--build--ssg-almalinux9-cpe-dictionary.xml ``` -------------------------------- ### Example XCCDF Scan Output Source: https://wiki.almalinux.org/documentation/openscap-guide.html Example output from an XCCDF scan, showing the status of various security rules. ```text Title Verify File Hashes with RPM Rule rpm_verify_hashes Result pass Title Verify and Correct File Permissions with RPM Rule rpm_verify_permissions Result fail Title Configure SSH to use System Crypto Policy Rule configure_ssh_crypto_policy Result pass ... Title Remove Rsh Trust Files Rule no_rsh_trust_files Result pass Title Disable KDump Kernel Crash Analyzer (kdump) Rule service_kdump_disabled Result fail ``` -------------------------------- ### List Available Package Groups Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Use this command to see all available package groups that can be installed on your AlmaLinux system. ```bash sudo dnf group list ``` -------------------------------- ### Enable RPM Fusion Repository (AlmaLinux 8) Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the RPM Fusion repository configuration for AlmaLinux 8 to access additional software packages. ```bash sudo dnf install https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm ``` -------------------------------- ### Enable EPEL and PowerTools/CRB Repositories for AlmaLinux 8 Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Enable the PowerTools repository and install the EPEL release package on AlmaLinux 8 to access additional software. ```bash sudo dnf config-manager --set-enabled powertools sudo dnf install epel-release ``` -------------------------------- ### Generate XCCDF Security Guide Source: https://wiki.almalinux.org/documentation/openscap-guide.html Create a full security guide for a system based on an XCCDF profile using the oscap utility. The output is an HTML file. ```bash oscap xccdf generate guide --profile hipaa \ --cpe /usr/share/xml/scap/ssg/content/ssg-almalinux8-cpe-dictionary.xml \ /usr/share/xml/scap/ssg/content/ssg-almalinux8-xccdf.xml > ~/report/security_guide.html ``` -------------------------------- ### Enable RPM Fusion Repository (AlmaLinux 9) Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Install the RPM Fusion repository configuration for AlmaLinux 9 to access additional software packages. ```bash sudo dnf install https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-9.noarch.rpm ``` -------------------------------- ### CycloneDX SBOM Example Output Source: https://wiki.almalinux.org/documentation/sbom-guide.html This is an example of a Software Bill of Materials (SBOM) generated in the CycloneDX format. It includes metadata about the build, the generating tools, and a list of components with their properties, hashes, CPE, and PURL. ```json { "$schema": "http://cyclonedx.org/schema/bom-1.4.schema.json", # schema version from CycloneDX "bomFormat": "CycloneDX", # SBOM format CycloneDX "specVersion": "1.4", "serialNumber": "urn:uuid:fb4f1edb-b227-4609-baae-9be629230e0e", "version": 2, "metadata": { "timestamp": "2024-09-13T10:05:25.686513+00:00", # timestamp when the SBOM record was generated "tools": [ { "vendor": "AlmaLinux OS Foundation", "name": "AlmaLinux Build System", "version": "0.1" }, { "vendor": "AlmaLinux OS Foundation", "name": "Immudb Wrapper", "version": "0.1.2" }, { "vendor": "AlmaLinux OS Foundation", "name": "alma-sbom", "version": "0.0.2" }, { "vendor": "CycloneDX", "name": "cyclonedx-python-lib", "version": "2.7.1", "externalReferences": [ { "url": "https://github.com/CycloneDX/cyclonedx-python-lib/actions", "type": "build-system" }, ... { "url": "https://cyclonedx.org", "type": "website" } ] } ], "component": { "type": "library", "bom-ref": "c60e926a-11f5-483b-aadc-582ce451fb07", "author": "eabdullin1 <55892454+eabdullin1@users.noreply.github.com>", "name": "build-17812", "properties": [ { "name": "almalinux:albs:build:ID", "value": "17812" }, { "name": "almalinux:albs:build:URL", "value": "https://build.almalinux.org/build/17812" }, { "name": "almalinux:albs:build:timestamp", "value": "2024-09-03T13:17:19.527127" } ] } }, "components": [ { "type": "library", "bom-ref": "7e44ddb0-86f7-4d1f-96a4-685f0725e3da", "publisher": "AlmaLinux OS Foundation", "name": "nginx", "version": "1.20.1", "hashes": [ { "alg": "SHA-256", "content": "f8e2a823ffc9fe9311dac3e3a50c349c3a0689b951656fefa955cd4405ddf510" } ], "cpe": "cpe:2.3:a:almalinux:nginx:1\:1.20.1-16.el9_4.1:*:*:*:*:*:*:*", "purl": "pkg:rpm/almalinux/nginx@1.20.1-16.el9_4.1?arch=x86_64&epoch=1", "properties": [ { "name": "almalinux:albs:build:ID", "value": "17812" }, ... { "name": "almalinux:albs:build:source:gitCommitImmudbHash", "value": "911945c71710c83cf6f760447c32d8d6cae737dc" }, ... ] }, ... ``` -------------------------------- ### Enable EPEL and CRB Repositories for AlmaLinux 9 Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Enable the CRB repository and install the EPEL release package on AlmaLinux 9 to access additional software. ```bash sudo dnf config-manager --set-enabled crb sudo dnf install epel-release ``` -------------------------------- ### Run Fedora Media Writer on Linux Source: https://wiki.almalinux.org/documentation/installation-guide.html Launches the Fedora Media Writer application after it has been installed. This application is used for creating bootable USB drives. ```bash flatpak run org.fedoraproject.MediaWriter ``` -------------------------------- ### Check WSL Version Source: https://wiki.almalinux.org/documentation/wsl.html Displays the installed WSL version. Use this to compare against the latest stable releases for updates. ```bash wsl --version ``` -------------------------------- ### Verify ISO Checksum on Windows Source: https://wiki.almalinux.org/documentation/installation-guide.html Compares the checksum of the downloaded ISO file with the expected checksum to ensure integrity. This is a preliminary step before creating installation media. ```bash C:\> findstr /i /r /c:"SHA256.*AlmaLinux-9-latest-x86_64-dvd.iso" CHECKSUM SHA256 (AlmaLinux-9-latest-x86_64-dvd.iso) = 2a44e3f8a012c132da19b9aae2bf949e20b116f0a2a7ac3eca111972f4ac952f ``` -------------------------------- ### Static Wired Network Configuration with cloud-init Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Configure a static IPv4 address for the `eth0` interface using a `network-config` file. This setup includes DHCP disabled, an optional interface, a specific IP address, gateway, and DNS servers. ```yaml version: 2 etherlands: eth0: dhcp4: false optional: true addresses: - 192.168.1.99/24 gateway4: 192.168.1.1 nameservers: addresses: - 8.8.8.8 - 8.8.4.4 ``` -------------------------------- ### Set Default Boot Target to Graphical Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Configures the system to boot into the graphical target by default. This ensures the GNOME desktop environment starts automatically on reboot. ```bash systemctl set-default graphical ``` -------------------------------- ### Example OVAL Scan Output Source: https://wiki.almalinux.org/documentation/openscap-guide.html Example output from an OVAL scan, indicating whether definitions are met (false) or unmet (true). A 'false' result means the patch is applied. ```text Definition oval:org.almalinux.alsa:def:20224887: false Definition oval:org.almalinux.alsa:def:20224872: true Definition oval:org.almalinux.alsa:def:20224855: false ... Definition oval:org.almalinux.alsa:def:20224769: false ... Evaluation done. ``` -------------------------------- ### Display Available OpenSCAP Profiles Source: https://wiki.almalinux.org/documentation/openscap-guide-for-9 Use the 'oscap info' command to list all security profiles supported by the SCAP Security Guide for AlmaLinux 9. This command requires the path to the security content data stream file. ```bash oscap info /usr/share/xml/scap/ssg/content/ssg-almalinux9-ds.xml ``` -------------------------------- ### View Profile Information Source: https://wiki.almalinux.org/documentation/openscap-guide-for-9 Use the `--profile` option to get detailed information about a specific XCCDF profile. This is useful for understanding the security controls within a profile before applying it. ```bash oscap info --profile xccdf_org.ssgproject.content_profile_hipaa /usr/share/xml/scap/ssg/content/ssg-almalinux9-ds.xml ``` -------------------------------- ### AlmaLinux 9.1 Raspberry Pi Boot Log Source: https://wiki.almalinux.org/documentation/raspberry-pi.html This is a snippet of the boot log from an AlmaLinux 9.1 installation on a Raspberry Pi 3 Model B+. It shows the kernel version, machine model, memory configuration, and initial system setup messages. ```log [ 0.000000] Linux version 6.1.23-v8.1.el9 (mockbuild@2bfe3a8b75a540939bf2bf4aa27f3116) (gcc (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2), GNU ld version 2.35.2-24.el9) #1 SMP PREEMPT Tue Apr 25 17:13:15 UTC 2023 [ 0.000000] Machine model: Raspberry Pi 3 Model B+ [ 0.000000] efi: UEFI not found. [ 0.000000] Reserved memory: created CMA memory pool at 0x0000000038000000, size 64 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000003bffffff] [ 0.000000] DMA32 empty [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000003bffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003bffffff] [ 0.000000] On node 0, zone DMA: 16384 pages in unavailable ranges [ 0.000000] percpu: Embedded 29 pages/cpu s78440 r8192 d32152 u118784 [ 0.000000] pcpu-alloc: s78440 r8192 d32152 u118784 alloc=29*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: detected: ARM erratum 843419 [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] alternatives: applying boot alternatives [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 241920 [ 0.000000] Kernel command line: rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1 [ 0.000000] Unknown kernel command line parameters "earlyprintk", will be passed to user space. [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 873764K/983040K available (11904K kernel code, 2110K rwdata, 3680K rodata, 4160K init, 1098K bss, 43740K reserved, 65536K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] ftrace: allocating 38901 entries in 152 pages [ 0.000000] ftrace: allocated 152 pages with 3 groups [ 0.000000] trace event string verifier disabled [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] Root IRQ handler: bcm2836_arm_irqchip_handle_irq [ 0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention. [ 0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0x1ffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns [ 0.000095] sched_clock: 57 bits at 63MHz, resolution 16ns, wraps every 4398046511096ns [ 0.011254] Console: colour dummy device 80x25 [ 0.013014] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=250000) [ 0.013276] pid_max: default: 32768 minimum: 301 [ 0.014509] LSM: Security Framework initializing [ 0.015789] SELinux: Initializing. [ 0.015840] SELinux: CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE is non-zero. This is deprecated and will be rejected in a future kernel release. [ 0.015890] SELinux: https://github.com/SELinuxProject/selinux-kernel/wiki/DEPRECATE-checkreqprot [ 0.020336] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.020428] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear) [ 0.042129] cgroup: Disabling memory control group subsystem [ 0.075459] cblist_init_generic: Setting adjustable number of callback queues. [ 0.075662] cblist_init_generic: Setting shift to 2 and lim to 1. [ 0.076421] cblist_init_generic: Setting shift to 2 and lim to 1. [ 0.077309] cblist_init_generic: Setting shift to 2 and lim to 1. [ 0.079850] rcu: Hierarchical SRCU implementation. [ 0.079930] rcu: Max phase no-delay instances is 1000. [ 0.086830] EFI services will not be available. [ 0.090527] smp: Bringing up secondary CPUs ... [ 0.096550] Detected VIPT I-cache on CPU1 [ 0.097769] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.105304] Detected VIPT I-cache on CPU2 [ 0.105647] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [ 0.110049] Detected VIPT I-cache on CPU3 ``` -------------------------------- ### Open Network Manager Text User Interface Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Launch the nmtui tool to configure network settings on systems without a graphical interface. ```bash nmtui ``` -------------------------------- ### List Enabled Repositories After Changes Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Verify that newly enabled repositories are correctly listed. ```bash dnf repolist enabled ``` -------------------------------- ### Check WSL Status Source: https://wiki.almalinux.org/documentation/wsl.html Verifies the current status of your WSL installation. This command helps confirm that WSL is installed and operational. ```bash wsl --status ``` -------------------------------- ### Check for Security Updates Only Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Use this command to check for and install only security-related updates, ensuring your system is protected against vulnerabilities without installing all available updates. ```bash sudo dnf --security update ``` -------------------------------- ### List Enabled Repositories Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Display a list of all currently enabled repositories on your AlmaLinux system. ```bash dnf repolist ``` -------------------------------- ### Import AlmaLinux 9 GPG Key and Download Checksums Source: https://wiki.almalinux.org/documentation/installation-guide.html Download the AlmaLinux 9 GPG public key and import it for verifying signatures. Also, download the checksums file for ISO verification. ```bash $ curl -O https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-9 $ gpg --import RPM-GPG-KEY-AlmaLinux-9 # download a checksums list $ curl -O https://repo.almalinux.org/almalinux/9/isos/x86_64/CHECKSUM ``` -------------------------------- ### Cloud-init Boot Log Source: https://wiki.almalinux.org/documentation/raspberry-pi.html This log entry indicates the status and completion time of the cloud-init process during the AlmaLinux boot on the Raspberry Pi. It shows the datasource used and the uptime when it finished. ```log [ 241.538302] cloud-init[592]: Cloud-init v. 22.1-9.el9.alma finished at Mon, 20 Mar 2023 00:03:48 +0000. Datasource DataSourceNoCloud [seed=/dev/mmcblk0p1][dsmode=net]. Up 241.33 seconds ``` -------------------------------- ### Update WSL Source: https://wiki.almalinux.org/documentation/wsl.html Updates your WSL installation to the latest available version. If this command fails, alternative update methods are available in the troubleshooting section. ```bash wsl --update ``` -------------------------------- ### Connect to Wi-Fi using nmcli Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Connect to a Wi-Fi network using the `nmcli` command. This is the recommended method for Wi-Fi on AlmaLinux Raspberry Pi images, added to the `user-data` file. ```bash +runcmd: + - nmcli dev wifi connect "Wi-Fi_SSID" password "Wi-Fi_PreSharedKey" ``` -------------------------------- ### Display Available Security Profiles Source: https://wiki.almalinux.org/documentation/openscap-guide.html Use `oscap info` with the path to an XCCDF XML file to list all available security profiles. This helps in understanding the security baselines applicable to the system. ```bash oscap info /usr/share/xml/scap/ssg/content/ssg-almalinux8-xccdf.xml ``` -------------------------------- ### Display Information for a Specific Security Profile Source: https://wiki.almalinux.org/documentation/openscap-guide.html Use `oscap info --profile ` to get detailed information about a particular security profile, including its title, ID, and a description of its security objectives. ```bash oscap info --profile hipaa /usr/share/xml/scap/ssg/content/ssg-almalinux8-xccdf.xml ``` -------------------------------- ### Import PGP Key Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Imports the AlmaLinux OS PGP public key into your GPG keyring. This step is necessary for verifying signatures. ```bash $ gpg --import RPM-GPG-KEY-AlmaLinux-9 ``` -------------------------------- ### In-place Major Version Upgrade (AlmaLinux 9 to 10) Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Attempt an in-place upgrade from AlmaLinux 9 to 10 using `dnf update --releasever=10`. This command is not officially supported for Raspberry Pi images and may yield unpredictable results. A backup is strongly recommended. ```bash rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-10 dnf update --releasever=10 --allowerasing ``` -------------------------------- ### Import AlmaLinux OS PGP Key from Local File Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Imports the AlmaLinux OS PGP public key when it is already stored locally on an AlmaLinux system. This bypasses the download step. ```bash gpg --import /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9 ``` -------------------------------- ### Verify AlmaLinux 9 ISO Checksum on Windows Source: https://wiki.almalinux.org/documentation/installation-guide.html Calculate the SHA256 checksum of the AlmaLinux 9 ISO on Windows using the `certUtil` command and download the checksums file for comparison. ```powershell C:\> certUtil -hashfile C:\AlmaLinux-9-latest-x86_64-dvd.iso SHA256 SHA256 hash of AlmaLinux-9-latest-x86_64-dvd.iso: 2a44e3f8a012c132da19b9aae2bf949e20b116f0a2a7ac3eca111972f4ac952f CertUtil: -hashfile command completed successfully. # download the CHECKSUM file C:\> curl -O https://repo.almalinux.org/almalinux/9/isos/x86_64/CHECKSUM ``` -------------------------------- ### Set System Hostname Source: https://wiki.almalinux.org/documentation/after-installation-guide.html Configure the system's hostname using the hostnamectl command. Replace '[new-hostname]' with your desired hostname. Administrative privileges may be required. ```bash hostnamectl set-hostname [new-hostname] # replace new-hostname with the hostmane to set ``` -------------------------------- ### Edit Raspberry Pi Config for Display Border Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Open the `/boot/config.txt` file using `nano` to modify display settings. This is typically done to fix black borders around the GUI. ```bash sudo nano /boot/config.txt ``` -------------------------------- ### Download AlmaLinux 9 DVD ISO using curl Source: https://wiki.almalinux.org/documentation/installation-guide.html Use the `curl` command to download the AlmaLinux 9 DVD ISO for x86_64 architecture. This command is suitable for Linux, macOS, and Windows. ```bash $ curl -O https://repo.almalinux.org/almalinux/9/isos/x86_64/AlmaLinux-9-latest-x86_64-dvd.iso ``` -------------------------------- ### Display oscap Version and Capabilities Source: https://wiki.almalinux.org/documentation/openscap-guide-for-9 The `oscap -V` command displays supported specifications, capabilities, file paths, inbuilt CPE names, and supported OVAL objects. This is useful for understanding the oscap tool's configuration and supported features. ```bash oscap -V ``` -------------------------------- ### Connect to Wi-Fi Network Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Connects to a specified Wi-Fi network using its SSID. The --ask option prompts for the network password. ```bash $ nmcli --ask dev wifi connect ``` -------------------------------- ### Download OVAL File Source: https://wiki.almalinux.org/documentation/openscap-guide-for-9 Download an OVAL definition file from the AlmaLinux security repository using wget. Choose between the .xml or .xml.bz2 compressed version. ```bash wget https://security.almalinux.org/oval/org.almalinux.alsa-9.xml ``` ```bash wget https://security.almalinux.org/oval/org.almalinux.alsa-9.xml.bz2 ``` -------------------------------- ### Add SSH Public Key with cloud-init Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Add your SSH public key to the default 'almalinux' user for passwordless login. This configuration is done in the `user-data` file before the first boot. ```yaml - #ssh_authorized_keys: + ssh_authorized_keys: # Put here your ssh public keys #- ssh-ed25519 AAAAC3Nz... + - ssh-rsa AAAAB3NzaC1yc2EAAAADAQ... ``` -------------------------------- ### Download AlmaLinux OS PGP Public Key Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Downloads the AlmaLinux OS 9 PGP public key. This is the first step in verifying image integrity. ```bash $ curl -O -s https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux-9 ``` -------------------------------- ### Display OpenSCAP Version and Supported Specifications Source: https://wiki.almalinux.org/documentation/openscap-guide.html Use `oscap -V` to display the version of OpenSCAP and a list of supported security standards (SCAP, XCCDF, OVAL, CPE, etc.). This command also shows paths for schema and CPE files, and lists inbuilt CPE names. ```bash oscap -V ``` -------------------------------- ### Download Checksum and Signature Files Source: https://wiki.almalinux.org/documentation/raspberry-pi.html Downloads the checksum file and its corresponding signature file for image verification. These files are required to validate the integrity of the downloaded image. ```bash $ curl -O -s https://repo.almalinux.org/rpi/9/images/CHECKSUM $ curl -O -s https://repo.almalinux.org/rpi/9/images/CHECKSUM.asc ``` -------------------------------- ### Check Windows Version Source: https://wiki.almalinux.org/documentation/wsl.html Verify your Windows build number to ensure compatibility with WSL. Requires build 19041 or higher for Windows 10. ```bash winver ``` -------------------------------- ### Write ISO to USB on Linux using dd Source: https://wiki.almalinux.org/documentation/installation-guide.html Use the `dd` command to write an ISO image to a USB drive on Linux. Ensure you replace `/dev/sdX` with your actual USB device path. This command overwrites all data on the target USB. ```bash sudo dd if=./AlmaLinux-9-latest-x86_64-dvd.iso of=/dev/sdX status=progress conv=fsync bs=4M ```