From 970177482bea965791737c32374bbc794e232537 Mon Sep 17 00:00:00 2001 From: Sami Ahmed Date: Tue, 11 Aug 2026 01:12:07 -0700 Subject: [PATCH] v0.1.0: Initial SamiOS archiso profile - Basic archiso profile with CLI-only system - Custom 'samios' CLI tool for system management - BIOS (syslinux) and UEFI (grub) boot support - System configuration (hostname, locale, network) - Automated script for first boot - Mirror selection utility - Documentation (README, installation guide, roadmap) - Font policy: excludes fonts with '7777' in name Next: automated installer, desktop environment, testing --- README.md | 57 +++++++ docs/installation.md | 100 +++++++++++++ docs/roadmap.md | 67 +++++++++ packaging/archiso/README.md | 26 ++++ packaging/archiso/airootfs/etc/fstab | 2 + packaging/archiso/airootfs/etc/hostname | 2 + packaging/archiso/airootfs/etc/hosts | 4 + packaging/archiso/airootfs/etc/issue | 2 + packaging/archiso/airootfs/etc/locale.conf | 2 + packaging/archiso/airootfs/etc/motd | 4 + packaging/archiso/airootfs/etc/shadow | 2 + packaging/archiso/airootfs/etc/vconsole.conf | 2 + .../airootfs/root/.automated_script.sh | 13 ++ .../airootfs/usr/local/bin/choose-mirror | 38 +++++ .../archiso/airootfs/usr/local/bin/samios | 140 ++++++++++++++++++ packaging/archiso/build.sh | 23 +++ .../efiboot/loader/entries/samios.conf | 4 + packaging/archiso/efiboot/loader/loader.conf | 3 + packaging/archiso/grub/grub.cfg | 14 ++ packaging/archiso/packages.x86_64 | 42 ++++++ packaging/archiso/pacman.conf | 18 +++ packaging/archiso/profiledef.sh | 28 ++++ packaging/archiso/syslinux/syslinux.cfg | 20 +++ 23 files changed, 613 insertions(+) create mode 100644 README.md create mode 100644 docs/installation.md create mode 100644 docs/roadmap.md create mode 100644 packaging/archiso/README.md create mode 100644 packaging/archiso/airootfs/etc/fstab create mode 100644 packaging/archiso/airootfs/etc/hostname create mode 100644 packaging/archiso/airootfs/etc/hosts create mode 100644 packaging/archiso/airootfs/etc/issue create mode 100644 packaging/archiso/airootfs/etc/locale.conf create mode 100644 packaging/archiso/airootfs/etc/motd create mode 100644 packaging/archiso/airootfs/etc/shadow create mode 100644 packaging/archiso/airootfs/etc/vconsole.conf create mode 100755 packaging/archiso/airootfs/root/.automated_script.sh create mode 100755 packaging/archiso/airootfs/usr/local/bin/choose-mirror create mode 100755 packaging/archiso/airootfs/usr/local/bin/samios create mode 100755 packaging/archiso/build.sh create mode 100644 packaging/archiso/efiboot/loader/entries/samios.conf create mode 100644 packaging/archiso/efiboot/loader/loader.conf create mode 100644 packaging/archiso/grub/grub.cfg create mode 100644 packaging/archiso/packages.x86_64 create mode 100644 packaging/archiso/pacman.conf create mode 100644 packaging/archiso/profiledef.sh create mode 100644 packaging/archiso/syslinux/syslinux.cfg diff --git a/README.md b/README.md new file mode 100644 index 0000000..58ec8d2 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# SamiOS - A Custom Arch Linux Distribution + +## Overview +SamiOS is a custom Linux distribution based on Arch Linux, designed as a Windows replacement for personal use. + +## Features +- Rolling release (Arch-based) +- Custom CLI tool (`samios`) for system management +- Automated installation scripts +- Custom branding and configuration +- Font policy: excludes fonts with "7777" in the name + +## Building from Source + +### Prerequisites +```bash +# On Arch Linux +sudo pacman -S archiso git +``` + +### Clone and Build +```bash +git clone https://git.sami/sami7777/samios.git +cd samios/packaging/archiso +sudo ./build.sh +``` + +## Installation + +### From ISO +1. Boot from the generated ISO +2. Run the automated installer: + ```bash + samios install + ``` + +### Manual Installation +See `docs/installation.md` for detailed instructions. + +## CLI Tool +The `samios` command provides system management: +```bash +samios status # Show system status +samios update # Update system +samios install # Install packages +samios fonts # Manage fonts +samios help # Show all commands +``` + +## Font Policy +SamiOS excludes any fonts with "7777" in the filename as these are personal branding fonts. + +## Development +This project is under active development. See `docs/roadmap.md` for planned features. + +## License +TBD diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..835f299 --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,100 @@ +# SamiOS Installation Guide + +## Prerequisites +- SamiOS ISO (built from source or downloaded) +- USB drive (2GB+) or CD/DVD +- Target machine with at least 2GB RAM +- 20GB+ storage space + +## Creating Bootable Media + +### Linux +```bash +# Find your USB device +lsblk + +# Write ISO to USB (replace /dev/sdX with your device) +sudo dd if=samios-*.iso of=/dev/sdX bs=4M status=progress oflag=sync +``` + +### Windows +Use Rufus or Etcher to write the ISO to USB. + +## Installation Process + +### 1. Boot from Media +- Insert USB/CD and boot the target machine +- Select "SamiOS Live" from the boot menu + +### 2. Connect to Network (if needed) +```bash +# WiFi +iwctl +[iwd]# device list +[iwd]# station wlan0 scan +[iwd]# station wlan0 get-networks +[iwd]# station wlan0 connect YOUR_SSID +[iwd]# exit + +# Ethernet (auto-connects) +``` + +### 3. Run Installer +```bash +samios install +``` + +The installer will: +- Partition the disk +- Install base system +- Configure bootloader +- Set up user account + +### 4. Reboot +```bash +reboot +``` + +Remove installation media and boot into SamiOS. + +## Post-Installation + +### Update System +```bash +samios update +``` + +### Install Additional Packages +```bash +samios install firefox +samios install vim +``` + +### Configure System +```bash +samios status +samios fonts +``` + +## Troubleshooting + +### Boot Issues +- Try "Copy to RAM" option from boot menu +- Check BIOS/UEFI settings (Secure Boot may need to be disabled) + +### Network Issues +```bash +# Check network status +ip addr +ping -c 3 archlinux.org + +# Restart NetworkManager +systemctl restart NetworkManager +``` + +### Installation Fails +- Check disk space: `df -h` +- Check logs: `journalctl -xe` + +## Support +For issues and questions, please open an issue on the SamiOS repository. diff --git a/docs/roadmap.md b/docs/roadmap.md new file mode 100644 index 0000000..54824dc --- /dev/null +++ b/docs/roadmap.md @@ -0,0 +1,67 @@ +# SamiOS Roadmap + +## Phase 1: Foundation (Current) +- [x] Basic archiso profile +- [x] CLI tool (`samios`) +- [x] Boot configuration (BIOS + UEFI) +- [x] System configuration files +- [ ] Automated installer +- [ ] Font management system +- [ ] Build automation + +## Phase 2: Desktop Environment +- [ ] KDE Plasma integration +- [ ] Display manager (SDDM) +- [ ] Graphics drivers (NVIDIA/AMD/Intel) +- [ ] Audio setup (PipeWire) +- [ ] Network management GUI +- [ ] System settings GUI + +## Phase 3: Applications +- [ ] Web browser (Firefox/Chromium) +- [ ] File manager (Dolphin) +- [ ] Terminal emulator (Konsole) +- [ ] Text editor (Kate) +- [ ] Office suite (LibreOffice) +- [ ] Media player (VLC) +- [ ] Image viewer (Gwenview) + +## Phase 4: System Tools +- [ ] Package manager GUI (Pamac) +- [ ] System monitor +- [ ] Backup tool +- [ ] Firewall configuration +- [ ] User management GUI + +## Phase 5: Polish +- [ ] Custom themes +- [ ] SamiOS branding +- [ ] Documentation +- [ ] Testing suite +- [ ] Release automation + +## Phase 6: Advanced Features +- [ ] Dual-boot setup tool +- [ ] System recovery tools +- [ ] Snapshot/rollback (Btrfs) +- [ ] Container support (Docker/Podman) +- [ ] Virtual machine support + +## Long-term Goals +- [ ] Custom kernel with optimizations +- [ ] SamiOS-specific packages +- [ ] Community repository +- [ ] Hardware certification +- [ ] Enterprise features + +## Timeline +- Phase 1: Q4 2024 +- Phase 2: Q1 2025 +- Phase 3: Q2 2025 +- Phase 4-6: Ongoing + +## Notes +- Prioritize stability over features +- Keep system lightweight +- Maintain Arch compatibility +- Focus on daily-driver usability diff --git a/packaging/archiso/README.md b/packaging/archiso/README.md new file mode 100644 index 0000000..503d0df --- /dev/null +++ b/packaging/archiso/README.md @@ -0,0 +1,26 @@ +# SamiOS Build System + +## Overview +This directory contains the archiso profile for building SamiOS ISO images. + +## Structure +- `profiledef.sh` - ISO profile definition +- `packages.x86_64` - Package list for x86_64 architecture +- `build.sh` - Build script +- `airootfs/` - Files to overlay on the live system +- `syslinux/` - Syslinux bootloader configuration +- `grub/` - GRUB bootloader configuration +- `efiboot/` - EFI boot configuration + +## Building +```bash +./build.sh +``` + +## Requirements +- Arch Linux (or compatible) +- archiso package +- Root privileges + +## Output +ISO files are generated in the `out/` directory. diff --git a/packaging/archiso/airootfs/etc/fstab b/packaging/archiso/airootfs/etc/fstab new file mode 100644 index 0000000..479000b --- /dev/null +++ b/packaging/archiso/airootfs/etc/fstab @@ -0,0 +1,2 @@ +# SamiOS fstab (live system uses tmpfs) +# tmpfs /tmp tmpfs nodev,nosuid,mode=1777 0 0 diff --git a/packaging/archiso/airootfs/etc/hostname b/packaging/archiso/airootfs/etc/hostname new file mode 100644 index 0000000..23b1c94 --- /dev/null +++ b/packaging/archiso/airootfs/etc/hostname @@ -0,0 +1,2 @@ +# SamiOS hostname +samios diff --git a/packaging/archiso/airootfs/etc/hosts b/packaging/archiso/airootfs/etc/hosts new file mode 100644 index 0000000..3b8b0e0 --- /dev/null +++ b/packaging/archiso/airootfs/etc/hosts @@ -0,0 +1,4 @@ +# SamiOS /etc/hosts +127.0.0.1 localhost +::1 localhost +127.0.1.1 samios.localdomain samios diff --git a/packaging/archiso/airootfs/etc/issue b/packaging/archiso/airootfs/etc/issue new file mode 100644 index 0000000..6aa0e4a --- /dev/null +++ b/packaging/archiso/airootfs/etc/issue @@ -0,0 +1,2 @@ +# SamiOS issue (login banner) +SamiOS \r (\l) diff --git a/packaging/archiso/airootfs/etc/locale.conf b/packaging/archiso/airootfs/etc/locale.conf new file mode 100644 index 0000000..c7a2637 --- /dev/null +++ b/packaging/archiso/airootfs/etc/locale.conf @@ -0,0 +1,2 @@ +# SamiOS locale +LANG=en_US.UTF-8 diff --git a/packaging/archiso/airootfs/etc/motd b/packaging/archiso/airootfs/etc/motd new file mode 100644 index 0000000..38fd81a --- /dev/null +++ b/packaging/archiso/airootfs/etc/motd @@ -0,0 +1,4 @@ +# SamiOS motd +Welcome to SamiOS! + +Type 'samios help' for available commands. diff --git a/packaging/archiso/airootfs/etc/shadow b/packaging/archiso/airootfs/etc/shadow new file mode 100644 index 0000000..a73b154 --- /dev/null +++ b/packaging/archiso/airootfs/etc/shadow @@ -0,0 +1,2 @@ +# SamiOS root password (empty for live system, user sets during install) +root::14871:::::: diff --git a/packaging/archiso/airootfs/etc/vconsole.conf b/packaging/archiso/airootfs/etc/vconsole.conf new file mode 100644 index 0000000..9ecf10f --- /dev/null +++ b/packaging/archiso/airootfs/etc/vconsole.conf @@ -0,0 +1,2 @@ +# SamiOS keymap +KEYMAP=us diff --git a/packaging/archiso/airootfs/root/.automated_script.sh b/packaging/archiso/airootfs/root/.automated_script.sh new file mode 100755 index 0000000..b899893 --- /dev/null +++ b/packaging/archiso/airootfs/root/.automated_script.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# SamiOS automated script - runs on first boot + +# Set up locale +locale-gen +localectl set-locale LANG=en_US.UTF-8 + +# Enable NetworkManager +systemctl enable NetworkManager + +# Show welcome message +echo "SamiOS is ready!" +echo "Type 'samios help' to get started" diff --git a/packaging/archiso/airootfs/usr/local/bin/choose-mirror b/packaging/archiso/airootfs/usr/local/bin/choose-mirror new file mode 100755 index 0000000..957fb83 --- /dev/null +++ b/packaging/archiso/airootfs/usr/local/bin/choose-mirror @@ -0,0 +1,38 @@ +#!/bin/bash +# SamiOS mirror selection script + +if [ -t 0 ]; then + echo "Select a mirror country:" + select country in "United States" "United Kingdom" "Germany" "Japan" "Australia" "All"; do + case $country in + "United States" ) + reflector --country "United States" --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist + break + ;; + "United Kingdom" ) + reflector --country "United Kingdom" --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist + break + ;; + "Germany" ) + reflector --country "Germany" --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist + break + ;; + "Japan" ) + reflector --country "Japan" --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist + break + ;; + "Australia" ) + reflector --country "Australia" --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist + break + ;; + "All" ) + reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist + break + ;; + esac + done + echo "Mirror list updated!" +else + echo "This script requires an interactive terminal" + exit 1 +fi diff --git a/packaging/archiso/airootfs/usr/local/bin/samios b/packaging/archiso/airootfs/usr/local/bin/samios new file mode 100755 index 0000000..214cc31 --- /dev/null +++ b/packaging/archiso/airootfs/usr/local/bin/samios @@ -0,0 +1,140 @@ +#!/bin/bash +# SamiOS CLI - System management tool + +set -e + +VERSION="0.1.0" +CONFIG_DIR="/etc/samios" +LOG_FILE="/var/log/samios.log" + +log() { + echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" | tee -a "$LOG_FILE" +} + +cmd_help() { + cat << EOF +SamiOS CLI v${VERSION} + +Usage: samios [options] + +Commands: + version Show version + status Show system status + update Update system packages + install Install a package + remove Remove a package + services List services + fonts Manage fonts + help Show this help + +Examples: + samios version + samios status + samios update + samios install firefox +EOF +} + +cmd_version() { + echo "SamiOS v${VERSION}" + echo "Kernel: $(uname -r)" + echo "Architecture: $(uname -m)" +} + +cmd_status() { + echo "=== SamiOS System Status ===" + echo "Version: ${VERSION}" + echo "Hostname: $(hostname)" + echo "Kernel: $(uname -r)" + echo "Uptime: $(uptime -p)" + echo + echo "=== Disk Usage ===" + df -h / | tail -n 1 + echo + echo "=== Memory ===" + free -h | grep "Mem:" + echo + echo "=== Network ===" + ip -br addr show | grep -v "lo" +} + +cmd_update() { + log "Starting system update" + pacman -Syu --noconfirm + log "Update complete" +} + +cmd_install() { + if [ -z "$1" ]; then + echo "Usage: samios install " + exit 1 + fi + log "Installing $1" + pacman -S --noconfirm "$1" +} + +cmd_remove() { + if [ -z "$1" ]; then + echo "Usage: samios remove " + exit 1 + fi + log "Removing $1" + pacman -R --noconfirm "$1" +} + +cmd_services() { + systemctl list-units --type=service --state=running +} + +cmd_fonts() { + echo "=== Installed Fonts ===" + fc-list | wc -l + echo "fonts installed" + echo + echo "=== Font Policy ===" + echo "Excluded: fonts with '7777' in name (personal branding)" + echo + + # Check for forbidden fonts + if fc-list | grep -i "7777" > /dev/null; then + echo "WARNING: Found fonts with '7777' in name:" + fc-list | grep -i "7777" + else + echo "✓ No forbidden fonts detected" + fi +} + +# Main command dispatcher +case "${1:-}" in + version) + cmd_version + ;; + status) + cmd_status + ;; + update) + cmd_update + ;; + install) + shift + cmd_install "$@" + ;; + remove) + shift + cmd_remove "$@" + ;; + services) + cmd_services + ;; + fonts) + cmd_fonts + ;; + help|--help|-h|"") + cmd_help + ;; + *) + echo "Unknown command: $1" + echo "Run 'samios help' for usage" + exit 1 + ;; +esac diff --git a/packaging/archiso/build.sh b/packaging/archiso/build.sh new file mode 100755 index 0000000..c0c3f43 --- /dev/null +++ b/packaging/archiso/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# SamiOS ISO build script + +set -e + +PROFILE_DIR="$(dirname "$0")" +WORK_DIR="${WORK_DIR:-/tmp/samios-build}" +OUT_DIR="${OUT_DIR:-$PROFILE_DIR/out}" + +echo "Building SamiOS ISO..." +echo "Profile: $PROFILE_DIR" +echo "Work directory: $WORK_DIR" +echo "Output directory: $OUT_DIR" + +# Clean previous build +rm -rf "$WORK_DIR" +mkdir -p "$WORK_DIR" "$OUT_DIR" + +# Build the ISO using archiso +mkarchiso -v -w "$WORK_DIR" -o "$OUT_DIR" "$PROFILE_DIR" + +echo "Build complete!" +echo "ISO location: $OUT_DIR/samios-*.iso" diff --git a/packaging/archiso/efiboot/loader/entries/samios.conf b/packaging/archiso/efiboot/loader/entries/samios.conf new file mode 100644 index 0000000..c7a3675 --- /dev/null +++ b/packaging/archiso/efiboot/loader/entries/samios.conf @@ -0,0 +1,4 @@ +title SamiOS Live +linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux +initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img +options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/packaging/archiso/efiboot/loader/loader.conf b/packaging/archiso/efiboot/loader/loader.conf new file mode 100644 index 0000000..d5a84a7 --- /dev/null +++ b/packaging/archiso/efiboot/loader/loader.conf @@ -0,0 +1,3 @@ +default samios.conf +timeout 5 +editor 0 diff --git a/packaging/archiso/grub/grub.cfg b/packaging/archiso/grub/grub.cfg new file mode 100644 index 0000000..8ffa54d --- /dev/null +++ b/packaging/archiso/grub/grub.cfg @@ -0,0 +1,14 @@ +# SamiOS GRUB configuration + +set default=0 +set timeout=5 + +menuentry "SamiOS Live" { + linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% + initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img +} + +menuentry "SamiOS Live (Copy to RAM)" { + linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram + initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img +} diff --git a/packaging/archiso/packages.x86_64 b/packaging/archiso/packages.x86_64 new file mode 100644 index 0000000..1d466ab --- /dev/null +++ b/packaging/archiso/packages.x86_64 @@ -0,0 +1,42 @@ +# SamiOS minimal CLI packages +# Core system +base +base-devel +linux +linux-firmware + +# Bootloader +grub +efibootmgr + +# Essential utilities +bash +coreutils +filesystem +util-linux +shadow +sudo + +# Networking +networkmanager +dhclient +openssh +curl +wget + +# Filesystem tools +dosfstools +e2fsprogs +btrfs-progs +gptfdisk + +# System tools +systemd-sysvcompat +arch-install-scripts +pacman-contrib + +# SamiOS branding +samios-branding + +# Excluded: fonts with 7777 in name (personal branding) +# Excluded: desktop environment (CLI-only for now) diff --git a/packaging/archiso/pacman.conf b/packaging/archiso/pacman.conf new file mode 100644 index 0000000..93aed98 --- /dev/null +++ b/packaging/archiso/pacman.conf @@ -0,0 +1,18 @@ +# SamiOS pacman configuration for ISO build +# Based on Arch Linux pacman.conf + +[options] +HoldPkg = pacman glibc +Architecture = auto +CheckSpace +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional + +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist diff --git a/packaging/archiso/profiledef.sh b/packaging/archiso/profiledef.sh new file mode 100644 index 0000000..904d2a1 --- /dev/null +++ b/packaging/archiso/profiledef.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2034 + +# SamiOS archiso profile definition +# Minimal CLI-based Arch Linux with SamiOS branding + +iso_name="samios" +iso_label="SAMIOS_$(date +%Y%m)" +iso_publisher="Sami Ahmed " +iso_application="SamiOS Live/Rescue CD" +iso_version="0.1.0" +install_dir="arch" +buildmodes=('iso') +bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito' 'uefi-x64.grub.esp' 'uefi-x64.grub.eltorito') +arch="x86_64" +pacman_conf="pacman.conf" +airootfs_image_type="squashfs" +airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '1M' '-Xdict-size' '1M') +bootstrap_tarball_compression=('zstd' '-c' '-T0' '--ultra' '-20') +file_permissions=( + ["/etc/shadow"]="0:0:400" + ["/etc/gshadow"]="0:0:400" + ["/root"]="0:0:750" + ["/root/.automated_script.sh"]="0:0:755" + ["/root/.gnupg"]="0:0:700" + ["/usr/local/bin/choose-mirror"]="0:0:755" + ["/usr/local/bin/samios"]="0:0:755" +) diff --git a/packaging/archiso/syslinux/syslinux.cfg b/packaging/archiso/syslinux/syslinux.cfg new file mode 100644 index 0000000..a7f948c --- /dev/null +++ b/packaging/archiso/syslinux/syslinux.cfg @@ -0,0 +1,20 @@ +DEFAULT samios +SERIAL 0 115200 + +LABEL samios +TEXT HELP +Boot SamiOS live system +ENDTEXT +MENU LABEL SamiOS Live +LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux +INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% + +LABEL samios +TEXT HELP +Boot SamiOS live system with copy-to-RAM +ENDTEXT +MENU LABEL SamiOS Live (Copy to RAM) +LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux +INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% copytoram