Basic installation now working, system comes up talking.
This commit is contained in:
@@ -36,6 +36,10 @@ log_error() {
|
|||||||
echo "ERROR: $*" | tee -a "$logFile" >&2
|
echo "ERROR: $*" | tee -a "$logFile" >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_warning() {
|
||||||
|
echo "WARNING: $*" | tee -a "$logFile" >&2
|
||||||
|
}
|
||||||
|
|
||||||
log_info() {
|
log_info() {
|
||||||
echo "INFO: $*" | tee -a "$logFile"
|
echo "INFO: $*" | tee -a "$logFile"
|
||||||
}
|
}
|
||||||
@@ -1529,11 +1533,6 @@ if ! install_bootloader; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install helper scripts
|
|
||||||
if ! install_helper_scripts; then
|
|
||||||
log_warning "Helper script installation had issues (non-fatal)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install game managers
|
# Install game managers
|
||||||
if ! install_game_managers; then
|
if ! install_game_managers; then
|
||||||
log_warning "Game manager installation had issues (non-fatal)"
|
log_warning "Game manager installation had issues (non-fatal)"
|
||||||
@@ -1558,9 +1557,6 @@ if [[ "$desktopEnvironment" == "i3" ]]; then
|
|||||||
log " 4. Your i3 desktop is configured with I38 for accessibility"
|
log " 4. Your i3 desktop is configured with I38 for accessibility"
|
||||||
log " - I38 source is available in ~/git/I38 for customization"
|
log " - I38 source is available in ~/git/I38 for customization"
|
||||||
log " - Press Alt+Shift+F1 for I38 help after login"
|
log " - Press Alt+Shift+F1 for I38 help after login"
|
||||||
log " 5. Run 'configure-stormux' for additional setup"
|
|
||||||
else
|
|
||||||
log " 4. Run 'configure-stormux' for additional setup"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log ""
|
log ""
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ file_permissions=(
|
|||||||
["/usr/local/bin/Installation_guide"]="0:0:755"
|
["/usr/local/bin/Installation_guide"]="0:0:755"
|
||||||
["/usr/local/bin/livecd-sound"]="0:0:755"
|
["/usr/local/bin/livecd-sound"]="0:0:755"
|
||||||
["/usr/local/bin/configure-stormux"]="0:0:755"
|
["/usr/local/bin/configure-stormux"]="0:0:755"
|
||||||
|
["/usr/local/bin/install-stormux"]="0:0:755"
|
||||||
["/usr/local/bin/stormux-setup.sh"]="0:0:755"
|
["/usr/local/bin/stormux-setup.sh"]="0:0:755"
|
||||||
["/usr/local/bin/init-pipewire-sound.sh"]="0:0:755"
|
["/usr/local/bin/init-pipewire-sound.sh"]="0:0:755"
|
||||||
["/home/stormux"]="1000:1000:755"
|
["/home/stormux"]="1000:1000:755"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,34 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Parse command line arguments
|
||||||
|
bootInstalled=false
|
||||||
|
while getopts "ih" opt; do
|
||||||
|
case "$opt" in
|
||||||
|
i) bootInstalled=true ;;
|
||||||
|
h)
|
||||||
|
echo "Usage: $0 [options]"
|
||||||
|
echo
|
||||||
|
echo "Options:"
|
||||||
|
echo " -i Boot from installed system (virtual disk) instead of ISO"
|
||||||
|
echo " -h Show this help"
|
||||||
|
echo
|
||||||
|
echo "Without -i flag, boots from ISO with virtual disk attached for installation."
|
||||||
|
echo "With -i flag, boots only from virtual disk (installed system)."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Use -h for help"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# Get the directory where this script is located
|
# Get the directory where this script is located
|
||||||
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
outDir="${scriptDir}/out"
|
outDir="${scriptDir}/out"
|
||||||
logDir="${scriptDir}/logs"
|
logDir="${scriptDir}/logs"
|
||||||
|
diskFile="${scriptDir}/stormux-test-disk.qcow2"
|
||||||
|
|
||||||
# Create logs directory if it doesn't exist
|
# Create logs directory if it doesn't exist
|
||||||
mkdir -p "$logDir"
|
mkdir -p "$logDir"
|
||||||
@@ -34,6 +58,17 @@ timestamp=$(date +%Y%m%d_%H%M%S)
|
|||||||
qemuLog="${logDir}/qemu-boot_${timestamp}.log"
|
qemuLog="${logDir}/qemu-boot_${timestamp}.log"
|
||||||
serialLog="${logDir}/serial-console_${timestamp}.log"
|
serialLog="${logDir}/serial-console_${timestamp}.log"
|
||||||
|
|
||||||
|
# Create virtual disk if it doesn't exist
|
||||||
|
if [[ ! -f "$diskFile" ]]; then
|
||||||
|
echo "Creating virtual disk: $diskFile (10GB)"
|
||||||
|
qemu-img create -f qcow2 "$diskFile" 10G
|
||||||
|
echo "Virtual disk created successfully"
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Find ISO file (only needed if not booting installed system)
|
||||||
|
isoFile=""
|
||||||
|
if [[ "$bootInstalled" == false ]]; then
|
||||||
# Find the most recent ISO in the out directory
|
# Find the most recent ISO in the out directory
|
||||||
if [[ ! -d "$outDir" ]]; then
|
if [[ ! -d "$outDir" ]]; then
|
||||||
echo "Error: Output directory not found: $outDir"
|
echo "Error: Output directory not found: $outDir"
|
||||||
@@ -49,16 +84,28 @@ if [[ -z "$isoFile" ]]; then
|
|||||||
echo "Please build an ISO first using: sudo ./build.sh"
|
echo "Please build an ISO first using: sudo ./build.sh"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$bootInstalled" == true ]]; then
|
||||||
|
echo "Booting installed system from: $diskFile"
|
||||||
|
else
|
||||||
echo "Found ISO: $isoFile"
|
echo "Found ISO: $isoFile"
|
||||||
echo "Booting Stormux in QEMU with audio support..."
|
echo "Booting Stormux ISO in QEMU with virtual disk attached..."
|
||||||
|
echo "Virtual disk: $diskFile"
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
echo "Logging to:"
|
echo "Logging to:"
|
||||||
echo " QEMU log: $qemuLog"
|
echo " QEMU log: $qemuLog"
|
||||||
echo " Serial console: $serialLog"
|
echo " Serial console: $serialLog"
|
||||||
echo
|
echo
|
||||||
|
if [[ "$bootInstalled" == false ]]; then
|
||||||
echo "Note: After boot, press Ctrl+Alt+F2 to switch to tty2"
|
echo "Note: After boot, press Ctrl+Alt+F2 to switch to tty2"
|
||||||
echo " where the stormux user will be logged in with Fenrir screen reader."
|
echo " where the stormux user will be logged in with Fenrir screen reader."
|
||||||
|
echo " Run 'sudo install-stormux' to install to the virtual disk."
|
||||||
|
echo " After installation, use './qemu-boot.sh -i' to boot the installed system."
|
||||||
|
else
|
||||||
|
echo "Note: Booting from installed system on virtual disk."
|
||||||
|
fi
|
||||||
echo " You can monitor the serial console log in real-time with:"
|
echo " You can monitor the serial console log in real-time with:"
|
||||||
echo " tail -f $serialLog"
|
echo " tail -f $serialLog"
|
||||||
echo
|
echo
|
||||||
@@ -66,6 +113,30 @@ echo
|
|||||||
# Export DISPLAY for console usage
|
# Export DISPLAY for console usage
|
||||||
export DISPLAY="${DISPLAY:-:0}"
|
export DISPLAY="${DISPLAY:-:0}"
|
||||||
|
|
||||||
|
# Build QEMU command based on boot mode
|
||||||
|
# Common options for both modes
|
||||||
|
# shellcheck disable=SC2054
|
||||||
|
qemuCmd=(
|
||||||
|
qemu-system-x86_64
|
||||||
|
-enable-kvm
|
||||||
|
-m 2048
|
||||||
|
-drive file="$diskFile",format=qcow2
|
||||||
|
-audiodev pa,id=snd0
|
||||||
|
-device intel-hda
|
||||||
|
-device hda-duplex,audiodev=snd0
|
||||||
|
-serial file:"$serialLog"
|
||||||
|
-D "$qemuLog"
|
||||||
|
-d guest_errors,cpu_reset
|
||||||
|
-display gtk
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add ISO and boot order if booting from ISO
|
||||||
|
if [[ "$bootInstalled" == false ]]; then
|
||||||
|
qemuCmd+=(-cdrom "$isoFile" -boot order=dc)
|
||||||
|
else
|
||||||
|
qemuCmd+=(-boot c)
|
||||||
|
fi
|
||||||
|
|
||||||
# Boot QEMU with audio support and logging
|
# Boot QEMU with audio support and logging
|
||||||
# -D: QEMU debug log (shows QEMU errors, device issues)
|
# -D: QEMU debug log (shows QEMU errors, device issues)
|
||||||
# -d: Debug categories (guest_errors, cpu_reset)
|
# -d: Debug categories (guest_errors, cpu_reset)
|
||||||
@@ -73,15 +144,4 @@ export DISPLAY="${DISPLAY:-:0}"
|
|||||||
# -audiodev: PulseAudio backend for audio
|
# -audiodev: PulseAudio backend for audio
|
||||||
# -device intel-hda: Intel HD Audio controller
|
# -device intel-hda: Intel HD Audio controller
|
||||||
# -device hda-duplex: HD Audio codec with input/output, connected to audiodev
|
# -device hda-duplex: HD Audio codec with input/output, connected to audiodev
|
||||||
exec qemu-system-x86_64 \
|
exec "${qemuCmd[@]}"
|
||||||
-enable-kvm \
|
|
||||||
-m 2048 \
|
|
||||||
-cdrom "$isoFile" \
|
|
||||||
-boot d \
|
|
||||||
-audiodev pa,id=snd0 \
|
|
||||||
-device intel-hda \
|
|
||||||
-device hda-duplex,audiodev=snd0 \
|
|
||||||
-serial file:"$serialLog" \
|
|
||||||
-D "$qemuLog" \
|
|
||||||
-d guest_errors,cpu_reset \
|
|
||||||
-display gtk
|
|
||||||
|
|||||||
Reference in New Issue
Block a user