docs: add MAN page (section 8), README, user guide, admin guide, and developer guide
This commit is contained in:
1 parent
e1a99d7e6f
commit
507a3fd310
10 files changed
+835
-1
No files matched your search
@@ -0,0 +1,153 @@
|
||||
# Linux System Updater: User Guide
|
||||
|
||||
Welcome to the **Linux System Updater** (`linux-updater`) User Guide. This guide covers how to safely inspect and update your Linux workstation or server using `linux-updater`.
|
||||
|
||||
---
|
||||
|
||||
## 1. Overview & Philosophy
|
||||
|
||||
Updating a Linux system can occasionally fail due to preventable conditions:
|
||||
- `/boot` partition running out of inodes or disk space during kernel installation.
|
||||
- Leftover package manager lock files from crashed background processes.
|
||||
- Memory exhaustion causing package compilers or post-install scripts to fail.
|
||||
- Sudden laptop power loss during critical package unpacking.
|
||||
|
||||
`linux-updater` acts as an intelligent safety wrapper around your system's native package manager (`apt`, `dnf`, or `pacman`). Before making any modifications, it verifies that the system is in a healthy, safe state to upgrade.
|
||||
|
||||
---
|
||||
|
||||
## 2. Interactive CLI Workflow
|
||||
|
||||
### Checking System Health (`health`)
|
||||
To run a fast pre-flight diagnostic without checking for updates or altering system state:
|
||||
|
||||
```bash
|
||||
linux-updater health
|
||||
```
|
||||
|
||||
**Example Output:**
|
||||
```text
|
||||
Linux System Updater v1.0.0
|
||||
Detected System: Ubuntu 24.04.1 LTS (Family: debian)
|
||||
|
||||
Pre-flight Health Diagnostics:
|
||||
-----------------------------------------------------------------
|
||||
[ PASS ] disk_boot /boot free space is sufficient: 1042MB
|
||||
[ PASS ] disk_var /var free space is sufficient: 42100MB
|
||||
[ PASS ] disk_root Root filesystem free space is sufficient: 42100MB
|
||||
[ PASS ] lock_lock-frontend No lock active at /var/lib/dpkg/lock-frontend
|
||||
[ PASS ] lock_lock No lock active at /var/lib/dpkg/lock
|
||||
[ PASS ] lock_lock No lock active at /var/lib/apt/lists/lock
|
||||
[ PASS ] memory_available Available RAM is sufficient: 7850MB
|
||||
[ PASS ] pending_reboot No pending system reboot detected.
|
||||
-----------------------------------------------------------------
|
||||
Overall Pre-flight Status: PASSED
|
||||
```
|
||||
|
||||
### Checking for Available Updates (`check`)
|
||||
To see which packages have upgrades available without installing anything:
|
||||
|
||||
```bash
|
||||
linux-updater check
|
||||
```
|
||||
|
||||
**Example Output:**
|
||||
```text
|
||||
Linux System Updater v1.0.0
|
||||
Detected System: Fedora Linux 40 (Family: rhel)
|
||||
Checking available updates...
|
||||
|
||||
Available Updates (3):
|
||||
-----------------------------------------------------------------
|
||||
• openssl.x86_64 1:3.0.7-27 -> 1:3.0.7-28 (baseos)
|
||||
• nginx.x86_64 1.24.0-1 -> 1.24.0-2 (updates)
|
||||
• curl.x86_64 8.2.1-1 -> 8.2.1-2 (updates)
|
||||
-----------------------------------------------------------------
|
||||
Run 'linux-updater update' to apply updates.
|
||||
```
|
||||
|
||||
### Applying Routine System Updates (`update`)
|
||||
To apply routine package upgrades interactively:
|
||||
|
||||
```bash
|
||||
sudo linux-updater update
|
||||
```
|
||||
|
||||
1. **Pre-flight Checks:** Checks `/boot`, `/var`, `/`, locks, RAM, and power.
|
||||
2. **Review:** Shows list of available updates.
|
||||
3. **Confirmation:** Prompts `Proceed with updates? [Y/n]: `
|
||||
4. **Execution:** Runs native package upgrade transaction.
|
||||
5. **Reboot Notice:** Warns if a kernel or core library update requires a reboot.
|
||||
|
||||
### Selective Package Updates (`--packages`)
|
||||
If you only want to upgrade specific software (e.g. security patches for OpenSSL and Nginx) without touching the rest of the operating system:
|
||||
|
||||
```bash
|
||||
sudo linux-updater update --packages openssl nginx
|
||||
```
|
||||
|
||||
### Simulation / Dry Run (`--dry-run`)
|
||||
To simulate the complete update transaction without changing package states:
|
||||
|
||||
```bash
|
||||
linux-updater update --dry-run
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Major Distribution Release Upgrade (`release-upgrade`)
|
||||
|
||||
A major distribution upgrade transitions your system from one release version to the next (e.g., Ubuntu 22.04 LTS to 24.04 LTS, Debian 12 to 13, Fedora 40 to 41, or AlmaLinux 8 to 9).
|
||||
|
||||
Because major upgrades modify thousands of core system packages, `linux-updater` introduces strict safety gates:
|
||||
|
||||
```bash
|
||||
# Simulate upgrade first:
|
||||
linux-updater release-upgrade --dry-run -t 41
|
||||
|
||||
# Execute real upgrade:
|
||||
sudo linux-updater release-upgrade -t 41
|
||||
```
|
||||
|
||||
**Safety Banner:**
|
||||
```text
|
||||
=================================================================
|
||||
WARNING: MAJOR DISTRIBUTION RELEASE UPGRADE
|
||||
=================================================================
|
||||
Target Release: 41
|
||||
This operation performs a major upgrade of core system components.
|
||||
Ensure you have a recent system backup or snapshot before proceeding.
|
||||
=================================================================
|
||||
|
||||
Are you absolutely sure you want to proceed with upgrade to 41? [y/N]:
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. System Cleanup (`clean`)
|
||||
|
||||
To recover disk space occupied by old downloaded package files:
|
||||
|
||||
```bash
|
||||
# Clean package download cache:
|
||||
sudo linux-updater clean
|
||||
|
||||
# Clean cache AND remove orphaned dependencies:
|
||||
sudo linux-updater clean --all
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Reading System Logs
|
||||
|
||||
All execution logs are recorded in `/var/log/linux-updater/`:
|
||||
|
||||
```bash
|
||||
# View the log from the most recent run:
|
||||
cat /var/log/linux-updater/latest.log
|
||||
|
||||
# List historical execution logs:
|
||||
ls -lh /var/log/linux-updater/
|
||||
```
|
||||
|
||||
Each log line includes timestamped records of commands executed, exit codes, and diagnostics.
|
||||
Reference in new issue
Block a user