Actually remember to sudo the install stuff.

This commit is contained in:
Storm Dragon
2025-07-15 21:32:13 -04:00
parent d97203afc0
commit ef9815e957

View File

@@ -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