From ef9815e957bcd1e4becea4b3adb6427fd93cf568 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 15 Jul 2025 21:32:13 -0400 Subject: [PATCH] Actually remember to sudo the install stuff. --- usr/local/bin/install_to_disk.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr/local/bin/install_to_disk.sh b/usr/local/bin/install_to_disk.sh index d9b19cc..7f2ed4c 100755 --- a/usr/local/bin/install_to_disk.sh +++ b/usr/local/bin/install_to_disk.sh @@ -126,7 +126,7 @@ fi # Unmount any mounted partitions on target disk echo "Unmounting target disk partitions..." -umount "${TARGET_DEVICE}"* 2>/dev/null || true +sudo umount "${TARGET_DEVICE}"* 2>/dev/null || true # Clone the USB to the target disk echo "Cloning USB system to target disk..." @@ -134,13 +134,13 @@ echo "This will take several minutes depending on USB size and disk speed." echo # Use dd to clone the entire device -if ! dd if="$SOURCE_DEVICE" of="$TARGET_DEVICE" bs=4M status=progress; then +if ! sudo dd if="$SOURCE_DEVICE" of="$TARGET_DEVICE" bs=4M status=progress; then error_exit "Failed to clone USB to target disk" fi # Sync to ensure all data is written echo "Syncing data to disk..." -sync +sudo sync # Update the cloned system to remove USB-specific configurations echo "Finalizing installation..." @@ -164,18 +164,18 @@ done # Mount and make final adjustments TEMP_MOUNT="/mnt/stormux_target" -mkdir -p "$TEMP_MOUNT" +sudo mkdir -p "$TEMP_MOUNT" -if mount "$TARGET_ROOT_PART" "$TEMP_MOUNT" 2>/dev/null; then +if sudo mount "$TARGET_ROOT_PART" "$TEMP_MOUNT" 2>/dev/null; then # Remove any USB-specific markers - rm -f "$TEMP_MOUNT/home/stormux/.firstboot" 2>/dev/null || true + sudo rm -f "$TEMP_MOUNT/home/stormux/.firstboot" 2>/dev/null || true # Update any USB-specific configurations if needed # (Add any specific cleanups here) - umount "$TEMP_MOUNT" + sudo umount "$TEMP_MOUNT" fi -rmdir "$TEMP_MOUNT" +sudo rmdir "$TEMP_MOUNT" # Success message echo