### Onboarding: Clone repository and install prerequisites Source: https://github.com/aerynos/os-tools/blob/main/README.md Commands to clone the os-tools repository, install prerequisites on AerynOS, install rustfmt and typos-cli, build boulder and moss with `just get-started`, and configure subuid/subgid support if not already set up. ```bash # clone the AerynOS os-tools repo somewhere reasonable mkdir -pv ~/repos/aos/ cd ~/repos/aos/ git clone https://github.com/AerynOS/os-tools.git cd tools/ # Install a few prerequisites (this how you'd do it on AerynOS) sudo moss it binutils glibc-devel linux-headers clang bsdtar-static cpio # remember to add ~/.cargo/bin to your $PATH if this is how you installed rustfmt cargo install rustfmt cargo install typos-cli --locked # from inside the moss clone, this will build boulder and moss # and install them to ${HOME}/.local/bin/ by default just get-started # boulder and moss rely on so-called subuid and subgid support. # IFF you do not already have this set up for your ${USER} in /etc/subuid and /etc/subuid # you might want to do something similar to this: sudo touch /etc/sub{uid,gid} sudo usermod --add-subuids 1000000-1065535 --add-subgids 1000000-1065535 root sudo usermod --add-subuids 1065536-1131071 --add-subgids 1065536-1131071 ${USER} ``` -------------------------------- ### Get started with moss and set up aosroot Source: https://github.com/aerynos/os-tools/blob/main/README.md Run the initial setup with 'just get-started', create the 'aosroot/' directory, add the unstable repository, list available packages, and install systemd, bash, and libx11-32bit. The '-D aosroot/' argument is required to specify a root directory to avoid affecting the current OS. ```bash just get-started # create the aosroot/ directory mkdir -pv aosroot/ # Add the unstable repo moss -D aosroot/ repo add unstable https://cdn.aerynos.dev/stream/unstable/x86_64/stone.index # List packages moss -D aosroot/ list available # Install something moss -D aosroot/ install systemd bash libx11-32bit ``` -------------------------------- ### f2fs cold cache: remove and install nano Source: https://github.com/aerynos/os-tools/blob/main/moss-filesystem-performance.md Commands to drop caches and then remove and install the nano package on an f2fs filesystem with a cold cache. The output shows the time taken to blit entries: 73.20s for removal and 73.98s for installation. ```bash # Performance CPU governor 󰌽 ermo@blueshift:~ ❯ sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches 3 󰌽 ermo@blueshift:~ ❯ sudo moss rm nano The following package(s) will be removed: nano 8.3-33 ✔ Do you wish to continue? · yes Removed nano 231613 entries blitted in 73.20s (3.2k / s) ``` ```bash 󰌽 ermo@blueshift:~ ❯ sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches 3 󰌽 ermo@blueshift:~ ❯ sudo moss it nano The following package(s) will be installed: nano 8.3-33 ✔ Do you wish to continue? · yes Installed nano (cached) 231707 entries blitted in 73.98s (3.1k / s) ``` -------------------------------- ### xfs cold cache: remove and install nano Source: https://github.com/aerynos/os-tools/blob/main/moss-filesystem-performance.md Commands to drop caches and then remove and install the nano package on an xfs filesystem with a cold cache. The output shows the time taken to blit entries: 11.85s for removal and 12.01s for installation. ```bash # balanced CPU governor 󰌽 ermo@blueshift:~ ❯ sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && sudo moss rm -y nano 3 The following package(s) will be removed: nano 8.3-33 Removed nano 231613 entries blitted in 11.85s (19.5k / s) ``` ```bash 󰌽 ermo@blueshift:~ ❯ sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && sudo moss it -y nano 3 The following package(s) will be installed: nano 8.3-33 Installed nano (cached) 231707 entries blitted in 12.01s (19.3k / s) ``` -------------------------------- ### f2fs hot cache: remove and install nano Source: https://github.com/aerynos/os-tools/blob/main/moss-filesystem-performance.md Commands to remove and install the nano package on an f2fs filesystem with a hot cache. The output shows the time taken to blit entries: 8.27s for removal and 7.84s for installation. ```bash # Performance CPU governor 󰌽 ermo@blueshift:/run/media/ermo/5305e180-315c-4ecd-9b92-813de85eb68d/home/ermo/󰈙 ❯ sudo moss rm nano [sudo: authenticate] Password: The following package(s) will be removed: nano 8.3-33 ✔ Do you wish to continue? · yes Removed nano 231613 entries blitted in 8.27s (28.0k / s) ``` ```bash 󰌽 ermo@blueshift:/run/media/ermo/5305e180-315c-4ecd-9b92-813de85eb68d/home/ermo/󰈙 ❯ sudo moss it nano The following package(s) will be installed: nano 8.3-33 ✔ Do you wish to continue? · yes Installed nano (cached) 231707 entries blitted in 7.84s (29.5k / s) ``` -------------------------------- ### ext4 cold cache: remove and install nano Source: https://github.com/aerynos/os-tools/blob/main/moss-filesystem-performance.md Commands to drop caches and then remove and install the nano package on an ext4 filesystem with a cold cache. The output shows the time taken to blit entries: 63.34s for removal and 62.60s for installation. ```bash # balanced CPU governor 󰌽 ermo@blueshift:~ ❯ sudo sync && echo 3 |sudo tee /proc/sys/vm/drop_caches 3 󰌽 ermo@blueshift:~ ❯ sudo moss rm nano The following package(s) will be removed: nano 8.3-33 ✔ Do you wish to continue? · yes Removed nano 231613 entries blitted in 63.34s (3.7k / s) ``` ```bash 󰌽 ermo@blueshift:~ ❯ sudo sync && echo 3 |sudo tee /proc/sys/vm/drop_caches 3 󰌽ermo@blueshift:~ ❯ sudo moss it nano The following package(s) will be installed: nano 8.3-33 ✔ Do you wish to continue? · yes Installed nano (cached) 231707 entries blitted in 62.60s (3.7k / s) ``` -------------------------------- ### xfs hot cache: remove and install nano Source: https://github.com/aerynos/os-tools/blob/main/moss-filesystem-performance.md Commands to remove and install the nano package on an xfs filesystem with a hot cache. The output shows the time taken to blit entries: 6.06s for removal and 6.13s for installation. ```bash # balanced CPU governor 󰌽 ermo@blueshift:~ ❯ sudo moss rm nano The following package(s) will be removed: nano 8.3-33 ✔ Do you wish to continue? · yes Removed nano 231613 entries blitted in 6.06s (38.2k / s) ``` ```bash 󰌽 ermo@blueshift:~ ❯ sudo moss it -y nano The following package(s) will be installed: nano 8.3-33 Installed nano (cached) 231707 entries blitted in 6.13s (37.8k / s) ``` -------------------------------- ### ext4 hot cache: remove and install nano Source: https://github.com/aerynos/os-tools/blob/main/moss-filesystem-performance.md Commands to remove and install the nano package on an ext4 filesystem with a hot cache. The output shows the time taken to blit entries: 5.58s for removal and 5.99s for installation. ```bash # balanced CPU governor 󰌽 ermo@blueshift:~ ❯ sudo moss rm nano The following package(s) will be removed: nano 8.3-33 ✔ Do you wish to continue? · yes Removed nano 231613 entries blitted in 5.58s (41.5k / s) ``` ```bash 󰌽 ermo@blueshift:~ ❯ sudo moss it nano The following package(s) will be installed: nano 8.3-33 ✔ Do you wish to continue? · yes Installed nano (cached) 231707 entries blitted in 5.99s (38.7k / s) ``` -------------------------------- ### System details: fdisk, lsblk, and CPU info Source: https://github.com/aerynos/os-tools/blob/main/moss-filesystem-performance.md Commands to display disk partition layout, filesystem information, and CPU model. The output shows the disk is a Toshiba SATA SSD with GPT partition table, containing EFI, extended boot, and Linux root partitions (f2fs). ```bash 󰌽 ermo@blueshift:~ ❯ sudo fdisk -l /dev/sdb Disk /dev/sdb: 119,24 GiB, 128035676160 bytes, 250069680 sectors Disk model: TOSHIBA THNSNH12 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 450D5CFC-C712-43DF-A6F9-5A8B05D058F3 Device Start End Sectors Size Type /dev/sdb1 2048 526335 524288 256M EFI System /dev/sdb2 526336 8914943 8388608 4G Linux extended boot /dev/sdb3 8914944 250068991 241154048 115G Linux root (x86-64) ``` ```bash 󰌽 ermo@blueshift:~ ❯ sudo lsblk -f /dev/sdb NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS sdb ├─sdb1 vfat FAT16 2D82-2EC6 ├─sdb2 vfat FAT32 2F6C-E5A6 └─sdb3 f2fs 1.16 94,7G 18% / ``` ```bash 󰌽 ermo@blueshift:~ ❯ grep 'model name' /proc/cpuinfo |uniq model name : Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz ``` -------------------------------- ### Run tests and lint before committing Source: https://github.com/aerynos/os-tools/blob/main/README.md Run 'just test' to ensure all tests pass locally, which includes the 'just lint' target. Apply clippy fixes with 'just fix' before pushing changes. ```bash $ just test # Prior to committing a change: $ just test # includes the just lint target # Prior to pushing anything, apply clippy fixes: $ just fix ``` -------------------------------- ### Build boulder with Cargo Source: https://github.com/aerynos/os-tools/blob/main/boulder/README.md Builds the boulder package using Cargo. Produces a debug build by default, available at ./target/debug/boulder. ```shell cargo build -p boulder ``` -------------------------------- ### Boulder alias for non-AerynOS hosts Source: https://github.com/aerynos/os-tools/blob/main/README.md Alias for boulder that specifies the data, config, and moss root directories. Required when building .stones on a non-AerynOS host system, as the default locations are not used. ```bash alias boulder="${HOME}/.local/bin/boulder --data-dir=${HOME}/.local/share/boulder/ --config-dir=${HOME}/.config/boulder/ --moss-root=${HOME}/.cache/boulder/" ```