d1b700eb2b
Diagnóstico: en el VPS Fedora arje-zero caía como PID 1 y el cmdline traía `panic=10`, así que el kernel rebooteaba cada 10 s. Tres causas encadenadas, todas arregladas: 1) **Cmdline `ro` + sin `/run` tmpfs.** El menuentry montaba `/` como sólo lectura (systemd lo remonta rw temprano; arje no). Sin eso, el socket del bus interno se intenta crear sobre un FS de sólo lectura y falla con EROFS → spawn_bus devuelve Err → PID 1 sale → kernel panic. arje-kernel ahora remonta `/` rw en el bootstrap y monta `/run`, `/tmp`, `/dev/pts`, `/dev/shm` como tmpfs — superficies escribibles aunque la raíz quede ro. 2) **PID 1 saliendo en cualquier `?`.** Doctrina dura nueva: PID 1 NUNCA puede salir. Cualquier error de arranque ahora cae a una `emergency_shell()` que imprime el diagnóstico en `/dev/console`, abre `/bin/sh` y, si la shell muere, la reabre — así el operador puede reparar en vez de mirar la máquina reiniciarse en bucle. 3) **El script no conocía grub2 (Fedora).** `install-arje-as-init.sh` sólo probaba `update-grub` (Debian) y `grub-mkconfig` (Arch). Ahora detecta `grub2-mkconfig` y resuelve el `grub.cfg` correcto (UEFI/BIOS, fedora/redhat/centos/almalinux/rocky). El menuentry también pasa de `ro` a `rw` — el remount es belt-and-suspenders. Mismo arreglo en `uninstall-arje.sh`. Renaser intacto: estos cambios son Linux-side puro (arje-kernel y arje-zero usan nix/libc/tracing); renaser sólo comparte mirada-layout y formato, ninguno tocado. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
57 lines
2.0 KiB
Bash
Executable File
57 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# uninstall-arje.sh — revierte lo que install-arje-as-init.sh hizo.
|
|
#
|
|
# - Borra /usr/sbin/arje-* y /usr/bin/{brahman-status,busctl,brainctl}.
|
|
# - Borra el bloque ARJE-MENUENTRY de /etc/grub.d/40_custom.
|
|
# - Regenera grub.cfg.
|
|
# - NO toca /ente/seed.card.json (querés conservar customización).
|
|
# - NO toca /sbin/init ni systemd.
|
|
|
|
set -euo pipefail
|
|
|
|
if [ "$(id -u)" -ne 0 ]; then
|
|
echo "[uninstall-arje] hace falta root" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "[uninstall-arje] removiendo binarios"
|
|
rm -f /usr/sbin/arje-zero
|
|
for b in arje-echo arje-policy-provider \
|
|
arje-logind-compat arje-hostnamed-compat arje-timedated-compat \
|
|
arje-localed-compat arje-journald-compat arje-resolved-compat \
|
|
arje-polkit-compat arje-machined-compat arje-systemd1-compat \
|
|
arje-notify-compat arje-timer-compat arje-tmpfiles-compat \
|
|
arje-binfmt-compat; do
|
|
rm -f "/usr/sbin/$b"
|
|
done
|
|
for e in brahman-status busctl brainctl; do
|
|
rm -f "/usr/bin/$e"
|
|
done
|
|
|
|
echo "[uninstall-arje] limpiando menuentry de /etc/grub.d/40_custom"
|
|
CUSTOM=/etc/grub.d/40_custom
|
|
if [ -f "$CUSTOM" ] && grep -q "BEGIN ARJE-MENUENTRY" "$CUSTOM"; then
|
|
awk '/BEGIN ARJE-MENUENTRY/{f=1} /END ARJE-MENUENTRY/{f=0; next} !f' "$CUSTOM" \
|
|
> "$CUSTOM.tmp" && mv "$CUSTOM.tmp" "$CUSTOM"
|
|
chmod 0755 "$CUSTOM"
|
|
fi
|
|
|
|
if command -v update-grub >/dev/null 2>&1; then
|
|
update-grub
|
|
elif command -v grub2-mkconfig >/dev/null 2>&1; then
|
|
GRUB_CFG=""
|
|
for cand in /boot/efi/EFI/fedora/grub.cfg \
|
|
/boot/efi/EFI/redhat/grub.cfg \
|
|
/boot/efi/EFI/centos/grub.cfg \
|
|
/boot/efi/EFI/almalinux/grub.cfg \
|
|
/boot/efi/EFI/rocky/grub.cfg \
|
|
/boot/grub2/grub.cfg; do
|
|
if [ -f "$cand" ] || [ -L "$cand" ]; then GRUB_CFG="$cand"; break; fi
|
|
done
|
|
grub2-mkconfig -o "${GRUB_CFG:-/boot/grub2/grub.cfg}"
|
|
elif command -v grub-mkconfig >/dev/null 2>&1; then
|
|
grub-mkconfig -o /boot/grub/grub.cfg
|
|
fi
|
|
|
|
echo "[uninstall-arje] hecho. /ente/seed.card.json conservado (borralo a mano si querés)."
|