-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next/minor' of github.com:Start9Labs/start-os into next…
…/major
- Loading branch information
Showing
42 changed files
with
601 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
#!/bin/bash | ||
|
||
# Define the output file | ||
OUTPUT_FILE="system_debug_info.txt" | ||
|
||
# Check if the script is run as root, if not, restart with sudo | ||
if [ "$(id -u)" -ne 0 ]; then | ||
exec sudo bash "$0" "$@" | ||
fi | ||
|
||
# Create or clear the output file and add a header | ||
echo "===================================================================" > "$OUTPUT_FILE" | ||
echo " StartOS System Debug Information " >> "$OUTPUT_FILE" | ||
echo "===================================================================" >> "$OUTPUT_FILE" | ||
echo "Generated on: $(date)" >> "$OUTPUT_FILE" | ||
echo "" >> "$OUTPUT_FILE" | ||
|
||
# Function to check if a command exists | ||
command_exists() { | ||
command -v "$1" >/dev/null 2>&1 | ||
} | ||
|
||
# Function to run a command if it exists and append its output to the file with headers | ||
run_command() { | ||
local CMD="$1" | ||
local DESC="$2" | ||
local CMD_NAME="${CMD%% *}" # Extract the command name (first word) | ||
|
||
if command_exists "$CMD_NAME"; then | ||
echo "===================================================================" >> "$OUTPUT_FILE" | ||
echo "COMMAND: $CMD" >> "$OUTPUT_FILE" | ||
echo "DESCRIPTION: $DESC" >> "$OUTPUT_FILE" | ||
echo "===================================================================" >> "$OUTPUT_FILE" | ||
echo "" >> "$OUTPUT_FILE" | ||
eval "$CMD" >> "$OUTPUT_FILE" 2>&1 | ||
echo "" >> "$OUTPUT_FILE" | ||
else | ||
echo "===================================================================" >> "$OUTPUT_FILE" | ||
echo "COMMAND: $CMD" >> "$OUTPUT_FILE" | ||
echo "DESCRIPTION: $DESC" >> "$OUTPUT_FILE" | ||
echo "===================================================================" >> "$OUTPUT_FILE" | ||
echo "SKIPPED: Command not found" >> "$OUTPUT_FILE" | ||
echo "" >> "$OUTPUT_FILE" | ||
fi | ||
} | ||
|
||
# Collecting basic system information | ||
run_command "start-cli --version; start-cli git-info" "StartOS CLI version and Git information" | ||
run_command "hostname" "Hostname of the system" | ||
run_command "uname -a" "Kernel version and system architecture" | ||
|
||
# Services Info | ||
run_command "start-cli lxc stats" "All Running Services" | ||
|
||
# Collecting CPU information | ||
run_command "lscpu" "CPU architecture information" | ||
run_command "cat /proc/cpuinfo" "Detailed CPU information" | ||
|
||
# Collecting memory information | ||
run_command "free -h" "Available and used memory" | ||
run_command "cat /proc/meminfo" "Detailed memory information" | ||
|
||
# Collecting storage information | ||
run_command "lsblk" "List of block devices" | ||
run_command "df -h" "Disk space usage" | ||
run_command "fdisk -l" "Detailed disk partition information" | ||
|
||
# Collecting network information | ||
run_command "ip a" "Network interfaces and IP addresses" | ||
run_command "ip route" "Routing table" | ||
run_command "netstat -i" "Network interface statistics" | ||
|
||
# Collecting RAID information (if applicable) | ||
run_command "cat /proc/mdstat" "List of RAID devices (if applicable)" | ||
|
||
# Collecting virtualization information | ||
run_command "egrep -c '(vmx|svm)' /proc/cpuinfo" "Check if CPU supports virtualization" | ||
run_command "systemd-detect-virt" "Check if the system is running inside a virtual machine" | ||
|
||
# Final message | ||
echo "===================================================================" >> "$OUTPUT_FILE" | ||
echo " End of StartOS System Debug Information " >> "$OUTPUT_FILE" | ||
echo "===================================================================" >> "$OUTPUT_FILE" | ||
|
||
# Prompt user to send the log file to a Start9 Technician | ||
echo "System debug information has been collected in $OUTPUT_FILE." | ||
echo "" | ||
echo "Would you like to send this log file to a Start9 Technician? (yes/no)" | ||
read SEND_LOG | ||
|
||
if [[ "$SEND_LOG" == "yes" || "$SEND_LOG" == "y" ]]; then | ||
if command -v wormhole >/dev/null 2>&1; then | ||
echo "" | ||
echo "===================================================================" | ||
echo " Running wormhole to send the file. Please follow the " | ||
echo " instructions and provide the code to the Start9 support team. " | ||
echo "===================================================================" | ||
wormhole send "$OUTPUT_FILE" | ||
echo "===================================================================" | ||
else | ||
echo "Error: wormhole command not found." | ||
fi | ||
else | ||
echo "Log file not sent. You can manually share $OUTPUT_FILE with the Start9 support team if needed." | ||
fi |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# StartOS v0.3.6 | ||
|
||
## Warning | ||
|
||
Previous backups are incompatible with v0.3.6. It is strongly recommended that you (1) immediately update all services, then (2) create a fresh backup. See the [backups](#improved-backups) section below for more details. | ||
|
||
## Summary | ||
|
||
Servers are not toys. They are a critical component of the computing paradigm, and their failure can be catastrophic, resulting in downtime or loss of data. From the beginning, Start9 has taken a "security and reliability first" approach to the development of StartOS, favoring soundness over speed and prioritizing essential features such as encrypted network connections, simple backups, and a reliable container runtime over nice-to-haves like custom theming and more apps. | ||
|
||
Start9 is paving new ground with StartOS, trying to achieve what most developers and IT professionals thought impossible; namely, giving a normal person the same independent control over their data and communications as an experienced Linux sysadmin. | ||
|
||
A consequence of our principled approach to development, combined with the difficulty of our endeavor, is that (1) mistakes will be made and (2) they must be corrected. That means a willingness to discard bad ideas and broken parts, and if absolutely necessary, to nuke everything and start over from scratch. We did this in 2020 with StartOS v0.2.0, again in 2022 with StartOS v0.3.0, and now in 2024 with StartOS v0.3.6. | ||
|
||
StartOS v0.3.6 is a complete rewrite of the OS internals (everything you don't see). Almost nothing survived. After nearly five years of building StartOS, we believe that we have finally arrived at the correct architecture and foundation, and that no additional rewrites will be necessary for StartOS to deliver on its promise. | ||
|
||
## Changelog | ||
|
||
- [Switch to lxc-based container runtime](#lxc) | ||
- [Update s9pk archive format](#new-s9pk-archive-format) | ||
- [Improve config](#better-config) | ||
- [Unify Actions](#unify-actions) | ||
- [Use squashfs images for OS updates](#squashfs-updates) | ||
- [Introduce Typescript package API and SDK](#typescript-package-api-and-sdk) | ||
- [Remove Postgresql](#remove-postgressql) | ||
- [Implement detailed progress reporting](#progress-reporting) | ||
- [Improve registry protocol](#registry-protocol) | ||
- [Replace unique .local URLs with unique ports](#lan-port-forwarding) | ||
- [Use start-fs Fuse module for improved backups](#improved-backups) | ||
- [Switch to Exver for versioning](#Exver) | ||
- [Support clearnet hosting via start-cli](#clearnet) | ||
|
||
### LXC | ||
|
||
StartOS now uses a nested container paradigm based on LXC for the outer container, and using linux namespaces for the inner lite containers. This replaces both Docker and Podman. | ||
|
||
### S9PK archive format | ||
|
||
The S9PK archive format has been overhauled to allow for signature verification of partial downloads, and allow direct mounting of container images without unpacking the s9pk. | ||
|
||
### Better config | ||
|
||
Expanded support for input types and a new UI makes configuring services easier and more powerful. | ||
|
||
### Actions | ||
|
||
Actions take arbitrary form input _and_ return arbitrary responses, thus satisfying the needs of both Config and Properties, which will be removed in a future release. This gives packages developers the ability to break up Config and Properties into smaller, more specific formats, or to exclude them entirely without polluting the UI. | ||
|
||
### Squashfs updates | ||
|
||
StartOS now uses squashfs images to represent OS updates. This allows for better update verification, and improved reliability over rsync updates. | ||
|
||
### Typescript package API and SDK | ||
|
||
StartOS now exposes a Typescript API. Package developers can take advantage in a simple, typesafe way using the new start-sdk. A barebones StartOS package (s9pk) can be produced in minutes with minimal knowledge or skill. More advanced developers can use the SDK to create highly customized user experiences with their service. | ||
|
||
### Remove PostgresSQL | ||
|
||
StartOS itself has miniscule data persistence needs. PostgresSQL was overkill and has been removed in favor of lightweight PatchDB. | ||
|
||
### Progress reporting | ||
|
||
A new progress reporting API enabled package developers to create unique phases and provide real-time progress reporting for actions such as installing, updating, or backing up a service. | ||
|
||
### Registry protocol | ||
|
||
The new registry protocol bifurcates package indexing (listing/validating) and package hosting (downloading). Registries are now simple indexes of packages that reference binaries hosted in arbitrary locations, locally or externally. For example, when someone visits the Start9 Registry, the currated list of packages comes from Start9. But when someone installs a listed service, the package binary is being downloaded from Github. The registry also valides the binary. This makes it much easier to host a custom registry, since it is just a currated list of services tat reference package binaries hosted on Github or elsewhere. | ||
|
||
### LAN port forwarding | ||
|
||
Perhaps the biggest complaint with prior version of StartOS was use of unique .local URLs for service interfaces. This has been corrected. Service interfaces are now available on unique ports, allowing for non-http traffic on the LAN as well as remote access via VPN. | ||
|
||
### Improved Backups | ||
|
||
The new start-fs fuse module unifies file system expectations for various platforms, enabling more reliable backups. The new system also defaults to using rsync differential backups instead of incremental backups, which is faster and saves on disk space by also deleting from the backup files that were deleted from the server. | ||
|
||
### Exver | ||
|
||
StartOS now uses Extended Versioning (Exver), which consists of three parts, separated by semicolons: (1) a Semver-compliant upstream version, (2) a Semver-compliant wrapper version, and (3) an optional "flavor" prefix. Flavors can be thought of as alternative implementations of services, where a user would only want one or the other installed, and data can feasibly be migrating beetween the two. Another common characteristic of flavors is that they satisfy the same API requirement of dependents, though this is not strictly necessary. A valid Exver looks something like this: `#knots:28.0.:1.0-beta.1`. This would translate to "the first beta release of StartOS wrapper version 1.0 of Bitcoin Knots version 27.0". | ||
|
||
### Clearnet | ||
|
||
It is now possible, and quite easy, to expose specific services interfaces to the public Internet on a standard domain using start-cli. This functionality will be expanded upon and moved into the StartOS UI in a future release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.