Tail both logs to get additional output
This commit is contained in:
1 file changed
+35
-10
@@ -69,8 +69,13 @@ install_omarchy() {
|
|||||||
# Ensure archinstall log directory exists
|
# Ensure archinstall log directory exists
|
||||||
sudo mkdir -p /var/log/archinstall
|
sudo mkdir -p /var/log/archinstall
|
||||||
|
|
||||||
# Start tailing our backup log to show user what's happening
|
# Prepare chroot log location (will be created by chroot script when it runs)
|
||||||
start_log_output "/var/log/omarchy-install.log"
|
sudo mkdir -p /mnt/var/log
|
||||||
|
CHROOT_LOG="/mnt/var/log/omarchy-install-chroot.log"
|
||||||
|
|
||||||
|
# Start tailing BOTH logs with tail -F (follows multiple files, waits for files to appear)
|
||||||
|
# This will automatically pick up the chroot log when it's created
|
||||||
|
start_log_output "/var/log/omarchy-install.log" "$CHROOT_LOG"
|
||||||
|
|
||||||
# Run omarchy-install and capture output
|
# Run omarchy-install and capture output
|
||||||
# archinstall writes to /var/log/archinstall/install.log internally
|
# archinstall writes to /var/log/archinstall/install.log internally
|
||||||
@@ -82,21 +87,41 @@ install_omarchy() {
|
|||||||
|
|
||||||
install_exit_code=$?
|
install_exit_code=$?
|
||||||
|
|
||||||
stop_log_output
|
|
||||||
|
|
||||||
# Check if omarchy-install failed
|
# Check if omarchy-install failed
|
||||||
if [[ $install_exit_code -ne 0 ]]; then
|
if [[ $install_exit_code -ne 0 ]]; then
|
||||||
|
stop_log_output
|
||||||
echo
|
echo
|
||||||
echo "ERROR: Installation failed (exit code $install_exit_code)"
|
echo "ERROR: Installation failed (exit code $install_exit_code)"
|
||||||
echo "Check /var/log/omarchy-install.log for details"
|
echo "Check /var/log/omarchy-install.log and /mnt/var/log/omarchy-install-chroot.log for details"
|
||||||
exit $install_exit_code
|
exit $install_exit_code
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Installation succeeded - copy logs to installed system for user access
|
# Installation succeeded - stop log output BEFORE doing anything else
|
||||||
echo "Copying installation logs to installed system..."
|
stop_log_output
|
||||||
sudo mkdir -p /mnt/var/log
|
|
||||||
sudo cp /var/log/omarchy-install.log /mnt/var/log/omarchy-install.log 2>/dev/null || true
|
# Copy and merge logs to installed system for user access (silent)
|
||||||
sudo cp /var/log/archinstall/install.log /mnt/var/log/archinstall-install.log 2>/dev/null || true
|
{
|
||||||
|
sudo cp /var/log/omarchy-install.log /mnt/var/log/omarchy-install.log 2>/dev/null || true
|
||||||
|
sudo cp /var/log/archinstall/install.log /mnt/var/log/archinstall-install.log 2>/dev/null || true
|
||||||
|
|
||||||
|
# Create a merged log with all phases
|
||||||
|
{
|
||||||
|
echo "========================================"
|
||||||
|
echo "Omarchy Installation - Complete Log"
|
||||||
|
echo "Generated: $(date '+%Y-%m-%d %H:%M:%S')"
|
||||||
|
echo "========================================"
|
||||||
|
echo
|
||||||
|
echo "=== Phase 1: Main Installation (ISO) ==="
|
||||||
|
cat /var/log/omarchy-install.log 2>/dev/null || echo "(No main install log found)"
|
||||||
|
echo
|
||||||
|
echo "=== Phase 2: Chroot Configuration ==="
|
||||||
|
cat "$CHROOT_LOG" 2>/dev/null || echo "(No chroot log found)"
|
||||||
|
echo
|
||||||
|
echo "========================================"
|
||||||
|
echo "Installation Complete"
|
||||||
|
echo "========================================"
|
||||||
|
} | sudo tee /mnt/var/log/omarchy-install-full.log >/dev/null
|
||||||
|
} >/dev/null 2>&1
|
||||||
|
|
||||||
# Show completion screen
|
# Show completion screen
|
||||||
clear
|
clear
|
||||||
|
|||||||
Reference in new issue
Block a user