universalisos/kernel/scripts/flash_usb.sh
Fábio Coutada 62e8454f91 build: add UEFI ISO builder, test boot scripts, EIM config
- make-uefi-iso.sh: UEFI ISO image builder
- test_boot.S, test_boot.ld: test boot assembly and linker script
- eim_config.toml: EIM (External Interface Module) configuration
- edk2-ovmf RPM for UEFI firmware
- GAP_ANALYSIS_PIKEOS_PARITY.md: PikeOS parity gap analysis
2026-07-15 15:33:07 +01:00

38 lines
866 B
Bash
Executable file

#!/bin/bash
# UniversalisOS USB Flash Script
# Usage: ./flash_usb.sh /dev/sdX
if [ -z "$1" ]; then
echo "Usage: $0 /dev/sdX"
echo "WARNING: This will DESTROY all data on the target device!"
exit 1
fi
DEVICE=$1
ISO="/tmp/universalisos-xps15.iso"
if [ ! -f "$ISO" ]; then
echo "Error: ISO not found at $ISO"
exit 1
fi
echo "=== UniversalisOS USB Flash ==="
echo "Device: $DEVICE"
echo "ISO: $ISO"
echo "Size: $(ls -lh $ISO | awk '{print $5}')"
echo ""
echo "WARNING: ALL DATA ON $DEVICE WILL BE DESTROYED!"
read -p "Continue? (yes/no): " confirm
if [ "$confirm" != "yes" ]; then
echo "Aborted."
exit 0
fi
echo "Flashing..."
sudo dd if="$ISO" of="$DEVICE" bs=4M status=progress conv=fsync
echo ""
echo "=== Flash Complete ==="
echo "USB drive is ready. Boot Dell XPS 15 from USB."
echo "Press F12 during boot for one-time boot menu."