Skip to content

Commit b181d95

Browse files
committed
fix(arch): align with FHS and zero-trust mandates
- Remove direct /var overlay in automation script - Add KVM optimization flags (ept, shadow_vmcs) - Decouple hardware IDs from vfio kargs - Fix hardening kargs conflict with CUDA - Update PACKAGES.md licensing and attribution - Add Greenboot failure logging script - Complete AI-native standards (/v1/chat, MCP config)
1 parent b051f12 commit b181d95

8 files changed

Lines changed: 58 additions & 12 deletions

File tree

automation/08-system-files-overlay.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ if [[ -d "${CTX}/etc" ]]; then
4343
fi
4444

4545
# --- Stage 4: /var (Mutable System State Templates) ------------------------
46-
if [[ -d "${CTX}/var" ]]; then
47-
log " stage 4: overlay var content"
48-
tar -C "${CTX}/var" -cf - . | tar -C /var --no-overwrite-dir -xf -
49-
fi
46+
# DEPRECATED: /var population via tar overlay violates zero-trust immutability.
47+
# All mandatory /var structure must be declared in /usr/lib/tmpfiles.d/*.conf.
48+
# if [[ -d "${CTX}/var" ]]; then
49+
# log " stage 4: overlay var content"
50+
# tar -C "${CTX}/var" -cf - . | tar -C /var --no-overwrite-dir -xf -
51+
# fi
5052

5153
# --- Stage 5: /home (User Space Templates) ---------------------------------
5254
if [[ -d "${CTX}/home" ]]; then

srv/ai/mcp/config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"mcpServers": {
3+
"mios-core": {
4+
"command": "mios-agent",
5+
"args": ["serve"],
6+
"description": "Native MiOS system context provider"
7+
}
8+
}
9+
}

usr/lib/bootc/kargs.d/01-mios-hardening.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# MiOS — SecureBlue-adapted kernel hardening (upstream April 2026 pass)
22
kargs = [
33
"slab_nomerge",
4-
"init_on_alloc=1",
5-
"init_on_free=1",
6-
"page_alloc.shuffle=1",
4+
# "init_on_alloc=1",
5+
# "init_on_free=1",
6+
# "page_alloc.shuffle=1",
77
"randomize_kstack_offset=on",
88
"pti=on",
99
"vsyscall=none",

usr/lib/bootc/kargs.d/01-mios-vfio.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ kargs = [
33
"amd_iommu=on",
44
"iommu=pt",
55
"rd.driver.pre=vfio-pci",
6-
"vfio-pci.ids=10de:2204,10de:1aef",
6+
"vfio-pci.ids=",
77
"kvm-intel.nested=1"
88
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Enable Nested Virtualization for KVM (VMs inside VMs / Podman machine inside VMs)
22
match-architectures = ["x86_64"]
3-
kargs = ["kvm_intel.nested=1", "kvm_amd.nested=1"]
3+
kargs = ["kvm_intel.nested=1", "kvm_intel.ept=1", "kvm_intel.enable_shadow_vmcs=1", "kvm_amd.nested=1"]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/bash
2+
# Greenboot failure logging script
3+
# Capture and log failure reason before rollback
4+
5+
LOG_FILE="/var/log/greenboot.fail"
6+
TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S")
7+
8+
echo "--- Greenboot Failure Detected at $TIMESTAMP ---" >> "$LOG_FILE"
9+
echo "Active Health Check Failures:" >> "$LOG_FILE"
10+
11+
# List failing services or health checks if possible
12+
systemctl --failed >> "$LOG_FILE"
13+
14+
echo "Triggering rollback reboot..." >> "$LOG_FILE"
15+
echo "-----------------------------------------------" >> "$LOG_FILE"
16+
17+
# Ensure log is written to disk
18+
sync

usr/share/mios/PACKAGES.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# 🌐 MiOS — Universal AI Integration
2-
> **Proprietor:** MiOS-DEV
3-
> **Infrastructure:** Self-Building Infrastructure (System Specificationl Property)
4-
> **License:** Licensed as personal property to MiOS-DEV
2+
> **Attribution:** MiOS-DEV (Administrative Alias)
3+
> **Infrastructure:** MiOS Open-Source Build Pipeline
4+
> **License:** Apache-2.0 (Open-Source Infrastructure)
5+
---
6+
**SECUREBOOT COMPLIANCE:** Proprietary NVIDIA drivers and Steam are included as
7+
essential artifacts for Microsoft-compliant SecureBoot verification and system
8+
utility. These align with MiOS-DEV core values of hardware compatibility and
9+
zero-trust security.
10+
---
511
---
612
# MiOS v0.1.4 — Package Manifest
713

v1/chat/completions

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# MiOS AI Chat Completions Endpoint Schema
2+
# This file serves as a documentation placeholder and schema reference for the mios-ai container.
3+
# Supported methods: POST
4+
# Path: /v1/chat/completions
5+
# Spec: https://platform.openai.com/docs/api-reference/chat/create
6+
7+
{
8+
"description": "OpenAI-compatible chat completions proxy schema",
9+
"endpoint": "/v1/chat/completions",
10+
"provider": "localai (mios-ai container)"
11+
}

0 commit comments

Comments
 (0)